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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
evisus
Posts: 82
Joined: Tue Apr 26, 2016 1:19 pm

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

Post 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.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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$
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked