The Zurich release has arrived! Interested in new features and functionalities? Click here for more

How to get parent ci

pradeepgupta
Giga Expert

Hi All,

There are CI A,B,C & D with below relationship.

kb.png

I have to write a function in such a way that if I give ci D than function should return a result as array or   all the ci (A,B,C,D).

1 ACCEPTED SOLUTION
13 REPLIES 13

Thanks everyone for the reply.



I will check and update you accordingly.


Any one had worked on Event Management ? My actual requirement is as follows:



We have one Monitoring tool (ABC) which is integrated with Service-now. When any event occurs(CPU High utilization) Monitoring tools captures that and through integration it creates event in Service-now. Once event created in SN it creates Alert and based on filtered alert incident is being created in service-now.



As of now if event comes for parent and child ci two different incidents created, The requirement is to create only one as if parent is down all the ci which are dependent on parent will also be down.



Please help me to achieve this.


Good day Mark,



With the information that your new script include is pulling, is there a way to format a report on it?




Business Service C depends on Business Service B depends on umbrella Business Service A.


I log an incident on lowest tier Business Service C, and I would then like to report on all incidents affecting umbrella Business Service A and down the map to it's sub Business Services such as C.



Thanks.


The way I do this is to use my script to populate the 'Impacted Services' related list on all task tables.   Then it's really easy to report on all impacted services.   Seeing how they all stack up is a bit more difficult but you could probably get that by joining Impacted Services to 'cmdb_rel_ci'.


I went ahead and added Impacted Services as a related list for the Ticket table, and tagged a CI on this list for a test Ticket.



Went ahead and started a report on the Ticket table, but Impacted Services is not showing up on the "Group by" list or columns. Is there a way to pull up this information?



Thanks.


You need to report on the Impacted Services table instead.   From there you can dot-walk back or join to the ticket/task tables.