Record Snow ticket number alongside service or host alert?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
ykara84
Posts: 1
Joined: Wed Feb 21, 2024 4:20 am

Record Snow ticket number alongside service or host alert?

Post by ykara84 »

Hello, we are using a python script as an event handler to send alerts to our ticketing system ServiceNow (Snow) as incidents. For example, when a host is down or unreachable it will create an incident via the Snow RestAPI containing the information (from macros) regarding the host down alert.

We are looking for a way for the python script to add the incident number (returned by Snow) in the Nagios XI alert or host object in one of the macro fields, so when the host becomes healthy again the event handler python script can read the recorded incident number and resolve it.

I've looked through the macro and API documentation and I cant seem to find a suitable way to do this or using a free variable. Has anyone achieved something like this if so any advice will be appreciated

Our Nagios System info:

Nagios XI version: 5.11.1
Release info: ********* 4.18.0-513.11.1.el8_9.x86_64 x86_64
Red Hat Enterprise Linux release 8.9 (Ootpa)
Gnome is not installed
User avatar
jmichaelson
Posts: 117
Joined: Wed Aug 23, 2023 1:02 pm

Re: Record Snow ticket number alongside service or host alert?

Post by jmichaelson »

Unfortunately, I can't come up with a quick way to do what you're trying to do right now. I'm thinking the ideal place to do this would be in Nagios Core, but its not a trivial task to write to host objects using externally available APIs, particularly if you're extending the data schema like this would be. Since there's a MySql/MariaDB server on your XI server, I'm wondering if it might be easier to add in a database there for what you're trying to do and have your python scripts work with that. A simple table with a host name and ServiceNow incident might be sufficient for that.
Please let us know if you have any other questions or concerns.

-Jason
Post Reply