Unique ID for a Service

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Unique ID for a Service

Post by rajasegar »

Does Nagios have any macros that uniquely identifies a service for a particular host?

Eg:
Host A - CPU Check ID = 100
Host B - CPU Check ID = 200
Host B - Mem Check ID = 500
etc

We need to automate creating of ticket in ITSM software and we are still figuring out what is the best way to avoid creating duplicate tickets for the same event.
Right now looking into these macros below.

$HOSTEVENTID$
$LASTHOSTEVENTID$
$HOSTPROBLEMID$
$LASTHOSTPROBLEMID$
$SERVICEEVENTID$
$LASTSERVICEEVENTID$
$SERVICEPROBLEMID$
$LASTSERVICEPROBLEMID$
$HOSTNOTIFICATIONID$
$SERVICENOTIFICATIONNUMBER$
$SERVICENOTIFICATIONID$

Thanks
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Unique ID for a Service

Post by tmcdonald »

How are you generating these tickets? I don't know of anything that adds a unique id directly on the service, but you could potentially MD5 the string "service_description:host_name" and get a unique ID to use.
Former Nagios employee
rajasegar
Posts: 1018
Joined: Sun Mar 30, 2014 10:49 pm

Re: Unique ID for a Service

Post by rajasegar »

tmcdonald wrote:How are you generating these tickets? I don't know of anything that adds a unique id directly on the service, but you could potentially MD5 the string "service_description:host_name" and get a unique ID to use.
The interface is via email.
That's a good idea on the MD5 usage, we will try it.
5 x Nagios 5.6.9 Enterprise Edition
RHEL 6 & 7
rrdcached & ramdisk optimisation
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Unique ID for a Service

Post by ssax »

Great, let us know how it goes and if you have any additional questions.
Locked