aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2020-03-07 09:48:38 +0200
committerSergey Poznyakoff <gray@gnu.org>2020-03-07 12:13:39 +0200
commitf6769c969ee779c43ab0df18f7388b9d5a307f96 (patch)
tree8d976ee0f482d33528898ebe89723f6cb02adec4 /doc
parent417659b757afc85fc437f3da462c09a4b86c1282 (diff)
downloadping903-f6769c969ee779c43ab0df18f7388b9d5a307f96.tar.gz
ping903-f6769c969ee779c43ab0df18f7388b9d5a307f96.tar.bz2
Simplify entry point structure.
The /ip entry point is gone. The /hosts entry point accepts new query arguments: (1) select=LIST, which introduces a list of IP addresses (hostnames) to query and (2) attr=LIST - a list of attributes to return in each stat object. In both cases, LIST is a comma-separated list of values. The "select" argument can be used together with explicit host (/hosts/IP?select=LIST), which is equivalent to /hosts/?select=IP,LIST. The /match entry point takes the "select" query argument as well. It return array of match objects. Each match object contains at least the following attributes: - name: original host name used in the request - hosts: array of monitored host names or IPs corresponding to that name, (can be empty). If an error occurred (e.g. host name cannot be resolved) the "error" attribute contains the textual description of the error. The ping903q utility now accepts one or more IP addresses as arguments in all modes, except nagios check. The statistics or matches for each IP are returned separately. * README: Document changes. * doc/ping903q.1: Likewise. * src/ping903.c (http_log): Log query arguments, if any. (ept_host_stat): Accept query arguments: select and attr. Return array of stat objects. (ept_ip_stat): Remove. (ept_ip_match): Accept query arguments: select. Rewrite output. (endpoint): Remove /ip * src/ping903.h (get_ipaddr_stat): Remove. (get_host_matches): Change signature. * src/ping903q.c (HTTP_BUF_INITIALIZER): New macro. (http_buf_init, http_buf_free): New functions. (query_host,match_host): Removed. (query_hosts,match_hosts): Removed. (query_host_nagios): New function. * src/pinger.c (get_ipaddr_stat): Remove. (hostping_match): New function. (get_host_matches): Rewrite.
Diffstat (limited to 'doc')
-rw-r--r--doc/ping903q.112
1 files changed, 6 insertions, 6 deletions
diff --git a/doc/ping903q.1 b/doc/ping903q.1
index 84bd850..c724043 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 <http://www.gnu.org/licenses/>.
-.TH PING903Q 1 "March 5, 2020" "PING903Q" "User Commands"
+.TH PING903Q 1 "March 6, 2020" "PING903Q" "User Commands"
.SH NAME
ping903q \- ping903 query tool
.SH SYNOPSIS
@@ -21,7 +21,7 @@ ping903q \- ping903 query tool
[\fB\-hVv\fR]\
[\fB\-f \fIFILE\fR]\
[\fB\-R \fIREALM\fR]\
- [\fIIP\fR]
+ [\fIIP\fR...]
.PP
\fBping903q\fR\
[\fB\-N\fR]\
@@ -37,10 +37,10 @@ ping903q \- ping903 query tool
[\fB\-R \fIREALM\fR]\
\fB\-m\fR
.SH DESCRIPTION
-Queries monitoring statistics from the \fBping903\fR daemon. When
-used with a single argument (\fIIP\fR), displays information about
-this particular IP address. Used without arguments, displays
-statistics about all IP addresses monitored by the running daemon.
+Queries monitoring statistics from the \fBping903\fR daemon. Used
+with argumentst (\fIIP\fR...), displays information about the supplied
+IP addresses. Used without arguments, displays statistics about all
+IP addresses monitored by the running daemon.
.PP
By default a one-line summary is displayed, which informs about the IP
and its current status ("alive" vs. "not alive"). Additional

Return to:

Send suggestions and report system problems to the System administrator.