HOSTCHECK

Description

Used by gatemon program. Test the availability of a specified host.

Command

Hostcheck [-h|i|o] [-v] [-c <CheckHost>] [-t <Type>] <Host> <MaxWait> <MaxTries>-h: The host address must be resolved using hosts file
-i: The host address is an IP address
-o: The host address must be resolved using the object database
-v: Force Verbosity to stdout
-c: Check <CheckHost> through <Host> instead of <Host>-t: set a type of check (string used in the state file name, must not contain '/')
-q: Do not raise a system alarm
<Host>: The host to check. Can be an IP address, a resolvable host or an object depending on the configuration parameter Resolve in ConfigFiles/route at section [Config]
<MaxWait>: maximum time to wait for the response to the "ping" test before considering it a failure. Must be >=1 and <=10 (expressed in seconds)
<MaxTries>: maximum number of "ping" tries before returning that the host is considered DOWN or inactive. Must be >=1 and <=10

Results

Returns 0|1|2|3 0 : if there has been NO change in the state of the checked host 1 : if there HAS been a change in the state of the checked host and it is UP 2 : if there HAS been a change in the state of the checked host and it is DOWN 3 : for invalid argument

Example