Determining date that a node was added to Nagios XI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
redacted
Posts: 10
Joined: Thu May 17, 2018 11:33 am

Determining date that a node was added to Nagios XI

Post by redacted »

Is there a report that contains this or a table in the database that can be queried? Our billing team would like to automate a report of showing when the device was added and I am drawing a blank.

Thank you.
bolson

Re: Determining date that a node was added to Nagios XI

Post by bolson »

Hello redacted,

In UNIX and Linux, there is no timestamp representing when a file is created. And in Nagios XI, the date and time that a config (node) was created is not stored in the database. Consequently, there is no way to script out determining when a node was added to the system. That said, if the host configuration file for a node goes unmodified after it's created, the mtime (last modified time) for the host config file could reliably represent the date/time the node was added. Hope this helps.
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Determining date that a node was added to Nagios XI

Post by mcapra »

You could probably go through the historical Nagios logs and get a sense of when the very first "state" was registered for a particular node. That only goes as far back as your Nagios logs though, which are subject to some internal XI and Core retention settings.

Example:

Code: Select all

[root@capra_nag hosts]# grep -m 1 'ESMARVELPROD00' /usr/local/nagios/var/archives/*.log | head -1
/usr/local/nagios/var/archives/nagios-06-07-2017-00.log:[1495649213] EXTERNAL COMMAND: SCHEDULE_HOST_SVC_CHECKS;ESMARVELPROD00;1495649213
[root@capra_nag hosts]# grep -m 1 'PRODDATAMART' /usr/local/nagios/var/archives/*.log | head -1
/usr/local/nagios/var/archives/nagios-06-14-2017-00.log:[1497367847] EXTERNAL COMMAND: SCHEDULE_FORCED_SVC_CHECK;PRODDATAMART;foo;1497367846
Former Nagios employee
https://www.mcapra.com/
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Determining date that a node was added to Nagios XI

Post by npolovenko »

@redacted, You could also add dates to new host in the Notes section. Host Management -> Notes. That's a guaranteed but manual approach and probably won't work if you're planning to add hundreds of hosts every day.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
redacted
Posts: 10
Joined: Thu May 17, 2018 11:33 am

Re: Determining date that a node was added to Nagios XI

Post by redacted »

Thank you all very much for the replies.

At least I know I was not overlooking the date!

I will work around this most likely with the addition of a field that is populated when the devices are added to monitoring.
bolson

Re: Determining date that a node was added to Nagios XI

Post by bolson »

May we go ahead and close this thread as resolved?
Locked