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.
define service {
service_description MySuperservice
hostgroup_name MyHostgroup
check_command Command_A!Command_B!Command_C
}
Service MySuperservice should give me a warning if its value goes over that of Command_B, yet it doesn't!
Command_B and Command_C have been tested, and are giving numeric and correct values as output.
While I can't find documentation that expressly forbids this type of check_command syntax - I've never seen it in use and would *NOT* expect it to work. Have you substituted numerical values in for Command_B and Command_C in your check_command? If you have and your check works I would say that the syntax of check_command is such that you can't do what you want.
Thank you both for the help.
I can confirm the Command_B and Command_C are both working stand alone and returning numerical value. I can confirm Command_A is working when fed with a numerical value.
I tried to look at check_cluster, but from what I've understood it only checks against a string ("OK", "WARNING" and so on), not a numeric value, am I wrong?
I'm not sure what you're doing specifically, but it appears to me that this application wreaks of facilitation of a custom plugin.
If not, writing a simple wrapper plugin to provide the modularity you're seeking would be trivial.
Re: check_cluster - I do believe it is just a big AND/OR wrapper for multiple services. I don't believe it will pass in thresholds like you're seeking.
melmoth wrote:Thank you both for the help.
I can confirm the Command_B and Command_C are both working stand alone and returning numerical value. I can confirm Command_A is working when fed with a numerical value.
I tried to look at check_cluster, but from what I've understood it only checks against a string ("OK", "WARNING" and so on), not a numeric value, am I wrong?
It checks the current state of the other services (0,1,2,3). It is not a if A is greater than B.
Probably check_multi is your next option to look at.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.