XML Parsing
list Jason Chambers
Does anyone know how I can go about parsing data out of an XML txt file and then including it into hobbit? That would be extremely cool if there is an easy way to do that. Jason Chambers IT Help Desk Associate GEOSOFT INC. freedom to explore T +X XXX.XXX.XXXX #344 F +X XXX.XXX.XXXX Visit our user-be8ce7065ec5@xymon.invalid
list Galen Johnson
Depending on the XML, you could do it with a perl script using one of the Perl XML modules (XML::Simple is pretty easy to use...here's an article on how to use it, http://articles.techrepublic.com.com/5100-10878_11-5363190.html). You'd just have to incorporate that into a monitor. =G=
▸
From: Jason Chambers [mailto:user-3fa671c0a30d@xymon.invalid]
Sent: Wednesday, December 02, 2009 9:41 AM
To: 'user-ae9b8668bcde@xymon.invalid'
Subject: [hobbit] XML Parsing
Does anyone know how I can go about parsing data out of an XML txt file and then including it into hobbit? That would be extremely cool if there is an easy way to do that.
Jason Chambers
IT Help Desk Associate
GEOSOFT INC.
freedom to explore
T +X XXX.XXX.XXXX #344
F +X XXX.XXX.XXXX
Visit our user-be8ce7065ec5@xymon.invalid
list Jerald Sheets
For what purposes and in what way? Are you wanting to use it as a config element? Are you wanting to search through it for a pattern match? With the open-ended scripting you can do in Hobbit, the *what* you are asking is a non-issue. The *how* based on the *why* is the important part. --- Jerald M. Sheets jr. On Wed, Dec 2, 2009 at 9:41 AM, Jason Chambers
▸
<user-3fa671c0a30d@xymon.invalid>wrote:
Does anyone know how I can go about parsing data out of an XML txt file and then including it into hobbit? That would be extremely cool if there is an easy way to do that. *Jason Chambers *IT Help Desk Associate *GEOSOFT INC. **freedom to explore *T +X XXX.XXX.XXXX #344 F +X XXX.XXX.XXXX Visit our user-be8ce7065ec5@xymon.invalid
list Jason Chambers
Thanks, I'll check it out. The XML file that Ironport puts out is pretty complex, so I'll see what happens.
▸
Jason Chambers
IT Help Desk Associate
GEOSOFT INC.
freedom to explore
T +X XXX.XXX.XXXX #344
F +X XXX.XXX.XXXX
Visit our user-be8ce7065ec5@xymon.invalid
▸
From: Galen Johnson [mailto:user-87f955643e3d@xymon.invalid] Sent: December-02-09 10:07 AM To: user-ae9b8668bcde@xymon.invalid Subject: [hobbit] RE: XML Parsing Depending on the XML, you could do it with a perl script using one of the Perl XML modules (XML::Simple is pretty easy to use...here's an article on how to use it, http://articles.techrepublic.com.com/5100-10878_11-5363190.html). You'd just have to incorporate that into a monitor. =G= From: Jason Chambers [mailto:user-3fa671c0a30d@xymon.invalid] Sent: Wednesday, December 02, 2009 9:41 AM To: 'user-ae9b8668bcde@xymon.invalid' Subject: [hobbit] XML Parsing Does anyone know how I can go about parsing data out of an XML txt file and then including it into hobbit? That would be extremely cool if there is an easy way to do that. Jason Chambers IT Help Desk Associate GEOSOFT INC. freedom to explore T +X XXX.XXX.XXXX #344 F +X XXX.XXX.XXXX
Visit our user-be8ce7065ec5@xymon.invalid<http://www.geosoft.com>;
list Jason Chambers
I want to parse the Ironport xml status file and make it useful... kinda looks like this:
<status build="phoebe 6.5.3-007" hostname="mail.somemailserver.com" timestamp="20091202095834">
<birth_time timestamp="20091010092305 (53d 1h 35m 29s)"/>
<last_counter_reset timestamp="20080408102414"/>
<system status="online" />
<oldest_message secs="191115" mid="2033351" />
<features>
<feature name="IronPort Anti-Spam" time_remaining="75474158" />
<feature name="Sophos" time_remaining="75430958" />
<feature name="McAfee" time_remaining="-50177672" />
</features>
<counters>
<counter name="inj_msgs"
reset="1672658"
uptime="135602"
lifetime="1672668" />
<counter name="inj_recips"
reset="1879254"
uptime="147263"
lifetime="1879264" />
<counter name="gen_bounce_recips"
reset="52001"
uptime="3664"
lifetime="52006" />
<counter name="rejected_recips"
reset="391394"
uptime="16835"
lifetime="391394" />
<counter name="dropped_msgs"
reset="476453"
uptime="16952"
lifetime="476453" />
<counter name="soft_bounced_evts"
reset="42976"
uptime="7217"
lifetime="42976" />
<counter name="completed_recips"
Etc...
▸
Jason Chambers
IT Help Desk Associate
GEOSOFT INC.
freedom to explore
T +X XXX.XXX.XXXX #344
F +X XXX.XXX.XXXX
Visit our user-be8ce7065ec5@xymon.invalid
▸
From: Jerald Sheets [mailto:user-96a6f34c5806@xymon.invalid] Sent: December-02-09 10:08 AM To: user-ae9b8668bcde@xymon.invalid Subject: Re: [hobbit] XML Parsing For what purposes and in what way? Are you wanting to use it as a config element? Are you wanting to search through it for a pattern match? With the open-ended scripting you can do in Hobbit, the *what* you are asking is a non-issue. The *how* based on the *why* is the important part. --- Jerald M. Sheets jr. On Wed, Dec 2, 2009 at 9:41 AM, Jason Chambers <user-3fa671c0a30d@xymon.invalid<mailto:user-3fa671c0a30d@xymon.invalid>> wrote: Does anyone know how I can go about parsing data out of an XML txt file and then including it into hobbit? That would be extremely cool if there is an easy way to do that. Jason Chambers IT Help Desk Associate GEOSOFT INC. freedom to explore T +X XXX.XXX.XXXX #344 F +X XXX.XXX.XXXX Visit our user-be8ce7065ec5@xymon.invalid<http://www.geosoft.com>;
list Buchan Milne
▸
On Wednesday, 2 December 2009 16:17:58 Jason Chambers wrote:
Thanks, I'll check it out. The XML file that Ironport puts out is pretty complex, so I'll see what happens.
There is an Ironport template for devmon available in svn. I didn't see a way to monitor spam statistics in the MIB file for IronPort, but CPU, memory utilisation, raid status, power supply status, fan status, temperature, key expiry,and some resource utilisation graphs are available. The only value available regarding queues is not very informative either. I would appreciate feedback ... Regards, Buchan