[Xymon] Does xymongrep work?

John Thurston john.thurston at alaska.gov
Sat Feb 13 00:36:42 CET 2016


On 2/12/2016 1:44 PM, J.C. Cleaver wrote:
>
>
> On Fri, February 12, 2016 1:47 pm, John Thurston wrote:
>> I'm having difficulty with xymongrep, and it isn't related to 4.3.25
>> because I see the same behavior on 4.3.22.
>>
>> If I use the command:
>>    ~/server/bin/xymongrep --debug --hosts=./server/etc/hosts.cfg  *
- snip -
> Have you tried escaping the '*'? It's possible your shell is eating it off
> the command line.

Bingo!  Thank you.

Now the issue is, xymongrep does not seem to be .default. aware. So if I 
have a noconn tag on a specific host, I can xymongrep for it. But if 
that noconn tag on a .default. line, nothing is found even if it affects 
a hundred hosts :(  It is parsing enough to handle 'include' but not 
enough to handle '.default.'.

And what is up with its case-sensitivity?

On Solaris, a xymongrep for noprop* matches
   "NOPROPRED::+msgs" and "nopropyellow:+msgs"

But a xymongrep for client* returns nothing, while a xymongrep for 
CLIENT* finds a whole bunch of hosts with upper-cased tags.

On Linux (4.3.17), the matching all appears to be case-insensitive.

I'm probably going to scrap trying to use xymongrep for the task at 
hand. I've lived this long without it, it won't hurt me to to a little 
longer :)



FWIW, the man page doesn't match the source code. man offers:
> xymongrep [--noextras] [--test-untagged] [--web] [--net] [--loadhostsfromxymond] TAG [TAG...]

while the source shows xymongen also handling:
   --help
   --no-down
   --version
   --hosts
Maybe these are intentionally un-doumented, but --hosts is pretty darned 
useful.

Also FWIW, the --loadhostsfromxymond may not be port-aware. When I try 
to use it on my linux box (4.3.17), the debug output indicates it is 
trying to talk to the "Xymon daemon" on port 1984. It does not succeed 
because my xymon is listening on port 1985. When I then prefix the 
xymongrep with a xymoncmd, it seems to refuse to honor the 
--loadhostsfromxymond tag and insists on loading from the hosts.cfg.


-- 
    Do things because you should, not just because you can.

John Thurston    907-465-8591
John.Thurston at alaska.gov
Enterprise Technology Services
Department of Administration
State of Alaska



More information about the Xymon mailing list