Anyways, as I've been coding away I've been reading different documentation about the exit code, specifically when used with a host object. This documentation dictates:
http://nagios.sourceforge.net/docs/3_0/ ... .html#host
So for an UP or STANDBY state I will return an exit code of 0. And then for a DOWN state then I would return an exit code of 1,2 or 3 or really any number that is not 0.check_command: This directive is used to specify the short name of the command that should be used to check if the host is up or down. Typically, this command would try and ping the host to see if it is "alive". The command must return a status of OK (0) or Nagios will assume the host is down.
With SERVICES, 1=Warning, 2=Critical and 3=Unknown.
So this got me thinking about the ping check used to determine if a host is up or down. I had a look at a Core 4.0.8 box I have here and it provides some sample check commands, for example:
Code: Select all
define command{
command_name check-host-alive
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w 3000.0,80% -c 5000.0,100% -p 5
}
I know from a performance data perspective we need warning and critical, but once again in relation to a host object there is no warning or critical.
When you look at the Tactical Overview screen, for hosts there is no Warning or Critical grouping, it's Down, Unreachable, Up and Pending.
Which makes me thing some more. In relation to the Unreachable grouping, does this only occur from within the Core logic in relation to parents, or is there an exit code you can use that defines the Unreachable state?
Like the topic says, this is just a discussion if people are interested in participating in.