aboutsummaryrefslogtreecommitdiff
path: root/.gitignore
AgeCommit message (Collapse)AuthorFiles
2020-03-07Simplify entry point structure.Sergey Poznyakoff1
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.
2020-02-11Initial commitSergey Poznyakoff1

Return to:

Send suggestions and report system problems to the System administrator.