Hi all,
Is this possible?
I define a service in Nagios, and the service status is dependent on multiple NSCA checks.
If any of the NSCA checks report a problem, the service state is changed to WARNING/CRITICAL. But I want to make sure that a check result does not override the result from another service check.
What I'm looking for is something like a pre process for a host/service check. Is this possible?
thanks!
sahina
Multiple nsca check results for same service
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Multiple nsca check results for same service
Setup a seperate service for each, and use the check_cluster plugin to create the check you are interested in
Re: Multiple nsca check results for same service
Thanks. That's one possible option, but we wanted to avoid multiple service definitions. So were looking for other alternatives to achieve this.
We created a plugin that's executed whenever it receives a syslog alert message for an app. This changes the app service status using nsca. The alerts could be for different conditions, and each time the nsca receives the service result, we would like to compare with the previous result and append or change as needed.
Any other suggestions on how to hook into the process check result command?
We created a plugin that's executed whenever it receives a syslog alert message for an app. This changes the app service status using nsca. The alerts could be for different conditions, and each time the nsca receives the service result, we would like to compare with the previous result and append or change as needed.
Any other suggestions on how to hook into the process check result command?
Re: Multiple nsca check results for same service
As this is a passive, local check (to the host), I would suggest saving the last few checks (before or at the same time as sending the result) in a text file for your script to compare against. Otherwise, you could try to use one of the nagios apis to check the previous state of the check in your plugin - using the json cgis (requires 4.0.4) or scraping the html cgis (fun with regex).
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.