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!
Listing current ack'd issues
Re: Listing current ack'd issues
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.
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
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:
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.
Code: Select all
servicestatus {
host_name=localhost
service_description=HTTP
...
problem_has_been_acknowledged=1
acknowledgement_type=2
...
}Former Nagios employee
https://www.mcapra.com/
https://www.mcapra.com/
Re: Listing current ack'd issues
interesting...I will try this for sure!
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Listing current ack'd issues
Let us know how it goes!