UCMDB and UD Practitioners Forum (Previously CMS)
Showing results for 
Search instead for 
Do you mean 

Accessing CMDB CI's

SOLVED
Go to Solution
Regular Advisor

Accessing CMDB CI's

[ Edited ]

Hi all,

I am currently tring to create a script that supposed to access two CI groups, one is the "Application" under the Businnes tree, and the other one is a costume one under System->Software Element->TIS(costume tree)->TIS Tasks(costume CI).
How am i supposed to reach those CI? I need to compare their names and if they match then to add to the custome CI the same "monitored by" attribute as that of the application CI.

Please help,
Thanks in advance,

Asaf

 

 

P.S. This thread has been moved from Application Perf Mgmt (BAC / BSM) Support and News Forum to CMS and Discovery Support and News Forum. - Hp forum moderator

13 REPLIES
Valued Contributor

Re: Accessing CMDB CI's

How are you trying to access them? API, Database, Enrichment Manager, Python?
Regular Advisor

Re: Accessing CMDB CI's

Im tring ot do so using python/jython
Regular Advisor

Re: Accessing CMDB CI's

Hello,

maybe Enrichment is more usefull for your needs.

Scripting means create a discovery job and all stuffs needed.
Also i'm not sure you can request the CMDB as you want.

Regards,

Steve
Regular Advisor

Re: Accessing CMDB CI's

i am trying currently to create a discovery job.
my main goal is to do this:

1. check if application name = task name
2. if so, then create a "monitored by" connection with the application EMS monitor.

i tryied doing it in enrichment mode but i couldt do it so im trying in jython thou i dont know most of the syntex and function i sould use.
Valued Contributor

Re: Accessing CMDB CI's

If the only thing your trying to do is create a relationship base on the Task Name = Application Name then an enrichment rule is the best bet.

1. In TQL mode drag in Application CIT & TIS Tasks CIT.
2. Create a relationship between them. Virtual Join....Task Name = Application Name.
3. In Enrichment Mode, draw a relationship between the two CIs again but this time select to create a relationship...and give the relationship a name.

If you still can't get an enrichment manager rule created, then you'll need to search the forums for "API" or "webservices" as that's the only other way to do it.
Regular Advisor

Re: Accessing CMDB CI's

thanks! but i have two qestions:
1. how can i create a virtual join?
2. in the enrichment mode how am i supposed do add the "if" condition: if appName=tisNAme then create the monitored by relationship?
Valued Contributor

Re: Accessing CMDB CI's

When you drag the two CITs in to the view, select the "Create Relationship" button. (Looks like an up arrow w/ another arrow next to it). Click on the Application CIT then click on the TIS Tasks CI. The Select Relationship Type screen will now appear. Select the Join Relationship button, click OK. Now on the next screen click the Add button and select the "Name" attribute from the Application CIT and the "Name" attribute from the TIS Tasks CIT. The operator should read "equals". Click the OK button. Now, go to enrichment mode. And do the same relationship steps as above.
Regular Advisor

Re: Accessing CMDB CI's

thanks! but it only partially worked, it did narrow down my CI's to just the one i wanted but it didnt create the "monitored by" relationship (or at least it didnt show the relationship arrow in the view, it showed only the "virtual - link").
Regular Advisor

Re: Accessing CMDB CI's

also not like in normal view where i see the, well i dont know how to define it, what relationships a CI have, it has an error and you can expand its name in the CI names bar to see the relationships. in my view they are all orgenized by name.
Valued Contributor

Re: Accessing CMDB CI's

Well, in TQL mode, you'll only have the Virtual Join. You need to switch to Enrichment Mode. Should be in the tool bar. Once in Enrichment Mode, Select the relationship tool, create a relationship between the two CIs and give it a name. Save the Rule. Now, when the names equal, the rule will fire and the relationship will be created.
Regular Advisor

Re: Accessing CMDB CI's

Thanks man it worked!
Valued Contributor

Re: Accessing CMDB CI's

AWSOME! Glad I could help. Good luck w/ your uCMDB.
Regular Advisor

Re: Accessing CMDB CI's

Thanks man ill do my best!
//Add this to "OnDomLoad" event