How to delete a Node CI from the command line? (581 Views)
Reply
Regular Advisor
freebird (-.-)
Posts: 123
Registered: ‎12-12-2006
Message 1 of 6 (581 Views)

How to delete a Node CI from the command line?

[ Edited ]

Is it possible to delete a Node CI from the command line in uCMDB 9.05?  RTSM?

Please use plain text.
Trusted Contributor
Rutger
Posts: 155
Registered: ‎10-12-2010
Message 2 of 6 (514 Views)

Re: How to delete a Node CI from the command line?

There's at least two possibilities for you to look at: the Model Services MBean (JMX) and the UcmdbService webservice (Axis2).

 

There's a Jar you need to call JMX MBean operations from a batch file. The same for performing SOAP calls on the Axis2 webservices.

 

 

-----------------------------------------------------------------------------
o If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
o Click the KUDOS star on the left to say 'Thanks'
Please use plain text.
Regular Advisor
freebird (-.-)
Posts: 123
Registered: ‎12-12-2006
Message 3 of 6 (497 Views)

Re: How to delete a Node CI from the command line?

I'm struggling to find a good example in any documentation.  Is anyone trying to remove Node CI's programatically?  Is this even worth the effort?

 

It seems to me the easiest way to delete CI's is via Enrichment.  Thats fine.  But surely there is a way to do this programatically.

Please use plain text.
HP Expert
EShaffer
Posts: 210
Registered: ‎05-17-2012
Message 4 of 6 (488 Views)

Re: How to delete a Node CI from the command line?

Hi,

 

Take a look at the RTSM Developer Reference Guide.

 

The API's for writing your own code are described there.

 

 

Eric Shaffer

"HP Support
If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution."
Please use plain text.
Trusted Contributor
Rutger
Posts: 155
Registered: ‎10-12-2010
Message 5 of 6 (473 Views)

Re: How to delete a Node CI from the command line?

[ Edited ]

Have you given some thought to cmdline-jmxclient? You can use that to communicate with the JMX side of UCMDB (JMX console).

 

 

-----------------------------------------------------------------------------
o If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
o Click the KUDOS star on the left to say 'Thanks'
Please use plain text.
Trusted Contributor
Rutger
Posts: 155
Registered: ‎10-12-2010
Message 6 of 6 (455 Views)

Re: How to delete a Node CI from the command line?

[ Edited ]

Try this:

 

java -jar cmdline-jmxclient-0.10.3.jar - 1.1.1.1:29601 "UCMDB:service=Model Services" removeCMDBObject=1,f22c4b1e0a5e01271054aaf0990c2a57
02/13/2014 11:36:28 +0000 org.archive.jmx.Client removeCMDBObject=1,f22c4b1e0a5e01271054aaf0990c2a57: Object f22c4b1e0a5e01271054aaf0990c2a57 deleted

This will immediately and irrevocably remove a CI with Global ID "f22c4b1e0a5e01271054aaf0990c2a57" from the CMDB.

Tested it and it works.

 

-----------------------------------------------------------------------------
o If you find that this or any post resolves your issue, please be sure to mark it as an accepted solution.
o Click the KUDOS star on the left to say 'Thanks'
Please use plain text.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation