path: root/doc
diff options
authorSergey Poznyakoff <gray@gnu.org>2020-02-13 11:40:55 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-02-13 11:40:55 +0200
commitab4bab1eb5cfaa9c7e51c14667d300f491009b80 (patch)
tree1a5aeedffef0c35f7fdfd86f65ccdc4f0fc9fad1 /doc
parentde8778ee1a6139cc1c117c06058d7004cae01d50 (diff)
Implement nagios check mode in ping903q
Diffstat (limited to 'doc')
1 files changed, 48 insertions, 26 deletions
diff --git a/doc/ping903q.1 b/doc/ping903q.1
index 3a2a91a..6e024d7 100644
--- a/doc/ping903q.1
+++ b/doc/ping903q.1
@@ -13,14 +13,22 @@
.\" You should have received a copy of the GNU General Public License
.\" along with Ping903. If not, see <http://www.gnu.org/licenses/>.
-.TH PING903Q 8 "February 12, 2020" "PING903Q" "User Commands"
+.TH PING903Q 8 "February 13, 2020" "PING903Q" "User Commands"
ping903q \- ping903 query tool
- [\fB\-c \fIFILE\fR]\
+ [\fB\-f \fIFILE\fR]\
+ [\fB\-f \fIFILE\fR]\
+ \fB\-H \fIHOST\fR\
+ \fB\-c \fIRTA\fB,\fIPCT\fB%\fR\
+ \fB\-w \fIRTA\fB,\fIPCT\fB%\fR
Queries monitoring statistics from the \fBping903\fR daemon. When
used with a single argument (\fIIP\fR), displays information about
@@ -41,40 +49,34 @@ exists, it will look obtain the socket address from the \fBlisten\fR
statement. See
.BR ping903.conf (5),
for detailed description of the configuration file.
+.SS Nagios check mode
+When the \fB\-H\fR, \fB\-c\fR, and \fB\-w\fR options are used, the
+program enters \fINagios check mode\fR. In this mode its output
+complies with the requirements for external \fBNagios\fR check
When called with one argument, the program exits with code 0 (success)
-if the IP is alive and 1 otherwise.
+if the IP is alive and 2 otherwise.
When called without arguments, the program exits with code 0 if all
-monitored IP addresses are alive, 1 if none of them is reachable and 2
+monitored IP addresses are alive, 2 if none of them is reachable and 1
if some of them are.
-Other possible exit codes are:
-.B 64
-Command line usage error.
-.B 65
-Data format error. The returned JSON is malformed.
-.B 69
-Service unavailable. This means some error occurred, which will be
-diagnosed on the standard error.
-.B 70
-Internal software error.
+Exit codes in nagios check mode:
-.B 71
-System error (e.g. error reading from socket or the like).
+.B 0
-.B 76
-Protocol error when talking to the daemon.
+.B 1
+Warning condition.
-.B 78
-Error in configuration file.
+.B 2
+Critical condition.
+If any error is encountered, \fBping903q\fR exits with status \fB3\fR.
-\fB\-c \fIFILE\fR
+\fB\-f \fIFILE\fR
Read configuration from \fIFILE\fR instead of from the default
.BR /etc/ping903.conf .
@@ -86,8 +88,28 @@ Print program version, copyright information, and exit.
.B \-v
Turn on verbose output.
+.SS Options valid in Nagios check mode
+The presense of any of these options switches \fBping903q\fR to Nagios
+check mode. For this mode to succeed, all three options must be specified.
+\fB\-H \fIHOST\fR
+Sets host name or IP address to query for.
+\fB\-c \fIRTA\fB,\fIPCT\fB%\fR
+Sets the critical threshold value. \fIRTA\fR is the round-trip
+average and \fIPCT\fR is the package loss percentage values. The
+critical condition is entered if either the returned round-trip
+average becomes greater than or equal to \fIRTA\fR or the lost package
+percentage becomes greater than or equal to \fIPCT\fR. Note that both
+parts must be present and must be valid floating-point numbers. Note
+also that the use of the percent sign is mandatory.
+\fB\-w \fIRTA\fB,\fIPCT\fB%\fR
+Sets the warning threshold value. See above for the discussion of the
-.BR ping903 (8).
+.BR ping903 (8),
+.BR Nagios <https://www.nagios.org/>.
Copyright \(co 2020 Sergey Poznyakoff

Return to:

Send suggestions and report system problems to the System administrator.