AIOps

 View Only

 CloudPak for AIOps: ServiceNow Observer - How to get the CI-Relations from ServiceNow?

Christophe Nagel's profile image
Christophe Nagel posted Wed April 30, 2025 03:31 AM

Hello,

In our CloudPak for AIOps installation we tried out to connect to ServiceNow using the ServiceNow Observer.

During the configuration we defined for example the ServiceNow CI tables cmdb_ci_server, cmdb_ci_databases etc..

To get the relations we tried out to add also the ServiceNow Relation table cmdb_rel_ci but this is not allowed because it doesn't represent a CI table.

How could we get the relations out of ServiceNow?

Best Regards

Christophe Nagel

Matthew Duggan's profile image
Matthew Duggan

Hi Christophe, 

It would be worth checking the ServiceNow Observer logs to see if it's logging anything useful regarding the relationships for the tables specified.  Have you raised a ticket about this?

thanks,

Matt

Christophe Nagel's profile image
Christophe Nagel

Hi Matt,

When I set the cmdb_rel_ci table in the ServiceNow Observer job I get following error:

Unsupported table name: cmdb_rel_ci for field [parameters.discover_tables]. Tables supported are 'sys_user' & tables that are either system or user created children of 'cmdb_ci'.

Logs from the Pod:

ERROR  [2025-05-02 09:01:40,546] [pool-12-thread-1] c.i.i.t.o.a.ProxyJobParameters -  The value:  cmdb_rel_ci is an unsupported table
WARN   [2025-05-02 09:01:40,552] [pool-12-thread-1] c.i.i.t.o.a.o.RESTApiException -  pool-12-thread-1 - APIMessage: { httpCode=400, _error={ message=Job Creation Failure, level=warning, description=Cannot create observation job, causes=[{ message=Unsupported table name:  cmdb_rel_ci, level=error, description=Tables supported are 'sys_user' & tables that are either system or user created children of  'cmdb_ci', field=parameters.discover_tables }] } }
INFO   [2025-05-02 09:01:40,611] [pool-12-thread-1] c.i.i.t.o.u.ObserverJobsStoreUtilities -  Associated KBX4Qm8WSkKm2Y6_WDMTCQ with servicenow-observer:servicenow_dev
INFO   [2025-05-02 09:01:40,646] [pool-12-thread-1] c.i.i.t.o.u.ObserverJobsStoreUtilities -  Updated prevHasState for KBX4Qm8WSkKm2Y6_WDMTCQ with FAILED
INFO   [2025-05-02 09:01:40,668] [pool-12-thread-2] c.i.i.t.o.p.ResourceUploadPluginManager -  Change of {"keyIndexName":"servicenow-observer:servicenow_dev","name":"servicenow_dev","entityTypes":["ASM_OBSERVER_JOB"],"vertexType":"mgmtArtifact","tags":["OBSERVATION_JOB","servicenow-observer"],"_id":"KBX4Qm8WSkKm2Y6_WDMTCQ","_changeMap":{"prevHasState":{"new":"FAILED","old":null}},"hasState":"SCHEDULED"}
INFO   [2025-05-02 09:01:40,775] [pool-12-thread-2] c.i.i.t.o.p.ResourceUploadPluginManager -  Change of {"keyIndexName":"servicenow-observer:servicenow_dev","name":"servicenow_dev","entityTypes":["ASM_OBSERVER_JOB"],"vertexType":"mgmtArtifact","tags":["OBSERVATION_JOB","servicenow-observer"],"_id":"KBX4Qm8WSkKm2Y6_WDMTCQ","_changeMap":{"prevHasState":{"new":null,"old":"FAILED"},"hasStateDescription":{"new":"Unsupported table name:  cmdb_rel_ci for field [parameters.discover_tables]. Tables supported are 'sys_user' & tables that are either system or user created children of  'cmdb_ci'.","old":"Awaiting next scheduled run"},"hasState":{"new":"FAILED","old":"SCHEDULED"},"parameters":{"new":{"proxy_port":8080,"no_of_threads":1,"tables_per_call":10,"connect_timeout":5000,"proxy_auth_schema":"BASIC","instance_url":"https://xxxxx.service-now.com/","fetch_records":10000,"connect_retry":2,"trust_certificate":true,"password":{"hiddenString":"xxxxx","encrypted":true},"discover_tables":"cmdb_ci_server, cmdb_ci_appl, cmdb_ci_database, cmdb_rel_ci","filter_preference":"include","std_table_dot_walk":false,"exclude_entity_edge_option":"none","read_timeout":5000,"proxy_secure":false,"connect_retry_delay":5000,"username":"xxxx"},"old":{"proxy_port":8080,"no_of_threads":1,"tables_per_call":10,"access_scope":null,"connect_timeout":5000,"proxy_auth_schema":"BASIC","instance_url":"https://xxxxxxxx.service-now.com/","fetch_records":10000,"connect_retry":2,"trust_certificate":true,"password":{"hiddenString":"xxxxxxxxxx","encrypted":true},"discover_tables":"cmdb_ci_server, cmdb_ci_appl, cmdb_ci_database, cmdb_rel_ci","filter_preference":"include","std_table_dot_walk":false,"exclude_entity_edge_option":"none","read_timeout":5000,"proxy_secure":false,"connect_retry_delay":5000,"username":"xxxx"}},"write_file_observer_file":{"new":null,"old":false}},"hasState":"FAILED"}

I haven't opened a ticket yet because I'm still in a PoC environment and I'm not sure if that's even possible since I'm getting this error message saying that the tables have to be child tables from cmdb_ci or sys_user.

Christophe Nagel's profile image
Christophe Nagel

Hello Matt,

I think I found the error.

In the configuration of the ServiceNow Observer I just defined the cmdb_ci_server Class and not the cmdb_ci_linux_server for example because I thought using the Parent Class could be enough.

After adding all the "Child"-classes I also get the relations without adding this relation table (cmdb_rel_ci).

It would be interessting, how this observer goes through the CIs and their relations.

Best Regards,

Christophe