Page 1 of 1

NagiosXI servicenow ITOM integration

Posted: Tue Oct 06, 2020 4:20 am
by Anto
Hi

Our Nagios architecture is based on Federate Monitoring, so we have one Nagios XI server that receive alarms from different distributed Nagios Core servers.
On top of this architecture there is ServiceNow ITOM, that collect alarms from Nagios XI using this connector:

https://docs.servicenow.com/bundle/pari ... ector.html

This connector is based on the API requests statehistory that has the JSON payload reported below.

So I have this question:
Considering that ITOM connector is using statehistory API, how can I send to ITOM an information, so it can understand the alarms is coming from a specific Nagios core server ? (something like a tenant identifier)

API objects/statehistory

{
"recordcount": 1,
"stateentry": [
{
"host_name": "localhost,
"service_description": "CPU Usage",
"objecttype_id": "2",
"object_id": "171",
"state_time": "2020-04-06 09:47:03",
"state_change": "1",
"state": "0",
"state_type": "0",
"current_check_attempt": "3",
"max_check_attempts": "5",
"last_state": "1",
"last_hard_state": "0",
"instance_id": "1",
"output": "OK: Percent was 2.16 %"
}
]
}

Thanks and Regards
Antonello

Re: NagiosXI servicenow ITOM integration

Posted: Tue Oct 06, 2020 4:51 pm
by ssax
Given those API endpoint fields for State History are fixed (not modifiable) you'll need to get crafty:

Technically, if you're using send_nrdp.sh you could modify the send_nrdp.sh command to prepend/append the Core servername/ID to the plugin output (without impacting the performance data returned by the check). I can't think of any other way for you to do it given your setup and the State History being fixed.

Re: NagiosXI servicenow ITOM integration

Posted: Wed Oct 07, 2020 2:51 pm
by Anto
Hi

Thanks for your suggestion.
I agree, it seems to be the only way to do it.
The only thing I want to understand is the purpose of instance_id parameter in the API statehistory and in case it can be useful for this scenario other than output field with prefix-suffix.
instance_id Unique number identifying the distinct instance of Nagios which this
entry is associated with

have you more info on this field?

Thanks

Best Regards
Antonello

Re: NagiosXI servicenow ITOM integration

Posted: Thu Oct 08, 2020 12:56 pm
by ssax
The instance_id should always be 1, if you change it things will not show up in the XI interface, Nagios XI doesn't support multiple instance_ids. That instance_id is the NDO instance ID.

Re: NagiosXI servicenow ITOM integration

Posted: Fri Oct 09, 2020 1:51 am
by Anto
OK

Thanks
Antonello

Re: NagiosXI servicenow ITOM integration

Posted: Fri Oct 09, 2020 1:01 pm
by dchurch
Let us know if you have any related questions or if we're okay to lock this up and mark it as resolved.