Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Latching status #978

Open
sickel opened this issue Jul 10, 2024 · 3 comments
Open

Feature request: Latching status #978

sickel opened this issue Jul 10, 2024 · 3 comments

Comments

@sickel
Copy link

sickel commented Jul 10, 2024

I would love to have the possiblilty to have a "latching" status. That is, when the status is set to anything else than OK, it stays that way even if the logged entitiy itself goes back to a normal status.

My use case: Some of the systems I am monitoring have an integrated Door Open alarm. I can easily check that in nagios, but I want to know not only if a door is open, but also if a door has been open. I am storing state information, but it would be easier to see the alarm directly in my nagios dashboard.

I am sure this feature also could be useful for logging various "should not happen" cases that may indicate problems even if the problem itself went away,

@everwatch
Copy link

Two solutions.

  1. Put an event handler on the service that disables the service on a Door Open state. This way, it simply won't check again until someone manually reactivates the check.

  2. Send a notification. Let the humans know something happened.

@Rfferrao87
Copy link
Contributor

Isn't that merely a passive check with the freshness interval unset?

@everwatch
Copy link

The passive check with no freshness interval would work, but only if the device can send Nagios the information (like an SNMP trap). If Nagios has to perform an active check to get the information, then there is no way to "latch" the state and keep it that way unless you disable further checks of the service after it hits a warning/critical state.

That's why my recommendation is for an event handler to fire off that uses the Nagios API (or CMD file) to disable further checks of the service if the service is in a non-OK state. But a passive check could work, since we're talking about security events, which are hard to poll for, but easy to submit passive results.

Personally, I think the real solution to "I want to know if an event has occurred, even if it's not currently occurring," is to send a notification. That is, after all, what they're for. Plus, it requires zero extra work to make a janky latch state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants