Page 1 of 1

Listing current ack'd issues

Posted: Wed Mar 01, 2017 11:32 am
by toosecure
I am migrating from core to XI and it would be wonderful if I could put the XI host/service check in as "acknowledged" if it is currently that way in Core.

I have found that if the nagios/cgi-bin/statusjson.cgi?query=comment&commentid=273316 has a comment_type = 2, I'm pretty sure that's an Acknowledged issues.

However, I have to jump through a lot of hoops to find the "right" comment for the "right" acknowledged check that way.

Is there a better way to find/import/export/json current acknowledged state so that I can apply that to XI ?

thanks!

Re: Listing current ack'd issues

Posted: Wed Mar 01, 2017 12:22 pm
by toosecure
Using the json generator, am I able to get this URL:

https://nagios.local.domain/nagios/cgi- ... wledgement

but this only lists comments that are of type "downtime" or "acknowledgement", but these are from the dawn of time, so it doesn't insure that the host/service is CURRENTLY in downtime or the problem ack'd.

Re: Listing current ack'd issues

Posted: Wed Mar 01, 2017 4:59 pm
by mcapra
That is a very tricky thing to do. If you look in the retention.dat file which contains the retained/persistent Nagios status information, you might see something like this:

Code: Select all

servicestatus {
        host_name=localhost
        service_description=HTTP

        ...

        problem_has_been_acknowledged=1
        acknowledgement_type=2

        ...

        }
You might try stopping the Nagios service on both machines, migrating retention.dat from the Nagios Core machine to the Nagios XI machine, then restarting the nagios service(s). This assumed all your Nagios Core objects are also defined within Nagios XI.

Re: Listing current ack'd issues

Posted: Wed Mar 01, 2017 7:07 pm
by toosecure
interesting...I will try this for sure!

Re: Listing current ack'd issues

Posted: Wed Mar 01, 2017 9:09 pm
by dwhitfield
Let us know how it goes!