From d69e51f571a3277dff8d3d374521b5902e1a6e5c Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 5 Mar 2020 11:39:29 +0200 Subject: ping903q: improve output in Nagios mode; treat initial state as OK New option -N is provided to treat the initial state as UNKNOWN as in previous versions. --- doc/ping903q.1 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/ping903q.1 b/doc/ping903q.1 index 5da343d..84bd850 100644 --- a/doc/ping903q.1 +++ b/doc/ping903q.1 @@ -13,7 +13,7 @@ .\" .\" You should have received a copy of the GNU General Public License .\" along with Ping903. If not, see . -.TH PING903Q 1 "February 27, 2020" "PING903Q" "User Commands" +.TH PING903Q 1 "March 5, 2020" "PING903Q" "User Commands" .SH NAME ping903q \- ping903 query tool .SH SYNOPSIS @@ -24,6 +24,7 @@ ping903q \- ping903 query tool [\fIIP\fR] .PP \fBping903q\fR\ + [\fB\-N\fR]\ [\fB\-f \fIFILE\fR]\ [\fB\-p \fIPREFIX\fR]\ [\fB\-R \fIREALM\fR]\ @@ -83,7 +84,7 @@ request, without sending unauthorized request first and consulting the reply. .SH EXIT CODE When called with one argument, the program exits with code 0 (success) -if the IP is alive and 2 otherwise. +if the IP is alive, 2 if it is not, and 3 if the host status is unknown. .PP When called without arguments, the program exits with code 0 if all monitored IP addresses are alive, 2 if none of them is reachable and 1 @@ -99,6 +100,16 @@ Warning condition. .TP .B 2 Critical condition. +.TP +.B 3 +Unknown. This code is returned in the following cases: (1) the host +is not monitored by the +.B ping903 +server, (2) the server replied with a HTTP code other than 200 or the +reply was otherwise non-compliant, and (3) if the server has not +yet collected enough data for that host and the command line option +.B \-N +was given. .PP In match mode, the program exits with code 0 if the requested host is monitored by the server, and with code 2 if it is not. @@ -155,6 +166,11 @@ arguments. .PP Other options valid in this mode: .TP +\fB\-N\fR +By default hosts in initial state (i.e. for which no data has been +collected) are treated as "OK" (exit status 0). This option changes +the default to treat them as "UNKNOWN" (exit status 3). +.TP \fB\-p \fIPREFIX\fR Supplies the prefix to be displayed before Nagios status string. The default is "PING". The \fIPREFIX\fR string can contain the -- cgit v1.2.1