aboutsummaryrefslogtreecommitdiff
path: root/doc/ping903q.1
diff options
context:
space:
mode:
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/ping903q.1
parentde8778ee1a6139cc1c117c06058d7004cae01d50 (diff)
downloadping903-ab4bab1eb5cfaa9c7e51c14667d300f491009b80.tar.gz
ping903-ab4bab1eb5cfaa9c7e51c14667d300f491009b80.tar.bz2
Implement nagios check mode in ping903q
Diffstat (limited to 'doc/ping903q.1')
-rw-r--r--doc/ping903q.174
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"
.SH NAME
ping903q \- ping903 query tool
.SH SYNOPSIS
\fBping903q\fR\
[\fB\-hVv\fR]\
- [\fB\-c \fIFILE\fR]\
+ [\fB\-f \fIFILE\fR]\
[\fIIP\fR]
+
+or
+
+\fBping903q\fR\
+ [\fB\-f \fIFILE\fR]\
+ \fB\-H \fIHOST\fR\
+ \fB\-c \fIRTA\fB,\fIPCT\fB%\fR\
+ \fB\-w \fIRTA\fB,\fIPCT\fB%\fR
.SH DESCRIPTION
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
+programs.
.SH EXIT CODE
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.
.PP
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.
.PP
-Other possible exit codes are:
-.TP
-.B 64
-Command line usage error.
-.TP
-.B 65
-Data format error. The returned JSON is malformed.
-.TP
-.B 69
-Service unavailable. This means some error occurred, which will be
-diagnosed on the standard error.
-.TP
-.B 70
-Internal software error.
+Exit codes in nagios check mode:
.TP
-.B 71
-System error (e.g. error reading from socket or the like).
+.B 0
+Success
.TP
-.B 76
-Protocol error when talking to the daemon.
+.B 1
+Warning condition.
.TP
-.B 78
-Error in configuration file.
+.B 2
+Critical condition.
+.PP
+If any error is encountered, \fBping903q\fR exits with status \fB3\fR.
.SH OPTIONS
.TP
-\fB\-c \fIFILE\fR
+\fB\-f \fIFILE\fR
Read configuration from \fIFILE\fR instead of from the default
.BR /etc/ping903.conf .
.TP
@@ -86,8 +88,28 @@ Print program version, copyright information, and exit.
.TP
.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.
+.TP
+\fB\-H \fIHOST\fR
+Sets host name or IP address to query for.
+.TP
+\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.
+.TP
+\fB\-w \fIRTA\fB,\fIPCT\fB%\fR
+Sets the warning threshold value. See above for the discussion of the
+arguments.
.SH SEE ALSO
-.BR ping903 (8).
+.BR ping903 (8),
+.BR Nagios <https://www.nagios.org/>.
.SH COPYRIGHT
Copyright \(co 2020 Sergey Poznyakoff
.br

Return to:

Send suggestions and report system problems to the System administrator.