EcoStruxure IT forum
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:28 PM . Last Modified: 2024-04-04 11:55 PM
Hello,
I noticed that the ETL item types listed in http://sxwhelpcenter.ecostruxureit.com/display/public/DCIMDEVELOPER/ETL+Import+Database#ETLImportDat... do not contain all ci_type(s).
If I run "select distinct ci_type from CONFIGURATION_ITEM;" to return all ci_types I get 42 returns... Listed at the bottom of this post.
Is there someone that can provide the "ID" for each of the below items that I can then use in our DCO Import ETL DB. I called support and they do not have an answer for me.
For example the number 1 in BOLD below:
"INSERT INTO CONFIGURATION_ITEM (ci_id, cit_id, ci_name, ci_serial_number, state_flag) VALUES ('c7asdf3-5784-4asd4-8sdf5-c53asdec5e7749', 1, 'SERVERNAME_HERE', 'SERIALNUMBER_HERE', 'new');"
There just isn't clear understandable documentation on this part.
Wall
Ups
SwitchGear
SwitchEnclosure
SupportingInfrastructureSpace
Storage
ServerRoom
Rdp
RackMountPduSwitched
RackMountPduMetered
RackMountPdu
RackMountAts
Rack
PowerReceptacle
PowerPanel
PerforatedFloorTile
Pdu
NetbotzCentral
Layer3NetworkGear
Layer2NetworkGear
Layer1NetworkGear
IsxManager
InRoom
Hacs
GenericRackMountEquipment
GenericFloorPowerEquipment
GenericDataCenterEquipment
Gap
Folder
FloorDataCenterItemBundle
Epo
EnvironmentalPowerConsumingEquipment
ElectricalRoom
Door
CracFan
Crac
Cacs
Block
BladeEnclosure
Blade
BatteryCabinet
Ats
Any help on this is much appreciated.
Thanks,
David
(CID:131959112)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:28 PM . Last Modified: 2024-04-04 11:55 PM
Hi David,
It seems you have/had been connected to your etl export DB (and not the import db).
If I connect to my import db, and run the query:
select * from public.configuration_item_type
it would display the supported items (cit_id and cit_text) that are correctly listed in the table you've pointed to.
Kind regards
(CID:131959634)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:28 PM . Last Modified: 2024-04-04 11:55 PM
Jef Faridi, That is correct... What Im doing is exporting from our DCO Export_db, mixing up the data, then pushing back to the DCO Import_db with Python. I had this question so that I dont mix up the cit_id types by mapping every ci_type from the Export_db into the correct cit_id type category which is in turn pushed back into the Import_db.
(CID:131959874)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:28 PM . Last Modified: 2024-04-04 11:55 PM
Essentially what I was looking for was something like this.... but for the entire list mentioned in the original post.
SwitchGear > 18
SwitchEnclosure > 18
RackMountPduSwitched > 18
RackMountPduMetered > 18
RackMountPdu >18
Thanks again,
David
(CID:131959881)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:28 PM . Last Modified: 2024-04-04 11:55 PM
Also to give context to what Im doing... Im moving a custom serial number property into the actual serial number ci_ property. We will use this only once then the Import_db will have all items removed (marked as deleted) and once we see sync_deleted in the DB the items will be deleted as well as the DB its self.
Given this scenario, would it be ok to simply use the cit_id 0 for all devices to move that data over?
(CID:131959887)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:28 PM . Last Modified: 2024-04-04 11:55 PM
Hi David,
Yes, seems to be okay to use the cit_id 0 for the scenario you've describe. However, it might be good idea to do it for few devices first (as a test) and also remember to take a fresh backup before doing any/major changes.
Kind regards
(CID:131961967)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:29 PM . Last Modified: 2024-04-04 11:55 PM
Hi David, perhaps a different tack might work. I find reading all the custom properties from the Export DB easier than REST API but writing the Serial Number easier using the REST API than using the ETL Import DB, i.e. don't need an import DB, don't need to associate the device.
I'm a PERL fan but any scripting or programming language can be used, even SHELL is you are good at awk and sed!
To get all serial numbers in CPs from the Export DB (assumes the case sensitive CP name is "SerialNo")
SELECT i.ci_id, i.ci_name, p.cp_value
FROM configuration_item i, custom_property p
WHERE p.ci_id=i.ci_id
AND p.cp_name='SerialNo'
;
You really don't need ci_name, I only include it so you can see the device. My DCO has just one device
ci_id | ci_name | cp_value
--------------------------------------+-----------+-----------
c03926ba-8ab1-40b8-b7aa-14ee2de286ec | EdsServer | 123456789
To update the asset, use the REST API Asset PATCH call, e.g.
curl -X PATCH --header 'Content-Type: application/json' --header 'Accept: application/json' -d '[ { "op": "replace", "path": "/serialNumber", "value": "123456789" } ]' 'https:///api/v8.1/assets/c03926ba-8ab1-40b8-b7aa-14ee2de286ec'
By rights the doco says you should also perform a "test" operation prior to "replace". Someone my weigh in here. You may have to play with the API call http v https.
"Just" wrap this all in some loops and a script (I love it when someone says the word "just" to me) and your problem is solved.
Hope that helps.
(CID:131960909)
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-07-04 05:29 PM . Last Modified: 2023-10-22 01:37 AM
This question is closed for comments. You're welcome to start a new topic if you have further comments on this issue.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.