Discussion:
Custom Monitor to parse XML
(too old to reply)
Jeff Prusinski
2008-07-07 13:09:03 UTC
Permalink
Hello,
We're currently running SCOM-07-SP1-RC. We've had a request to parse an XML
page for content indicating the state of a process and then alert on it.
Apparently the code their running can't write out to the event log. Has
anyone seen or done anything like this?
Thanks, Jeff.
Anders Bengtsson [MVP]
2008-07-07 14:41:15 UTC
Permalink
Hi Jeff,

Cant you use a logfile monitor to do this?
--
Anders Bengtsson
Microsoft MVP - Operations Manager
Microsoft Certified Trainer (MCT)
http://www.contoso.se
Post by Jeff Prusinski
Hello,
We're currently running SCOM-07-SP1-RC. We've had a request to parse an XML
page for content indicating the state of a process and then alert on it.
Apparently the code their running can't write out to the event log. Has
anyone seen or done anything like this?
Thanks, Jeff.
Jeff Prusinski
2008-07-07 15:02:01 UTC
Permalink
Thanks Much! I read up on it and it looks like it would. I will post back
with results.

Thank you Anders.
Post by Anders Bengtsson [MVP]
Hi Jeff,
Cant you use a logfile monitor to do this?
--
Anders Bengtsson
Microsoft MVP - Operations Manager
Microsoft Certified Trainer (MCT)
http://www.contoso.se
Post by Jeff Prusinski
Hello,
We're currently running SCOM-07-SP1-RC. We've had a request to parse an XML
page for content indicating the state of a process and then alert on it.
Apparently the code their running can't write out to the event log. Has
anyone seen or done anything like this?
Thanks, Jeff.
Philip
2008-07-07 20:15:41 UTC
Permalink
If that doesn't work for you, a script based two state monitor using
the 'msxml2.domdocument' object most likely will.

<!--pseudocode

create msxml2.domdocument object

build path to xml file
build xpath query

msxml2.load(filepath)

if no error then
attempt query against file
compare result to known good value
if equal then state is good
else state is bad

pseudocode-->

On Jul 7, 10:02 am, Jeff Prusinski
Post by Jeff Prusinski
Thanks Much! I read up on it and it looks like it would. I will post back
with results.
Thank you Anders.
Post by Anders Bengtsson [MVP]
Hi Jeff,
Cant you use a logfile monitor to do this?
--
Anders Bengtsson
Microsoft MVP - Operations Manager
Microsoft Certified Trainer (MCT)
http://www.contoso.se
Post by Jeff Prusinski
Hello,
We're currently running SCOM-07-SP1-RC. We've had a request to parse an XML
page for content indicating the state of a process and then alert on it.
Apparently the code their running can't write out to the event log. Has
anyone seen or done anything like this?
Thanks, Jeff.- Hide quoted text -
- Show quoted text -
Loading...