Hi All,
I have a NagiosXI demo (free) edition for testing in our lab and stumbled upon a strange behavior.
I've created different dummy host with:
name: dummy xx
IP: 127.0.0.1
check_command: check_dummy
now for testing I'm passing to the check_command the params "1" and "the host is DOWN"
(check_dummy!1!"the host is DOWN")
but in nagios (tatical view or host, host problems etc) the host always shows up as "UP" (OK).
what am I missing ?
Thanks,
Davide
Wrong Host State with dummy check
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Wrong Host State with dummy check
For hosts you want to pass 2 to check_dummy
Code: Select all
check_dummy!2!"the host is DOWN"
-
- Posts: 7
- Joined: Thu Nov 08, 2012 9:34 am
Re: Wrong Host State with dummy check
Yes, that's right ... for UNREACHABLE .... but why is 1=DOWN not working ?
from docs i see:
$HOSTSTATEID$ A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.
from docs i see:
$HOSTSTATEID$ A number that corresponds to the current state of the host: 0=UP, 1=DOWN, 2=UNREACHABLE.
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Wrong Host State with dummy check
You are confusing the $HOSTSTATEID$ macro with plugin Return Code
Here is the documentation for plugin Return Code
https://assets.nagios.com/downloads/nag ... inapi.html
Here is the documentation for plugin Return Code
https://assets.nagios.com/downloads/nag ... inapi.html
Return Code
Note: If the use_aggressive_host_checking option is enabled, return codes of 1 will result in a host state of DOWN or UNREACHABLE. Otherwise return codes of 1 will result in a host state of UP. The process by which Nagios Core determines whether or not a host is DOWN or UNREACHABLE is discussed here.
-
- Posts: 7
- Joined: Thu Nov 08, 2012 9:34 am
Re: Wrong Host State with dummy check
Thousand Thanks !!!
that was what i was looking for!
once set use_aggressive_host_checking = 1 I'm getting may host down event.
Cheers!
that was what i was looking for!
once set use_aggressive_host_checking = 1 I'm getting may host down event.
Cheers!
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Wrong Host State with dummy check
Great!davide.galletti.75 wrote:Thousand Thanks !!!
that was what i was looking for!
once set use_aggressive_host_checking = 1 I'm getting may host down event.
Cheers!
Locking