<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Reading a logfile with a 3 state monitor</title>
	<atom:link href="http://contoso.se/blog/?feed=rss2&#038;p=1187" rel="self" type="application/rss+xml" />
	<link>http://contoso.se/blog/?p=1187</link>
	<description>Microsoft System Center by Anders Bengtsson</description>
	<lastBuildDate>Wed, 08 Sep 2010 07:17:38 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Twano_O</title>
		<link>http://contoso.se/blog/?p=1187&#038;cpage=1#comment-4431</link>
		<dc:creator>Twano_O</dc:creator>
		<pubDate>Tue, 08 Jun 2010 15:44:18 +0000</pubDate>
		<guid isPermaLink="false">http://contoso.se/blog/?p=1187#comment-4431</guid>
		<description>I think that the same script for two state will look like :

Const ForReading = 1
Set oAPI = CreateObject(“MOM.ScriptAPI”)
Set oBag = oAPI.CreatePropertyBag()

Set objFSO = CreateObject(“Scripting.FileSystemObject”)
Set objTextFile = objFSO.OpenTextFile _
(“c:\temp\file.txt”, ForReading)

Do Until objTextFile.AtEndOfStream
strText = objTextFile.ReadLine

varCriPos = Instr(strText, “Critical”)
If varCriPos &gt; 0 Then
Call oBag.AddValue(“Line”, strText)
Call oBag.AddValue(“Status”,”critical”)
Call oAPI.Return(oBag)
Wscript.Quit(0)
End If

Loop
objTextFile.Close

Call oBag.AddValue(“Status”,”ok”)
Call oAPI.Return(oBag)
End If</description>
		<content:encoded><![CDATA[<p>I think that the same script for two state will look like :</p>
<p>Const ForReading = 1<br />
Set oAPI = CreateObject(“MOM.ScriptAPI”)<br />
Set oBag = oAPI.CreatePropertyBag()</p>
<p>Set objFSO = CreateObject(“Scripting.FileSystemObject”)<br />
Set objTextFile = objFSO.OpenTextFile _<br />
(“c:\temp\file.txt”, ForReading)</p>
<p>Do Until objTextFile.AtEndOfStream<br />
strText = objTextFile.ReadLine</p>
<p>varCriPos = Instr(strText, “Critical”)<br />
If varCriPos &gt; 0 Then<br />
Call oBag.AddValue(“Line”, strText)<br />
Call oBag.AddValue(“Status”,”critical”)<br />
Call oAPI.Return(oBag)<br />
Wscript.Quit(0)<br />
End If</p>
<p>Loop<br />
objTextFile.Close</p>
<p>Call oBag.AddValue(“Status”,”ok”)<br />
Call oAPI.Return(oBag)<br />
End If</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Phil MacDonald</title>
		<link>http://contoso.se/blog/?p=1187&#038;cpage=1#comment-3212</link>
		<dc:creator>Phil MacDonald</dc:creator>
		<pubDate>Mon, 03 May 2010 18:50:48 +0000</pubDate>
		<guid isPermaLink="false">http://contoso.se/blog/?p=1187#comment-3212</guid>
		<description>Anders,

I am trying to accomplish the same script as a two state monitor. Critical and Ok but I am unable to have any success when I modify the script. By chance do you have an example two state script.

Cheers,

Phil</description>
		<content:encoded><![CDATA[<p>Anders,</p>
<p>I am trying to accomplish the same script as a two state monitor. Critical and Ok but I am unable to have any success when I modify the script. By chance do you have an example two state script.</p>
<p>Cheers,</p>
<p>Phil</p>
]]></content:encoded>
	</item>
</channel>
</rss>
