Page 1 of 1

Macro or custom variable that records the "Soft" state chang

Posted: Tue Nov 05, 2019 3:12 pm
by evisus
Hello!!.

I hope you can help or guide me.

I need to record the time, from the first change of service, from status ok to no-ok of the type "Soft" to report the time at which the first change of status was to no-ok by email. Email will continue to be sent only in "hard" states

Today I can get the information with the "$SERVICEDURATION$" macro, but this macro only gives me the time it has been in "Hard" state.

Is there any way to get that time?

I hope my question is understood, I appreciate your help.

Re: Macro or custom variable that records the "Soft" state c

Posted: Tue Nov 05, 2019 3:27 pm
by scottwilkerson
The best I can suggest would be $LASTSERVICESTATECHANGE$

The only caveat to this is that is a service transitions from WARNING to CRITICAL it will change this time.
https://assets.nagios.com/downloads/nag ... cecritical

The alternative is knowing the last time it was ok with $LASTSERVICEOK$