i have a hostalive check_command in place in the hosts file.
I am using ssh keys to run nagios plugins. so ssh’ing to all servers to run checks.
I would like to “NOT” run a check on a server if the hostalive doesnt work, ie a server is flagged as down or host state is down, or invalid hostname etc…
in the ssh check ive added a line
assign where host.state == “Up”
but this dosnt work. does anyone know how to stop a check from running if the server is down ? or unreachable.
am getting
check_by_ssh: Invalid hostname/address - lvap00006123
Give as much information as you can, e.g.
- Version used r2.9.1-1
- Operating System and version redhat Platform version: 7.9 (Maipo)
- Enabled features Enabled features: api checker graphite ido-mysql mainlog notification
- Icinga Web 2 version and modules 2.6.1
config is good.