Page 1 of 1

Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Tue Feb 12, 2019 2:05 am
by zaji_nms
Dear Expert

in the main NagiosXI menu top left there is HOME
Operations Center
Service Detail (Service Status)
Host Detail (Host Status)

showing one column Duration (the Host/Service UP/DOWN ....1 hour , or 1 day)........is very Okay

the same time we want to know in Status Information the Host/Service UP/DOWN since what time in YYYY-MM-DD HH:MM:SS

example
Host Down => Duration : 1d 23h 53m 46s , we need in Status Information : PING CRITICAL - Packet loss = 100% (2019-02-10 12:39:45)

so very easy to understand Host down from last 2 days and went down on Date/Time : 10-Feb-2019 12:39:45

the same way if its UP , will tell Host/Service UP from last 15hours with Date/Time : (2019-02-11 19:10:52)

can you guide how to do?

can you put this in your next release (as a feature add request)

Regards

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Tue Feb 12, 2019 12:59 pm
by npolovenko
Hello, @zaji_nms. I am going to submit a feature request on your behalf. Please keep in mind that the decision to implement the enhancement is at the discretion of our development team.
In a meantime, you can check the last state change time by opening a service and going to the advanced tab.
Untitled.png
Last State Change is what you're looking for.

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Wed Feb 13, 2019 4:37 am
by zaji_nms
Thanks for considering feature request meantime

can you please guide how to do?

Just provide some hints.......not asking full code.....we have already done many minor enhancement/modification to provide some more info quickly and saving our lot of time and easy to our other users which are not Nagios/NMS expert.

Nagios XI 5.x.x

Regards

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Wed Feb 13, 2019 3:47 pm
by npolovenko
@zaji_nms, Sorry, I don't have a solution at this time. Changing the host status/service status page to display another field will likely require changing the C code. And I can't think of a way to add the last state change to the service check output either. You may contact the sales with a custom development request.

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Thu Feb 14, 2019 2:20 am
by zaji_nms
Dear npolovenko

just please provide some hints , exact variable name for Last State Change: , possible way to access from PHP scripts.

Regards

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Thu Feb 14, 2019 4:18 pm
by npolovenko
@zaji_nms, We have a dev example of how to create a component in XI with custom columns. This is not a fully functional component but you can use it to create your own and install through the Admin->Manage Components page of Nagios XI.
https://exchange.nagios.org/directory/A ... nt/details

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Wed Feb 27, 2019 3:56 am
by zaji_nms
Dear Expert

please close the post, its done.

<td>" . $status_info . " [".$x->last_state_change."]" . "</td>";
<td class='statustext'>{$status_info} [{$x->last_state_change}]</td>\n

Regards

Re: Host / Sevice UP/DOWN since YYYY-MM-DD HH:MM:SS

Posted: Wed Feb 27, 2019 2:11 pm
by npolovenko
@zaji_nms, Glad you found the solution. I'll be closing the thread.