[Xymon] config report from command line?
Mills, David (IS)
David.Mills at ngc.com
Fri Jun 7 20:38:18 CEST 2013
I've written a Perl program to parse and maintain the files associated with hosts.cfg in our installation. As part of that program, I've written a couple of routines that parse out and report on host/page "matches" in alerts.cfg.
The parsing routine is not comprehensive of all allowable syntax for alerts.cfg (e.g. it's not up to digesting line continuations, interpreting macros, etc.), and it assumes the presence of certain comment lines embedded in the file, used in our environment to identify groupings of alerts associated with our teams. We use this mostly to see which hosts/pages belong to which teams. It does not dump out the actual mailing rules, though that would be a simple mod.
If you are interested in seeing some of that code, please contact me.
Sample output from one such run:
~/hobbit> ./hobcfgadm.pl --dump-alerts
TEAM: C & C
Matches (name fragment): xwrl0(0[6-9]|1)
TEAM: Content Management
Matches (name fragment): (xwau02|ccp)
Matches (name fragment): (awdu|xwdu)
From: Xymon [xymon-bounces at xymon.com] on behalf of john.r.rothlisberger at accenture.com [john.r.rothlisberger at accenture.com]
Sent: Friday, June 07, 2013 12:37 PM
To: martin.flemming at desy.de; xymon at xymon.com
Subject: EXT :Re: [Xymon] config report from command line?
Although those modules look like they could be interesting the documentation is useless or non-existent.
I would be happy to share once I get something useful put together.
Upcoming PTO: None
IT Strategy, Infrastructure & Security - Technology Growth Platform
TGP for Business Process Outsourcing
> -----Original Message-----
> From: Xymon [mailto:xymon-bounces at xymon.com] On Behalf Of Martin
> Sent: Friday, June 07, 2013 8:46 AM
> To: xymon at xymon.com
> Subject: Re: [Xymon] config report from command line?
> On Fri, 7 Jun 2013, john.r.rothlisberger at accenture.com wrote:
> > I am currently using Xymon 4.3.0 (Yeah, I know, I need to upgrade) on Ubuntu
> > I am writing a perl script to parse my configuration and send it in a
> > spreadsheet format. I have been able to get through most everything but I want
> to include who gets alerted (or what scripts). But, I have not found an easy way to
> do this from the command line. Has anyone else tried this or have ideas?
> > I have tried using wget to get configreport.sh and then html2text but
> > this is not easily parsed either. This cannot be done by just grepping through the
> alerts.cfg file as a host may be defined in multiple rules (HOST=*server*,
> HOST=testserver, PAGE=TEST, etc).
> Hi !
> Maybe you find somthing useful on this side
> .. by the way, i'm interesting for your script :-)
This message is for the designated recipient only and may contain privileged, proprietary, or otherwise confidential information. If you have received it in error, please notify the sender immediately and delete the original. Any other use of the e-mail by you is prohibited.
Where allowed by local law, electronic communications with Accenture and its affiliates, including e-mail and instant messaging (including content), may be scanned by our systems for the purposes of information security and assessment of internal compliance with Accenture policy.
Xymon mailing list
Xymon at xymon.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Xymon