[Xymon] host grepping

Jeremy Laidman jlaidman at rebel-it.com.au
Tue Jan 14 06:27:54 CET 2014


On 10 January 2014 10:01, Galen Johnson <Galen.Johnson at sas.com> wrote:

> Feature request: It would be handy to have xymongrep handle more than just
> test lookups to save some scripting time.  I think it would be awesome if
> it was extended to allow you to reference a host and have it return the
> tests for just that host (especially when it may be spread across multiple
> entries) and allow an argument to get the CLIENT, NAME or other modifier as
> needed.
>

Does this help:

$ $XYMON $XYMSRV 'hostinfo host=^hostname'
hostname.example.com
|192.168.67.101|testip|delayred=dns:15,conn:15|delayyellow=dns:10,conn:10|dns=SOA:
example.com|TRENDS:*,vmstat:vmstat\pvmstat3


>From the "xymon" man page:

       hostinfo [CRITERIA]
              Retrieves the current configuration of a  host  (i.e.
              the  hosts.cfg(5) definition). CRITERIA selects which
              host(s) to report, and is identical to  the  CRITERIA
              in the xymondboard command.

              The  response  is one line for each host that matches
              the CRITERIA, or all hosts if no criteria  is  speci-
              fied.  The  line  is  composed of a number of fields,
              separated by a pipe-sign. The first two  fields  will
              always  be  the  hostname  and  the  IP-address.  The
              remaining fields - if any - are the hosts.cfg tags in
              no particular order.

I like this one because a client can query its own configuration remotely,
or the test and configuration functions of the Xymon server can
(potentially) be distributed.

J
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20140114/1b322d41/attachment.html>


More information about the Xymon mailing list