Added check_multiple_host_addresses as I stil had that laying around somewhere
This commit is contained in:
40
README.md
40
README.md
@@ -26,14 +26,48 @@ is indifferent of which version of procps (to date) is used. No other changes
|
||||
were made to the script.
|
||||
|
||||
|
||||
plugins/plugins/check_multiple_host_addresses
|
||||
---------------------------------------------
|
||||
This script is a first attempt to monitor multi-home and dual-stack (i.e. ipv4
|
||||
and ipv6) servers. In my setup a server should only considered availble if it is
|
||||
available on all of its primary addresses (i.e. both ipv4 and ipv6). It uses the
|
||||
excellent check_multi script to perform multiple a ping check to see if a host
|
||||
is available and reports the consolidated status. Using check_multi has the
|
||||
advantage that pnp4nagios and other scripting graphing solutions will support
|
||||
this solution as well.
|
||||
|
||||
Installation is straightforward, after installing the script on your server, add
|
||||
the following to your `commands.cmd` configuration file to make it available:
|
||||
~~~
|
||||
# 'check-host-alive' command definition for multi-homed/dual-stack servers
|
||||
define command{
|
||||
command_name check-addresses-alive
|
||||
command_line [install_path]/plugins/check_multiplehost_addresses '$HOSTADDRESS$' '$_HOSTADDRESS6$'
|
||||
}
|
||||
~~~
|
||||
The example above assumes that the IPv6 address of the host is provided as part
|
||||
of the host configuration, i.e.:
|
||||
~~~
|
||||
define host {
|
||||
...
|
||||
address 192.168.0.1
|
||||
_address6 fdf8:f340:ab9d:c213::1
|
||||
...
|
||||
}
|
||||
~~~
|
||||
To use the script either add ` check_command check-addresses-alive`
|
||||
to the specific hosts that should use the check or to the generic host used as
|
||||
template.
|
||||
|
||||
|
||||
cgi-bin/nagiosstatus.sh
|
||||
-----------------------
|
||||
Very simplistic CGI-BIN script that checkes whether nagios is still running and
|
||||
still updating its status. It wil always return an HTTP Status 200 (OK) and a
|
||||
simple text page with one of the following texts:
|
||||
- STOPPED - in case the nagios process is not running
|
||||
- STALLED - in case the nagios status file has not been updated for 5 minutes
|
||||
- OK - when Nagios is running and updated its status file < 5 minutes ago
|
||||
- `STOPPED` - in case the nagios process is not running
|
||||
- `STALLED` - in case the nagios status file has not been updated for 5 minutes
|
||||
- `OK` - when Nagios is running and updated its status file < 5 minutes ago
|
||||
|
||||
I wrote this script to be used with an external monitoring system, I use it with
|
||||
the free subscription from [Pingdom](http://www.pingdom.com) to get alerts when
|
||||
|
||||
Reference in New Issue
Block a user