<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
Martin --<br>
<br>
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.<br>
<br>
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.<br>
<br>
If you are interested in seeing some of that code, please contact me.<br>
<br>
Sample output from one such run:<br>
<br>
<blockquote><font face="Courier New" size="2">~/hobbit> ./hobcfgadm.pl --dump-alerts<br>
Vers 2.44<br>
TEAM: C & C<br>
HOST:<br>
Matches (name fragment): xwrl0(0[6-9]|1[01])<br>
<br>
TEAM: Content Management<br>
HOST:<br>
Matches (name fragment): (xwau02[23]|ccp)<br>
<br>
TEAM: DBA's<br>
HOST:<br>
Matches (name fragment): (awdu|xwdu)<br>
<br>
TEAM: EA <br>
PAGE:<br>
Matches: Winters/urls_dev/prodfix_websvcs<br>
Matches: Winters/urls_dev/sit1_websvcs<br>
Matches: Winters/urls_dev/sit2_websvcs<br>
Matches: Winters/urls_dev/uat1_websvcs<br>
Matches: Winters/urls_dev/uat2_websvcs<br>
...<br>
</font></blockquote>
<br>
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~<br>
David Mills<br>
Systems Administrator<br>
Northrop Grumman<br>
(512) 873-6665<br>
<br>
________________________________________<br>
From: Xymon [xymon-bounces@xymon.com] on behalf of john.r.rothlisberger@accenture.com [john.r.rothlisberger@accenture.com]<br>
Sent: Friday, June 07, 2013 12:37 PM<br>
To: martin.flemming@desy.de; xymon@xymon.com<br>
Subject: EXT :Re: [Xymon] config report from command line?<br>
<br>
Although those modules look like they could be interesting the documentation is useless or non-existent.<br>
<br>
I would be happy to share once I get something useful put together.<br>
<br>
Thanks,<br>
John<br>
Upcoming PTO: None<br>
_____________________________________________________________________<br>
John Rothlisberger<br>
IT Strategy, Infrastructure & Security - Technology Growth Platform<br>
TGP for Business Process Outsourcing<br>
Accenture<br>
312.693.3136 office<br>
_____________________________________________________________________<br>
<br>
> -----Original Message-----<br>
> From: Xymon [mailto:xymon-bounces@xymon.com] On Behalf Of Martin<br>
> Flemming<br>
> Sent: Friday, June 07, 2013 8:46 AM<br>
> To: xymon@xymon.com<br>
> Subject: Re: [Xymon] config report from command line?<br>
><br>
> On Fri, 7 Jun 2013, john.r.rothlisberger@accenture.com wrote:<br>
><br>
> > I am currently using Xymon 4.3.0 (Yeah, I know, I need to upgrade) on Ubuntu<br>
> 12.04LTS.<br>
> ><br>
> > I am writing a perl script to parse my configuration and send it in a<br>
> > spreadsheet format. I have been able to get through most everything but I want<br>
> to include who gets alerted (or what scripts). But, I have not found an easy way to<br>
> do this from the command line. Has anyone else tried this or have ideas?<br>
> ><br>
> > I have tried using wget to get configreport.sh and then html2text but<br>
> > this is not easily parsed either. This cannot be done by just grepping through the<br>
> alerts.cfg file as a host may be defined in multiple rules (HOST=*server*,<br>
> HOST=testserver, PAGE=TEST, etc).<br>
> ><br>
><br>
><br>
> Hi !<br>
><br>
> Maybe you find somthing useful on this side<br>
><br>
> http://sourceforge.net/apps/mediawiki/xymon/index.php?title=Perl_Library_Discuss<br>
> ion<br>
><br>
> .. by the way, i'm interesting for your script :-)<br>
><br>
> cheers,<br>
><br>
> Martin<br>
<br>
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.<br>
<br>
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.<br>
<br>
______________________________________________________________________________________<br>
<br>
www.accenture.com<br>
<br>
_______________________________________________<br>
Xymon mailing list<br>
Xymon@xymon.com<br>
http://lists.xymon.com/mailman/listinfo/xymon<br>
</body>
</html>