Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
nagios-plugins-trh
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Thomas Bellman
nagios-plugins-trh
Commits
50027ec1
Commit
50027ec1
authored
6 years ago
by
Thomas Bellman
Browse files
Options
Downloads
Patches
Plain Diff
Proper help text for check_ping_multiaddr plugin.
parent
a652e175
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
check_ping_multiaddr.py
+27
-1
27 additions, 1 deletion
check_ping_multiaddr.py
with
27 additions
and
1 deletion
check_ping_multiaddr.py
+
27
−
1
View file @
50027ec1
...
@@ -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
(
...
...
This diff is collapsed.
Click to expand it.
Thomas Bellman
@bellman
mentioned in commit
ff949118
·
6 years ago
mentioned in commit
ff949118
mentioned in commit ff949118a4c65c3cfe2d64bf5e9a2b2ae7aed206
Toggle commit list
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment