Skip to content
Snippets Groups Projects
Commit 50027ec1 authored by Thomas Bellman's avatar Thomas Bellman
Browse files

Proper help text for check_ping_multiaddr plugin.

parent a652e175
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,32 @@ ...@@ -9,7 +9,32 @@
__doc__ = """\ __doc__ = """\
Check that one or more IP addresses responds to ping. Check that one or more IP addresses responds to ping.
Both IPv4 and IPv6 can be checked at the same time. The intent of this Nagios plugin is to check that a host is alive and
reachable on all of its addresses, in particular both IPv4 and IPv6
addresses, which can be tested at the same time.
Addresses can be specified either as numeric IP addresses, or as host
names that will be resolved at runtime. By default, only the first
address the resolver library returns for each host name will be used,
but the -A/--all flag will cause all of the addresses returned by the
resolver to be used. You need to give at least one of --ipv4 or --ipv6,
but both can be specified at the same time.
Note that Nagios does not allow you to declare multiple addresses for
a host. To use this in a check_command for a host, you need to either
let %prog resolve addresses at runtime (thus depending on
DNS), or you need to generate a unique command declaration for each
host; something like:
define host {
host_name smurf
address 198.51.100.23
check_command check-host-alive::smurf
}
define command {
command_name check-host-alive::smurf
command_line $USER1$/check_ping_multiaddr -A46 -- 198.51.100.23 2001:db8:4711:17::1:23
}
""" """
__version__ = '<#VERSION#>' __version__ = '<#VERSION#>'
...@@ -41,6 +66,7 @@ class Options(optparse.OptionParser): ...@@ -41,6 +66,7 @@ class Options(optparse.OptionParser):
optparse.OptionParser.__init__( optparse.OptionParser.__init__(
self, self,
usage="%prog {-4|-6} [options] -- address ...", usage="%prog {-4|-6} [options] -- address ...",
formatter=trh_nagioslib.NoReflowHelpFormatter(),
version=__version__, version=__version__,
description=__doc__) description=__doc__)
self.add_option( self.add_option(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment