Dummy check command?

Hi

I have a check_http command I use to see if a service on a remote machine is up.
It works, but then it always says the host is down, because it doesn’t return pings.

But I can’t make a service unless I assign a host to it.
But I can’t make a host without importing a host template.
And I can’t make a host template without assigning a check command.

It seems like I need a dummy check command for the host template that just returns OK.
How would I do this? Or, what should I be doing in this case?

Thanks

You can use any service check you like as the Host Check command; so long as
it returns a status 0 for when you consider the host to be up and accessible,
and a positive integer for when you consider the host to be down and
unavailable (host checks do not have warnign or critical thresholds like
service checks do, they are either “good” or “bad”).

Therefore nearly all service checks can be relatively easily substituted for
hostalive, depending on what you think is a useful check of whether the host
is actually alive. I quite often use the SSH check.

Antony.

1 Like

We use a dummy check on ALL hosts in our environment (I inherited this bonkers logic).

Our reasoning is slightly weird, they assign “PING” as a service, and only take action on service alerts, not host alerts.

We use the check_dummy plugin and apply it to hosts for their check on import from the Icinga Director module:

check_dummy: Could not parse arguments
Usage:
 check_dummy <integer state> [optional text]

check_dummy 0 is the command that’s executed in our instance; host always shows up, but if you only care about the service, then you’re good to go.

Especially useful when you need a host that’s just a container of services; we do this for wifi monitoring – each customer gets a host that is a container, and all of the APs get assigned to said container.