<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>JAMA00</title>
	<atom:link href="http://jama00.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://jama00.wordpress.com</link>
	<description>SCOM 2007 R2</description>
	<lastBuildDate>Mon, 30 Jan 2012 06:39:11 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='jama00.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>JAMA00</title>
		<link>http://jama00.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://jama00.wordpress.com/osd.xml" title="JAMA00" />
	<atom:link rel='hub' href='http://jama00.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Stop storing data (partial or temporary) into the data warehouse database</title>
		<link>http://jama00.wordpress.com/2012/01/19/stop-storing-data-partial-or-temporary-into-the-data-warehouse-database/</link>
		<comments>http://jama00.wordpress.com/2012/01/19/stop-storing-data-partial-or-temporary-into-the-data-warehouse-database/#comments</comments>
		<pubDate>Thu, 19 Jan 2012 10:37:34 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/?p=318</guid>
		<description><![CDATA[In order to facilitate the use of the data warehouse database, there are 3 default overrides for an environment that has it’s data warehouse enabled. If you (partial or temporary) need to stop storage to the data warehouse, you can just override the default overrides (again) to set the Drop Items parameter to true. This [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=318&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In order to facilitate the use of the data warehouse database, there are 3 default overrides for an environment that has it’s data warehouse enabled.</p>
<p><a href="http://jama00.files.wordpress.com/2012/01/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2012/01/image_thumb.png?w=759&#038;h=221" width="759" height="221" /></a></p>
<p>If you (partial or temporary) need to stop storage to the data warehouse, you can just override the default overrides (again) to set the Drop Items parameter to true. This will, after propagation to the management server, cause the items to be dropped (and not stored into the data warehouse database).</p>
<p>Note that while this is possible, I assume it is a non supported configuration <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://jama00.files.wordpress.com/2012/01/wlemoticon-smile.png" /></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=318&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2012/01/19/stop-storing-data-partial-or-temporary-into-the-data-warehouse-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2012/01/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2012/01/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Agent proxy</title>
		<link>http://jama00.wordpress.com/2011/07/01/agent-proxy/</link>
		<comments>http://jama00.wordpress.com/2011/07/01/agent-proxy/#comments</comments>
		<pubDate>Fri, 01 Jul 2011 11:14:16 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[Agent Settings]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/2011/07/01/agent-proxy/</guid>
		<description><![CDATA[Until now we have set the Agent proxy for an agent only when required and we used a script to do this. See this link for more information. But now Microsoft has come up with something new in the Exchange 2010 management pack. It will not discovery anything until you have set the agent proxy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=295&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Until now we have set the Agent proxy for an agent only when required and we used a script to do this. <a href="http://jama00.wordpress.com/2010/01/21/setting-agent-proxying/" target="_blank">See this link for more information</a>. But now Microsoft has come up with something new in the Exchange 2010 management pack. It will not discovery anything until you have set the agent proxy on for the Exchange servers (so we can’t do this afterwards anymore). So this meant for us we need to make a choice:</p>
<ol>
<li>Manually enable the proxy agent setting for all Exchange 2010 servers (now and in the future). Which means an Exchange 2010 server will not be discovered until we actually do.</li>
<li>Enable the proxy agent for all agents.</li>
</ol>
<p>Counting at the moment around 60 percent of the agents already has the proxy functionality enabled. So what’s the advantage of not setting this setting on default for all agents? Looking at security, you have to enable this setting already for all security important servers (AD, Exchange, ISA, Citrix, etc.). And since we have no knowledge of when an Exchange server is connected to our environment, we decided to enable it for all agents.</p>
<p>This is the script to do it:</p>
<blockquote><p><font face="Courier New">$rootMS=&quot;RMS.TEST.LOCAL&quot; </font></p>
<p><font face="Courier New">#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-       <br /># Add operations manager snapin and connect to the root management server.        <br />#&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-        <br />add-pssnapin &quot;Microsoft.EnterpriseManagement.OperationsManager.Client&quot;;        <br />set-location &quot;OperationsManagerMonitoring::&quot;;        <br />new-managementGroupConnection -ConnectionString:$rootMS; </font></p>
<p><font face="Courier New">## set proxy enabled for all agents where it is disabled       <br />$NoProxy = get-agent | where {$_.ProxyingEnabled -match &quot;False&quot;}        <br />$NoProxy | foreach {$_.ProxyingEnabled = $true}        <br />$NoProxy | foreach {$_.ApplyChanges()}</font></p>
</blockquote>
<p><a href="http://blogs.technet.com/b/kevinholman/archive/2010/11/09/how-to-set-agent-proxy-enabled-for-all-agents.aspx" target="_blank">See also Kevin Holman’s blog</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/295/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/295/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/295/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=295&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2011/07/01/agent-proxy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>
	</item>
		<item>
		<title>State changes from disabled monitors</title>
		<link>http://jama00.wordpress.com/2011/05/18/state-changes-from-disabled-monitors/</link>
		<comments>http://jama00.wordpress.com/2011/05/18/state-changes-from-disabled-monitors/#comments</comments>
		<pubDate>Wed, 18 May 2011 07:44:54 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[Agent]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/2011/05/18/state-changes-from-disabled-monitors/</guid>
		<description><![CDATA[While we try to reduce the number of state changes, we stumbled into a bug in the agent software. We were investigating our top 50 of state change monitors, using Kevin Holman’s queries. When we looked at the results, we did see some strange things. First, the number of state changes were equal for a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=294&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While we try to reduce the number of state changes, we stumbled into a bug in the agent software. We were investigating our top 50 of state change monitors, using <a href="http://blogs.technet.com/b/kevinholman/archive/2009/12/21/tuning-tip-do-you-have-monitors-constantly-flip-flopping.aspx" target="_blank">Kevin Holman’s queries</a>.</p>
<p>When we looked at the results, we did see some strange things. First, the number of state changes were equal for a lot of monitors.</p>
<p>An example of this:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image13.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb13.png?w=657&#038;h=62" width="657" height="62" /></a> </p>
</p>
<p>Having exact the same number of state changes for two different monitors? When we looked into these monitors, they were disabled by default in the management pack were the monitor was defined. Digging further showed that there was no override present in the system, which would enable this monitor.</p>
<p>We now had a problem while from our top 50, 48 of them were monitors that were default disabled, without any override to enable the monitor.</p>
<p>This turns out to be a bug in the agent software. The moment the agent (re-) initializes either by starting or coming out of maintenance mode it will detect the monitor and initialize it. When realizing it should (default) disable the monitor, it will send a state change for the the disabled monitor.</p>
<p>This is also the case for monitors that are default enabled, but are disabled using a custom override. Unfortunately a fix for this issue is not as easy as it sounds (according to Microsoft support) and a fix will not be realized in the R2 version of SCOM.</p>
<p>So if you have tuned a lot (like us) and find these monitors, just skip them. You can’t fix this one <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Below is a list of monitors we found that were default disabled during this investigation and that we now exclude from the query.</p>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="620">Microsoft.Windows.Server.2003.LogicalDisk.AvgDiskSecPerWrite</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2003.LogicalDisk.AvgDiskSecPerRead</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2003.NetworkAdapter.NetworkAdapterConnectionHealth</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2008.LogicalDisk.AvgDiskSecPerWrite</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2008.LogicalDisk.AvgDiskSecPerRead</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.Ping</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.AgentManagement.EndToEndEventMonitorError</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.HealthService.ConfigurationStateWarningLevel</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.HealthService.ConfigurationProcessing</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.HealthService.Security.DataIntegrityCheck</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.HealthService.ConfigurationStateCriticalLevel</td>
</tr>
<tr>
<td>Microsoft.SystemCenter.AgentManagement.EndToEndEventMonitorWarning</td>
</tr>
<tr>
<td>SMSv4_dependent_service_running__Background_Intelligent_Transfer_Service_16_Rule.AdvancedAlertCriteriaMonitor</td>
</tr>
<tr>
<td>SMS_2003_dependent_service_running__Background_Intelligent_Transfer_Service_13_Rule.AdvancedAlertCriteriaMonitor</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.DBFile.DiskFreeSpace</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.RecoveryModel</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.TransactionLogSizeMegabytesMonitor</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.TrustWorthy</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.AutoUpdateStatAsync</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.TornPageDetection</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.DBSizePercentMonitor</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.AutoCreateStat</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.DBChaining</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.TransactionLogSizePercentMonitor</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.DBSizeMegabytesMonitor</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.AutoUpdateSet</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.AutoShrink</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.DBSizePercentageChangeMonitor</td>
</tr>
<tr>
<td>Microsoft.SQLServer.2005.Database.Configuration.AutoClose</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2003.TerminalServerRole.InactiveSessions</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2003.TerminalServerRole.ActiveSessions</td>
</tr>
<tr>
<td>Microsoft.Windows.Server.2003.TerminalServerRole.CPUPerSession</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebSite.WebServiceCurrentISAPIExtensionRequests.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebSite.WebServiceCurrentConnections.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebSite.WebServiceBytesTotalSec.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebSite.WebServiceBytesSentSec.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebSite.WebServiceBytesReceivedSec.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebSite.WebServiceISAPIExtensionRequestsSec.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebServer.WebServiceISAPIExtensionRequestsSec.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebServer.ASP.NETRequestsQueued.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebServer.ASP.NETRequestsCurrent.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebServer.ASP.NETWorkerProcessRestarts.Monitor</td>
</tr>
<tr>
<td>Microsoft.Windows.InternetInformationServices.2003.WebServer.WebServiceBytesReceivedSec.Monitor</td>
</tr>
</tbody>
</table>
<p>&#160;</p>
<p>If you want to exclude any (default) disabled monitor that you found, exclude it in the query as shown below:</p>
<blockquote><p><font face="Courier New">use OperationsManager        <br />go </font></p>
<p><font face="Courier New">select distinct top 50 count(sce.StateId) as NumStateChanges, m.MonitorName, mt.typename AS TargetClass        <br />from StateChangeEvent sce with (nolock)         <br />join state s with (nolock) on sce.StateId = s.StateId         <br />join monitor m with (nolock) on s.MonitorId = m.MonitorId         <br />join managedtype mt with (nolock) on m.TargetManagedEntityType = mt.ManagedTypeId         <br />where m.IsUnitMonitor = 1         <br /><font color="#ff0000"><strong>and m.MonitorName not in (</strong></font></font></p>
<p><font face="Courier New"><font color="#ff0000"><strong>&#8216;Microsoft.Windows.Server.2003.LogicalDisk.AvgDiskSecPerWrite&#8217;,</strong></font></font></p>
<p><font color="#ff0000" face="Courier New"><strong>&#8216;Microsoft.Windows.Server.2003.LogicalDisk.AvgDiskSecPerRead&#8217;</strong></font></p>
<p><font face="Courier New"><font color="#ff0000"><strong>)            <br /></strong></font>group by m.MonitorName,mt.typename         <br />order by NumStateChanges desc</font></p>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/294/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/294/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/294/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=294&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2011/05/18/state-changes-from-disabled-monitors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb13.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>What property is discovered?</title>
		<link>http://jama00.wordpress.com/2011/05/17/what-property-is-discovered/</link>
		<comments>http://jama00.wordpress.com/2011/05/17/what-property-is-discovered/#comments</comments>
		<pubDate>Tue, 17 May 2011 13:00:24 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[config churn]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/2011/05/17/what-property-is-discovered/</guid>
		<description><![CDATA[I think we all used these Kevin Holman queries to handle the config churn in our environment. But what if you still have config churn issues, but don’t see any issues with these queries. We still had config churn, but running the queries form Kevin Holman did not point us to the reason for those [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=291&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I think we all used <a href="http://blogs.technet.com/b/kevinholman/archive/2009/10/05/what-is-config-churn.aspx" target="_blank">these Kevin Holman</a> queries to handle the config churn in our environment. But what if you still have config churn issues, but don’t see any issues with these queries.</p>
<p>We still had config churn, but running the queries form Kevin Holman did not point us to the reason for those config churns. But we got some information with a support case. </p>
<p>First we can retrieve exact what is changed, using this query (run on against de data warehouse database):</p>
<blockquote><p><font face="Courier New">use OperationsManagerDW        <br />go </font></p>
<p><font face="Courier New">select * from dbo.ManagedEntityProperty        <br />where DWCreatedDateTime &gt; dateadd(hh,-<font color="#ff0000">24</font>,getutcdate())         <br />order by DWCreatedDateTime, ManagedEntityRowId</font></p>
</blockquote>
<p>This will result in output similar to this:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image8.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb8.png?w=584&#038;h=267" width="584" height="267" /></a> </p>
</p>
<p>It will give you all properties that are changed within the last 24 hours and what exactly is changed. Now when you “click” on a PropertyXML value or DeltaXml, a new windows will be opened showing you exact which properties there are and which are changed.</p>
<p>But now we don’t have any idea were to find this in a management pack, but we will get there. From the above output, take the <strong>ManagedEntityRowId</strong> and place this in the next query: </p>
<blockquote><p><font face="Courier New">use OperationsManagerDW        <br />go </font></p>
<p><font face="Courier New">select * from ManagedEntity        <br />where ManagedEntityRowId = <font color="#ff0000">121403</font></font></p>
</blockquote>
<p>This will result in output similar to this:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image9.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb9.png?w=484&#038;h=44" width="484" height="44" /></a> </p>
<p>The <strong>ManagedEntityGuid</strong> is what we need here. Place it in the next query (which will run against the operations database):</p>
<blockquote><p><font face="Courier New">use OperationsManager        <br />go         <br /></font></p>
<p><font face="Courier New">select * from BaseManagedEntity        <br />where BaseManagedEntityId = &#8216;<font color="#ff0000">3B9F6E60-02B5-8369-859F-8047093CE33F</font>&#8216;</font></p>
</blockquote>
<p>The result is:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image10.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb10.png?w=610&#038;h=40" width="610" height="40" /></a> </p>
<p>The next thing we need is the <strong>BaseManagedTypeId</strong></p>
<blockquote><p><font face="Courier New">use OperationsManager        <br />go         <br />select * from ManagedType         <br />where ManagedTYpeId = &#8216;<font color="#ff0000">10C1C7F7-BA0F-5F9B-C74A-79A891170934</font>&#8216; </font></p>
</blockquote>
<p>Which results in:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image11.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb11.png?w=853&#038;h=41" width="853" height="41" /></a> </p>
<p>Here you can find the TypeName that is discovered (Microsoft.SQLServer.Database in this case). Use the <strong>ManagementPackId</strong> to get the actual management pack:</p>
<blockquote><p><font face="Courier New">Use OperationsManager        <br />Go         <br />Select * from ManagementPack where ManagementPackId = &#8216;<font color="#ff0000">BCD6DCCF-C46C-A1F5-3C8D-BB4E99E2A6A3</font>&#8216; </font></p>
</blockquote>
<p>And the final result will be:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image12.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb12.png?w=636&#038;h=44" width="636" height="44" /></a> </p>
<p>So we now know that the property is of type “Microsoft.SQLServer.Database” and that it is discovered in the “Microsoft.SQLServer.Library” management pack (aka “Microsoft SQL Server Core Library”).</p>
<p>Note that if you are only interested in the actual management pack name, you can also use this query (which uses the ManagedEntityGuid from the first query against the operations database):</p>
<blockquote><p>use OperationsManager      <br />Select * from ManagementPack       <br />where ManagementPackId = (       <br />&#160;&#160;&#160; select ManagementPackId from ManagedType       <br />&#160;&#160;&#160; where ManagedTYpeId = (select BaseManagedTypeId from BaseManagedEntity       <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; where BaseManagedEntityId = &#8216;<font color="#ff0000">3B9F6E60-02B5-8369-859F-8047093CE33F</font>&#8216;       <br />&#160;&#160;&#160; )       <br />) </p>
</blockquote>
<p>This will result in the same output as the last screenshot (but now you don’t know the type for the data). When you have this information, you can look up the corresponding discoveries so you can fine tune them if required.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=291&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2011/05/17/what-property-is-discovered/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb8.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb9.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb10.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb11.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb12.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Updating manual installed agents from the console</title>
		<link>http://jama00.wordpress.com/2011/05/09/updating-manual-installed-agents-from-the-console/</link>
		<comments>http://jama00.wordpress.com/2011/05/09/updating-manual-installed-agents-from-the-console/#comments</comments>
		<pubDate>Mon, 09 May 2011 13:01:19 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[Agent]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/?p=257</guid>
		<description><![CDATA[We have created a management pack, that will update the manual installed agents, from a task in the operations console. However, before you can use this management pack you should have implemented the JDF framework for file distribution. This management pack depends on the framework, so if you are not capable of setting up the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=257&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We have created a management pack, that will update the manual installed agents, from a task in the operations console. However, before you can use this management pack you should have implemented the <a href="http://jama00.wordpress.com/2011/03/28/jdf-jama-distribution-framework/" target="_blank">JDF framework for file distribution</a>. This management pack depends on the framework, so if you are not capable of setting up the framework, this management pack is useless to you.</p>
<p>&#160;</p>
<p>Below is the final XML file for your management pack called jamaAgent.Update.xml:</p>
<blockquote><p><font size="2" face="Courier New">&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;&lt;ManagementPack ContentReadable=&quot;true&quot; xmlns:xsd=&quot;</font><a href="http://www.w3.org/2001/XMLSchema&quot;"><font size="2" face="Courier New">http://www.w3.org/2001/XMLSchema&quot;</font></a><font size="2" face="Courier New"> xmlns:xsl=&quot;</font><a href="http://www.w3.org/1999/XSL/Transform&quot;"><font size="2" face="Courier New">http://www.w3.org/1999/XSL/Transform&quot;</font></a><font size="2" face="Courier New">&gt;        <br />&#160; &lt;Manifest&gt;         <br />&#160;&#160;&#160; &lt;Identity&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;ID&gt;jamaAgent.Update&lt;/ID&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;Version&gt;0.4.0.0&lt;/Version&gt;         <br />&#160;&#160;&#160; &lt;/Identity&gt;         <br />&#160;&#160;&#160; &lt;Name&gt;jamaAgent.Update&lt;/Name&gt;         <br />&#160;&#160;&#160; &lt;References&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;Reference Alias=&quot;MSWL&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ID&gt;Microsoft.Windows.Library&lt;/ID&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Version&gt;6.1.7221.0&lt;/Version&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;PublicKeyToken&gt;31bf3856ad364e35&lt;/PublicKeyToken&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;/Reference&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;Reference Alias=&quot;MSSCL&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ID&gt;Microsoft.SystemCenter.Library&lt;/ID&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Version&gt;6.1.7221.0&lt;/Version&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;PublicKeyToken&gt;31bf3856ad364e35&lt;/PublicKeyToken&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;/Reference&gt;         <br />&#160;&#160;&#160; &lt;/References&gt;         <br />&#160; &lt;/Manifest&gt;         <br />&#160; &lt;Monitoring&gt;         <br />&#160;&#160;&#160; &lt;Tasks&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;Task ID=&quot;jamaAgent.Update.ConsoleTask.AgentUpdate&quot; Accessibility=&quot;Public&quot; Enabled=&quot;true&quot; Target=&quot;MSSCL!Microsoft.SystemCenter.HealthService&quot; Timeout=&quot;300&quot; Remotable=&quot;true&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Category&gt;Custom&lt;/Category&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;WriteAction ID=&quot;PA&quot; TypeID=&quot;MSWL!Microsoft.Windows.ScriptWriteAction&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ScriptName&gt;jamaTaskUpdateAgent.vbs&lt;/ScriptName&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Arguments /&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;ScriptBody&gt;&lt;![CDATA[         <br />'-------------------------------------------------------------------------------         <br />' File&#160;&#160; : jamaTaskUpdateAgent.vbs         <br />' Use&#160;&#160;&#160; : Script for the jama Agent Update task.         <br />' SVN&#160;&#160;&#160; : Revision: 136         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Date: 2011-04-12 09:14:33 +0200 (Tue, 12 Apr 2011)         <br /></font><font size="2" face="Courier New">'        <br />' Note(s): 1) ---         <br />'-------------------------------------------------------------------------------         <br />option explicit         <br />on error goto 0         <br />setlocale(&quot;en-us&quot;) </font></p>
<p><font size="2" face="Courier New">const INT_RETRIES&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = 5        <br />const INT_DEFAULT_WAIT_TIME = 120         <br />const STR_DOWNLOAD_PATH&#160;&#160;&#160;&#160; = &quot;/files/opsmgr/updates/agent/&quot; </font></p>
<p><font size="2" face="Courier New">jamaMain() </font></p>
<p><font size="2" face="Courier New">'-------------------------------------------------------------------------------        <br />' jamaMain         <br />'         <br />' Use&#160;&#160;&#160; : Main entry for this script.         <br />' Input&#160; : ---         <br />' Returns: ---         <br />' Note(s): 1) ---         <br />'-------------------------------------------------------------------------------         <br />function jamaMain()         <br />&#160;&#160;&#160; dim jdf         <br />&#160;&#160;&#160; dim iMinutesToWait         <br />&#160;&#160;&#160; dim bForceUpdate </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; if(not jdfLoadFramework(jdf, null, null, null, null, null)) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; wscript.echo &quot;The Jama Distribution Framework could not be loaded. No update is performed.&quot;         <br />&#160;&#160;&#160; else         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; wscript.echo &quot;Jama Distribution Framework loaded&quot; &amp; vbNewLine &amp; vbNewLine &amp; jdf.GetInfoString(wscript.fullname)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; '---------------------------------------------------------------------------         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Your code here!         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; '---------------------------------------------------------------------------         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(jamaInitialize(iMinutesToWait, bForceUpdate)) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if((bForceUpdate = false) and jamaRestartRequired()) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; wscript.echo &quot;Update could not be scheduled due to dependent services.&quot; &amp; vbNewLine &amp; _         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &quot;Use the force option to override this behaviour and force the update to run.&quot;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(jamaScheduleUpdateIn(jdf, iMinutesToWait) = true) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; wscript.echo &quot;Update is scheduled to run in &quot; &amp; iMinutesToWait &amp; &quot; minutes.&quot;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; wscript.echo &quot;Update could not be scheduled. No update will be performed!&quot;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; else         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; wscript.echo &quot;Initilization failed. No update will be performed!&quot;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160; end if         <br />end function </font></p>
<p><font size="2" face="Courier New">'-------------------------------------------------------------------------------        <br />' jamaInitialize         <br />'         <br />' Use&#160;&#160;&#160; : Initialize the script.         <br />' Input&#160; : iMinutesToWait - integer - Number of minutes to wait before         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; activating the schedule (output)         <br />' Returns: Boolean - TRUE&#160; - No errors detected.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FALSE - An error was detected.         <br />' Note(s): 1) ---         <br />'-------------------------------------------------------------------------------         <br />function jamaInitialize(byref iMinutesToWait, byref bForceUpdate)         <br />&#160;&#160;&#160; dim colNamedArguments         <br />&#160;&#160;&#160; dim bResult         <br />&#160;&#160;&#160; dim bFound </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; bResult = false        <br />&#160;&#160;&#160; bFound&#160; = false         <br />&#160;&#160;&#160; bForceUpdate = false         <br />&#160;&#160;&#160; set colNamedArguments = WScript.Arguments.Named </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; if(colNamedArguments.Exists(&quot;minutes&quot;)) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; iMinutesToWait = cint(lcase(colNamedArguments.Item(&quot;minutes&quot;)))         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; bFound&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = true         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult&#160;&#160;&#160;&#160;&#160;&#160;&#160; = true         <br />&#160;&#160;&#160; end if </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; if(colNamedArguments.Exists(&quot;force&quot;)) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(lcase(colNamedArguments.Item(&quot;force&quot;)) = &quot;true&quot;) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bForceUpdate = true         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160; end if </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; if(not bFound) then        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; iMinutesToWait = INT_DEFAULT_WAIT_TIME         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult&#160;&#160;&#160;&#160;&#160;&#160;&#160; = true         <br />&#160;&#160;&#160; end if </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; jamaInitialize = bResult        <br />end function </font></p>
<p><font size="2" face="Courier New">'-------------------------------------------------------------------------------        <br />' jamaRestartRequired         <br />'         <br />' Use&#160;&#160;&#160; : Checks if an update of the agent will trigger a restart or reboot.         <br />' Input&#160; : ---         <br />' Returns: Boolean - TRUE&#160; - A restart is required.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FALSE - A restart is not required.         <br />' Note(s): 1) If the dependency could not be determined, this function will         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; return true.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2) For windows 2000 this function will always return true.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3) When true on a 2003 server, a reboot is required but not forced.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4) When true on 2008 or higher, the dependent services could be         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; restarted by the installer service.         <br />'         <br />'-------------------------------------------------------------------------------         <br />function jamaRestartRequired()         <br />&#160;&#160;&#160; dim strCmd         <br />&#160;&#160;&#160; dim iResult         <br />&#160;&#160;&#160; dim bResult         <br />&#160;&#160;&#160; dim fso         <br />&#160;&#160;&#160; dim fh         <br />&#160;&#160;&#160; dim strTempFile         <br />&#160;&#160;&#160; dim strLine </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; strTempFile = &quot;jamaTaskUpdateAgent.$$$&quot;        <br />&#160;&#160;&#160; bResult = true         <br />&#160;&#160;&#160; strCmd&#160; = &quot;tasklist /fo csv /m EventCommon.dll /FI &quot;&quot;imagename ne HealthService.exe&quot;&quot; /FI &quot;&quot;imagename ne MonitoringHost.exe&quot;&quot; &gt; &quot; &amp; strTempFile         <br />&#160;&#160;&#160; jamaRun(strCmd) </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; set fso = CreateObject(&quot;scripting.filesystemobject&quot;)        <br />&#160;&#160;&#160; if(fso.FileExists(strTempFile)) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; on error resume next         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; err.clear         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set fh = fso.OpenTextFile(strTempFile, 1)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Open for reading.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(err.number = 0) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; do while(not fh.AtEndOfStream)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strLine = lcase(fh.ReadLine)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(instr(strLine, &quot;info: no tasks&quot;) &gt; 0) then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' No dependencies found.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult = false         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loop </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set fh = fso.GetFile(strTempFile)        <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; fh.delete(true)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' delete file.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; on error goto 0         <br />&#160;&#160;&#160; end if </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; jamaRestartRequired = bResult        <br />end function </font></p>
<p><font size="2" face="Courier New">function jamaRun(byval strCmd)        <br />&#160;&#160;&#160; dim objShell         <br />&#160;&#160;&#160; dim iResult </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; iResult&#160;&#160;&#160;&#160;&#160; = 0        <br />&#160;&#160;&#160; set objShell = wscript.createObject(&quot;wscript.shell&quot;)         <br />&#160;&#160;&#160; iResult&#160;&#160;&#160;&#160;&#160; = objShell.run(&quot;cmd /c &quot; &amp; strCmd, 0, true) ' hidden and wait for result         <br />&#160;&#160;&#160; set objShell = nothing         <br />&#160;&#160;&#160; jamaRun&#160;&#160;&#160;&#160;&#160; = iResult </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; jamaRun = iResult        <br />end function </font></p>
<p><font size="2" face="Courier New">'-------------------------------------------------------------------------------        <br />' jamaScheduleUpdateIn         <br />'         <br />' Use&#160;&#160;&#160; : Retrieve and schedule the required update.         <br />' Input&#160; : jdf&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; - object&#160; - JDF object        <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iMinutesToWait - integer - Minutes to wait for the schedule.         <br />' Returns: Boolean - TRUE&#160; - No errors.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FALSE - An error was detected.         <br />' Note(s): 1) ---         <br />'-------------------------------------------------------------------------------         <br />function jamaScheduleUpdateIn(byref jdf, iMinutesToWait)         <br />&#160;&#160;&#160; dim strSourceFile         <br />&#160;&#160;&#160; dim strTargetFile         <br />&#160;&#160;&#160; dim strTargetDir         <br />&#160;&#160;&#160; dim iCount         <br />&#160;&#160;&#160; dim iResult         <br />&#160;&#160;&#160; dim bResult         <br />&#160;&#160;&#160; dim strCmd         <br />&#160;&#160;&#160; dim fso </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; iCount = 0        <br />&#160;&#160;&#160; bResult = false         <br />&#160;&#160;&#160; set fso = CreateObject(&quot;scripting.filesystemobject&quot;)         <br />&#160;&#160;&#160; strSourceFile = &quot;jamaAgentUpdate&quot; &amp; jdf.Platform &amp; &quot;.exe&quot;         <br />&#160;&#160;&#160; strTargetDir&#160; = jdf.ExpandString(&quot;$JDF_IN_DIR$&quot; &amp; &quot;jamaAgentUpdate\&quot;)         <br />&#160;&#160;&#160; if(jdf.CreateDirectory(strTargetDir)) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; strTargetFile = strTargetDir &amp; strSourceFile         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult = fso.FileExists(strTargetFile)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(not bResult) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; do         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iResult = jdf.GetFile(&quot;jdfBaseDistribution&quot;, STR_DOWNLOAD_PATH &amp; strSourceFile, strTargetFile)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; iCount&#160; = iCount + 1         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; loop while((iCount &lt; INT_RETRIES) and (iResult &lt;&gt; 0))         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(iResult = 0) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult = fso.FileExists(strTargetFile)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(bResult) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strCmd&#160; = strTargetFile &amp; &quot; /verysilent&quot;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult = jdf.ScheduleTaskIn(strCmd, iMinutesToWait)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160; end if         <br />&#160;&#160;&#160; jamaScheduleUpdateIn = bResult         <br />end function </font></p>
<p><font size="2" face="Courier New">'-------------------------------------------------------------------------------        <br />' From template.vbs         <br />'-------------------------------------------------------------------------------         <br />'-------------------------------------------------------------------------------         <br />' jdfLoadFramework         <br />'         <br />' Use&#160;&#160;&#160; : Load and initialize the JDF framework.         <br />' Input&#160; : objJDF&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; - object - Object passed back with framework.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bInitialize&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; - bool&#160;&#160; - true or null for initializing.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strVersion&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; - string - Minimum framework version required.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bForceVersion&#160;&#160;&#160;&#160;&#160;&#160;&#160; - bool&#160;&#160; - true, false or null.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strCustomerId&#160;&#160;&#160;&#160;&#160;&#160;&#160; - string - Customer id or null.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strDefaultUploadPath - string - Default upload path.         <br />' Returns: bool - TRUE&#160; - Initialization of the framework succeeded.         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; FALSE - Initialization of the framework failed.         <br />' Note(s): 1) strVersion = null         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Any version of the framework will be accepted. The value of         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strForceVersion will be ignored.         <br />'         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 2) strVersion = &quot;x.x.x&quot;         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; Integer values, seperated by dots, e.g. : &quot;3.5.11&quot;         <br />'         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 3) bForceVersion = null/false         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The given version is a minimum version required for the         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; framework.         <br />'         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 4) bForceVersion = true         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The framework version must exactly match with the given         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; version number.         <br />'         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 5) strCustomerId = null         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The customer id will be retrieved from the registry. See         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; the documentatiohn for more information.         <br />'         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 6) strDefaultPath = null         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; The default upload path will be set to the root: &quot;/&quot;. This         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; argument can hold JDF variables (both default and custom         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; provided in the jdf.jdp file). See the documentation for more         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; information.         <br />'         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; 7) Normal use is:         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; jdfLoadFramework(jdf, null, null, null, null, null)         <br />'&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; where jdf is the object you pass to the function.         <br />'-------------------------------------------------------------------------------         <br />function jdfLoadFramework(byref objJDF, byval bInitialize, byval strVersion, byval bForceVersion, byval strCustomerId, byval strDefaultUploadPath)         <br />&#160;&#160;&#160; dim bResult, fso, strFrameworkFile, objReg, strResult </font></p>
<p><font size="2" face="Courier New">&#160;&#160;&#160; bResult&#160;&#160; = false        <br />&#160;&#160;&#160; strResult = &quot;&quot;         <br />&#160;&#160;&#160; on error resume next         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; err.clear         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; set objReg=GetObject(&quot;winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv&quot;)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(err.number = 0) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; objReg.GetStringValue&#160; &amp;H80000002, &quot;SOFTWARE\Company\jama\jdf&quot;, &quot;path&quot;, strResult&#160;&#160;&#160;&#160; ' If you use another registry location, change this value!         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if((err.number = 0) and (strResult &lt;&gt; &quot;&quot;) and (not isnull(strResult))) then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' We got something, so try it.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; strFrameworkFile = strResult &amp; &quot;jdf.wsc&quot;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' This now should be the full path to the framework file.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(err.number = 0) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(fso.FileExists(strFrameworkFile)) then         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; set objJDF = GetObject(&quot;script:&quot; &amp; strFrameworkFile)&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' File exist, try to load it.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(err.number = 0) then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Framework found and object loaded.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(bInitialize = false) then&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' No initialization.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult = false         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; else&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; ' Initialize the framework for use.         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; bResult = objJDF.InitializeFramework(strVersion, bForceVersion, wscript.scriptname, strCustomerId, strDefaultUploadPath)         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; end if         <br />&#160;&#160;&#160; on error goto 0         <br />&#160;&#160;&#160; jdfLoadFramework = bResult         <br />end function         <br />]]&gt;&lt;/ScriptBody&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;TimeoutSeconds&gt;300&lt;/TimeoutSeconds&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/WriteAction&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;/Task&gt;         <br />&#160;&#160;&#160; &lt;/Tasks&gt;         <br />&#160; &lt;/Monitoring&gt;         <br />&#160; &lt;LanguagePacks&gt;         <br />&#160;&#160;&#160; &lt;LanguagePack ID=&quot;ENU&quot; IsDefault=&quot;false&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;DisplayStrings&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;DisplayString ElementID=&quot;jamaAgent.Update&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Name&gt;jamaAgent.Update&lt;/Name&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/DisplayString&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;DisplayString ElementID=&quot;jamaAgent.Update.ConsoleTask.AgentUpdate&quot;&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;Name&gt;jama Agent Update&lt;/Name&gt;         <br />&#160;&#160;&#160;&#160;&#160;&#160;&#160; &lt;/DisplayString&gt;         <br />&#160;&#160;&#160;&#160;&#160; &lt;/DisplayStrings&gt;         <br />&#160;&#160;&#160; &lt;/LanguagePack&gt;         <br />&#160; &lt;/LanguagePacks&gt;         <br />&lt;/ManagementPack&gt;</font></p>
</blockquote>
<p>Now the script in this management pack expects a few things.</p>
<p>&#160;</p>
<blockquote><p><strong>const STR_DOWNLOAD_PATH = &quot;/files/opsmgr/updates/agent/&quot;</strong></p>
</blockquote>
<p>This constant is used to specify the path on the remote SCP server, where the update files can be retrieved. If you use another location, change the value of the variable.</p>
<p>&#160;</p>
<blockquote><p><strong>strSourceFile = &quot;jamaAgentUpdate&quot; &amp; jdf.Platform &amp; &quot;.exe&quot; </strong></p>
</blockquote>
<p>This value is used to generate the name of the update to retrieve. We have re-packaged the two update files required for the agent update into a single executable (<a href="http://blogs.technet.com/b/kevinholman/archive/2010/10/12/command-line-and-software-distribution-patching-scenarios-for-applying-an-opsmgr-cumulative-update.aspx" target="_blank">see also this article from Kevin Holman for more information</a>). You can download an archive with three packages (for all suported platforms) <a href="http://cid-de5df6855a3c5a4e.office.live.com/self.aspx/.Public/jamaAgentUpdate.rar" target="_blank">on this location</a>. If you create you own, just make sure the final name of the update package corresponds with the final strSourceFile variable value: </p>
<blockquote><p>jamaAgentUpdateIA64.exe –&gt; For the itanium platform      <br />jamaAgentUpdateX64.exe –&gt; For the x64 platform       <br />jamaAgentUpdateX86.exe –&gt; For the x86 platform</p>
</blockquote>
<p>&#160;</p>
<p>What we actually do is very simple. </p>
<ul>
<li>We detect the platform we are running on and construct the correct file name of the file to retrieve (this update package contains the required .msp files for the agent).</li>
<li>We retrieve the update package.</li>
<li>We schedule the update package to run in ## minutes and to run unattended.</li>
<li>We hope for the best <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </li>
</ul>
<p>If something goes wrong with the installation, the failure can be found in the log file created by the update. There are two logfiles: </p>
<blockquote><p>%TEMP%\jamaAgentUpdate.&lt;platform&gt;.log     <br />%TEMP%\jamaAgentUpdate.ENU.&lt;platform&gt;.log</p>
</blockquote>
<p>Also the package itself will again detect we if we are running on the correct platform and only start the update if the package is the correct platform version.</p>
<p>&#160;</p>
<p>As you can see in the .XML file, we use the jdfBaseDistribution account for retrieving the file. So you don’t need to configure the SCP server for every customer you have. Just make the file available for the jdfBaseDistribution account. The task itself is targeted against the health service. Select the “Agent By Version” leaf in the console, to get an overview of all your agents and their version:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb.png?w=221&#038;h=114" width="221" height="114" /></a></p>
<p>If you select a health service, the task pane will show you the new update task:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb1.png?w=489&#038;h=27" width="489" height="27" /></a></p>
<p>Note that the task is not version aware, so it will always be available and will run. So you can do an update over a current installed agent (which does work, without issues). After selecting the task, the tasks pane will be shown and you can change the arguments for the script.</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb2.png?w=551&#038;h=247" width="551" height="247" /></a></p>
<p>If you don’t change anything, the task will try to schedule the update to run in 120 minutes. If you require the another time, use the <font face="Courier New">/minutes:##</font> argument. The task will be scheduled ## minutes in the future. So if I want the update to run within 5 minutes:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb3.png?w=400&#038;h=116" width="400" height="116" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>The first thing the task does is checking for dependencies (for more information about the dependencies, <a href="http://support.microsoft.com/kb/2449679" target="_blank">see this link</a>). If no dependencies are found, the job is scheduled ## minutes in the future (or 120 if no override is given):</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image5.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb5.png?w=699&#038;h=501" width="699" height="501" /></a></p>
<p>&#160;</p>
<p>&#160;</p>
<p>If a dependency is found, the tasks will <strong><em>not</em></strong> schedule the update:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image6.png"><img style="background-image:none;border-bottom:0;border-left:0;padding-left:0;padding-right:0;display:inline;border-top:0;border-right:0;padding-top:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb6.png?w=703&#038;h=503" width="703" height="503" /></a></p>
<p>But as the output shows you can override the dependency detection, by adding the <font face="Courier New">/force:true</font> option in the argument list. If set the update will always run, even if there are dependencies detected.</p>
<p>&#160;</p>
<p>After the update is finished, the agent should reflect the new version information:</p>
<p><a href="http://jama00.files.wordpress.com/2011/05/image7.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/05/image_thumb7.png?w=876&#038;h=27" width="876" height="27" /></a></p>
<p>You now can update your manual installed agent, using the operations console <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/257/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/257/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/257/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=257&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2011/05/09/updating-manual-installed-agents-from-the-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/05/image_thumb7.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>JDF: Jama Distribution Framework</title>
		<link>http://jama00.wordpress.com/2011/03/28/jdf-jama-distribution-framework/</link>
		<comments>http://jama00.wordpress.com/2011/03/28/jdf-jama-distribution-framework/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 17:48:20 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[management packs]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/?p=228</guid>
		<description><![CDATA[This blog describes our framework for file distribution between a SCOM agent and our central SCOM environment. After this framework is installed, you will be able to transfer files between your SCOM agent and a central location.&#160; Before you continue, be warned. I can not deliver a single file, which will do all that I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=228&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This blog describes our framework for file distribution between a SCOM agent and our central SCOM environment. After this framework is installed, you will be able to transfer files between your SCOM agent and a central location.&#160; Before you continue, be warned. I can not deliver a single file, which will do all that I just promised. I will however guide you through the work that needs to be done to setup a file distribution framework for SCOM, but you will need to change scripts, compile the management pack and install and configure a secure copy server. Changes will be minimized as much as possible and most actions are automated with scripts. But first things first, let’s describe the general idea behind the framework……</p>
<p>&#160;</p>
<h1>Transferring files</h1>
<p>The idea behind the framework is to write an set of scripts, that would make it possible to transfer files to and from the SCOM agent. The main trigger for this wish was our installed base, which are manual installed agents only. Updating these agents manually is a long job for every CU update. If we could just schedule an update from the operations console and sit-back, that would be great. But in order to do that, we need to be able to get the required update files to the SCOM agent. Keep in mind that we do not have a single customer but multiple customers, all with (or without) their own file distribution method. Being able to distribute and update from the operations console itself would be ideal.</p>
<p>But transferring files should also be secure. <strong>Our solution:</strong> Secure Copy, based on private / public key pairs for data transfers.</p>
<p>And since we have multiple customers, we need to make sure that Customer A is not able to see or change any data we retrieve from Customer B (and vice versa). Therefor we have to implement a secure way to copy files to and from the SCOM agent and separate data based on customers. <strong>Our solution:</strong> A Secure Copy implementation, that is capable of creating virtual directory structures, based on a customer (secure copy) account.</p>
<p>We did not want to change any firewall rules (with the exception of adding a new management server). So we basically wanted to use communication from the SCOM agent on TCP port 5723 and only initiate communication from the SCOM agent. <strong>Our solution:</strong> A Secure Copy server configured to listen on port 5723 for secure copy clients.</p>
<p>Finally it needed to be implemented on all our agents, not just a subset of agents. <strong>Our solution:</strong> A Microsoft Windows Scripting Component, written in vbscript, which will run on all Windows versions we support (Windows 2000 and higher).</p>
<p>So if we draw this in a high overview, it would look like this:</p>
<p><a href="http://jama00.files.wordpress.com/2011/03/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;margin:5px;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/03/image_thumb.png?w=244&#038;h=190" width="244" height="190" /></a></p>
<p>And yes it looks very simple <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  So the first thing we need is a secure copy server.</p>
<p>&#160;</p>
<h1>Secure Copy server</h1>
<p>The secure copy server can be any implementation, as long as it is capable of implementing private/public key pairs and able to generate virtual directories. We use the <a href="http://www.bitvise.com/winsshd" target="_blank">bitvise winsshd</a> service. Now before we start implementing this service, we need to make some rules.</p>
<ol>
<li>Only logins with private/public ssh key pairs are allowed. </li>
<li>Only secure copy is allowed (no sftp or ssh). </li>
<li>There will only be one general (shared) account and this account has read only access only to it own virtual directories. We call the shared account: <strong><em>jdfBaseDistribution</em></strong> This will prevent accounts from uploading data to a “shared” location. This is also the account that will be used to distribute the framework. </li>
<li>Data will be compressed as much as possible, but the framework will not rely on the secure copy implementation and will “zip” the files to upload into a “package”. </li>
<li>When a “package” is downloaded, it is expected to be a “zip” file, which can be extracted at the SCOM agent side by the framework. </li>
<li>Files (not “packages”) that will be downloaded, must be compressed files to reduce network traffic (this is not forced by the framework). </li>
<li>Customer accounts will have the naming convention: jdfCustomer_&lt;CustomerName&gt; </li>
<li>The root (virtual) directory for every account will always be empty. All directories will be read only, with the exception of the “upload” directory. But it will not be possible to remove files from the “upload” directory. The following structure will be used for every customer </li>
</ol>
<blockquote style="margin-right:0;"><p><a href="http://jama00.files.wordpress.com/2011/03/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/03/image_thumb3.png?w=217&#038;h=63" width="217" height="63" /></a>&#160;</p>
<p>Off course you can implement your own directories and rules for read/write, but these are the rules we use to explain the framework. If you start with these, the examples and code will work correctly.</p>
<p>&#160;</p>
<p><strong><em>Note:</em></strong> The shared account (jdfBaseDistribution) will not have a /upload directory!</p>
</blockquote>
<h5>A seperate account for each customer</h5>
<p>We also need an account for every customer we support. Each customer will have the same folder layout (as show above), but this will be virtual directories. This will result in the same “view” for every customer, but data will be uploaded and downloaded from customer specific locations on the Secure Copy server.</p>
<p><a href="http://jama00.files.wordpress.com/2011/03/image4.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/03/image_thumb4.png?w=599&#038;h=104" width="599" height="104" /></a></p>
<blockquote><p><strong><em>Note:</em></strong> Files can not be deleted from the upload directory.</p>
</blockquote>
<p>As can be seen, the account jdfCustomer_JAMA has four virtual mount paths. And with the exception of the root path (which should never be used), all data is ‘re-directed’ to a directory specific for that account. So if we create a second account (jdfCustomer_JAMA00), you can see that it has its own ‘re-directed’ directories.</p>
<p><a href="http://jama00.files.wordpress.com/2011/03/image5.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/03/image_thumb5.png?w=604&#038;h=104" width="604" height="104" /></a></p>
<p>This results in the same view for both customers (the Virtual mount path), but data being stored and retrieved from physical different locations.</p>
<p>We only allow the secure copy protocol and only logins with private/public key pairs. On how to configure winsshd with private/public key pairs, <a href="http://www.bitvise.com/winsshd-usage-faq#public-key" target="_blank">see this link</a>.</p>
<p>&#160;</p>
<h5>ssh key pairs</h5>
<p>For each customer we need to create an ssh public/private key pair. We use <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">puttygen.exe</a> to create the key pairs. The public key is saved as “jdfCustomer_&lt;CustomerName&gt;.public” and the private key is saved as “jdfCustomer_&lt;CustomerName&gt;.private”.</p>
<blockquote><p><strong><em>Note:</em></strong> You can not use a password phrase for the private key file (not supported by the framework). So be sure to only distribute the private key file to the correct customer.</p>
</blockquote>
<p>When creating the keys with puttygen.exe, you should use the default Paramters, as shown below:</p>
<p><a href="http://jama00.files.wordpress.com/2011/03/image6.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2011/03/image_thumb6.png?w=462&#038;h=81" width="462" height="81" /></a></p>
<p>When your implementation of the secure copy server is working correctly you can continue with the next step: configuring the framework. Just make sure you can use the secure copy server with private/public key pairs before you continue.</p>
<p>&#160;</p>
<h1>The JDF Framework</h1>
<p>The JDF Framework itself needs to be configured for use in your environment. What is required is fully described in the documentation of the framework. Although I tried to create a generic framework, still some environment dependent settings are required. But first you should download the framework <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><a href="http://cid-de5df6855a3c5a4e.office.live.com/self.aspx/.Public/jamaDistributionFramework%5E_v0.9.24.zip" target="_blank">The framework can be downloaded here</a> </p>
<p><a href="http://jama00.files.wordpress.com/2011/04/jdf.pdf" target="_blank">The documentation can be downloaded here</a></p>
<p>&#160;</p>
<h1>What’s next</h1>
<p>If you have setup the framework, you can start testing it. The framework download includes two examples on how to use the framework. The first thing we created with this framework was the ability to update our manual installed agents from the console (we have this working in our test environment). In my next blog I will create a management pack which will update your (manual) installed agents to CU4. Just make sure you got the framework up and running <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  If you fail to do so just write a comment and I will try to answer your questions.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/228/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/228/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/228/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=228&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2011/03/28/jdf-jama-distribution-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/03/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/03/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/03/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/03/image_thumb5.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/03/image_thumb6.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>SCOM&#8217;s &#8220;un-discovery&#8221;. What doesn&#8217;t work here&#8230; And how to correct it.</title>
		<link>http://jama00.wordpress.com/2011/01/26/scoms-un-discovery-what-doesnt-work-here-and-how-to-correct-it/</link>
		<comments>http://jama00.wordpress.com/2011/01/26/scoms-un-discovery-what-doesnt-work-here-and-how-to-correct-it/#comments</comments>
		<pubDate>Wed, 26 Jan 2011 16:54:34 +0000</pubDate>
		<dc:creator>rob1974</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[management packs]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/?p=225</guid>
		<description><![CDATA[  SCOM’s main benefit of monitoring imho is it’s ability to discover what is running on a server and based on that information start to monitor the server with the appropriate rules. When you follow Microsoft’s best practices you’ll first perform a lightweight discovery to create a very basic class and have the more heavy [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=225&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p> </p>
<p>SCOM’s main benefit of monitoring imho is it’s ability to discover what is running on a server and based on that information start to monitor the server with the appropriate rules. When you follow Microsoft’s best practices you’ll first perform a lightweight discovery to create a very basic class and have the more heavy discoveries run against that basic class. This is pretty good stuff actually. it helps quite a lot for the performance of an agent as it will only run heavy discoveries if the server has an application role and never run on servers which have nothing to do with that application.</p>
<p>However, I’ve recently found out a drawback with this 2 step discovery, which I can probably explain the best with a real world example:</p>
<p>Discover the windows domain controllers on “windows computers” (the management pack from where this discovery runs in is an exception. usually it’s in the application mp itself; apparently MS thought of domain controllers being basic info. similar discoveries for workstation and member servers can be found in this mp as well). For this discovery a wmi query is used to determine if the “windows computer” is a domain controller as well (SELECT NumberOfProcessors FROM Win32_ComputerSystem WHERE DomainRole &gt; 3; if this returns something, it’s a dc)</p>
<p><a href="http://jama00.files.wordpress.com/2011/01/image.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:5px;" title="image" src="http://jama00.files.wordpress.com/2011/01/image_thumb.png?w=919&#038;h=76" border="0" alt="image" width="919" height="76" /></a></p>
<p>When it is a “windows domain controller” it will run a few other discoveries to determine more info.<a href="http://jama00.files.wordpress.com/2011/01/image1.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://jama00.files.wordpress.com/2011/01/image_thumb1.png?w=919&#038;h=126" border="0" alt="image" width="919" height="126" /></a></p>
<p>Just by looking at the classes you can imagine it’s not really lightweight anymore.</p>
<p><a href="http://jama00.files.wordpress.com/2011/01/image2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;" title="image" src="http://jama00.files.wordpress.com/2011/01/image_thumb2.png?w=380&#038;h=317" border="0" alt="image" width="380" height="317" /></a></p>
<p>So far so good, on all my windows computer I run a simple query and if that query returns something SCOM will also run a script that founds more interesting stuff about the DC.</p>
<p>But here’s the catch with this kind of discovery. Suppose I don’t need a certain DC anymore, but I still need to keep the server as it’s running some application I still need to use and monitor. What will happen? The lightweight discovery will do its job. It will correctly determine that the server is not a “windows domain controller” anymore and as a result it won’t run the script-discovery anymore.</p>
<p>You might ask, why is that bad, we didn’t want that, did we? Yes you are correct, we didn’t want to run this discovery against servers that aren’t DC’s, but SCOM doesn’t unlearn the discovered classes automatically. Because this discovery never runs again SCOM never unlearns this server doesn’t have the “Active Directory Domain Controller Computer Role” anymore. And this is the class that is used for targetting rules and monitors. So allthough SCOM knows the server isn’t a “windows domain controller” anymore, it still is monitoring the “Active Directory Domain Controller Computer Role”. This will result in quite a lot of noise (script errors, ldap failures, etc).</p>
<p>For now, there’s just a workaround available. You will need to override the 2nd discovery for that particular server. As the first discovery doesn’t include this server as an object of class, you can’t override the discovery for a “specific object of class: Windows Domain Controller”. You’ll need to create a group and include the server object. Then use the override the object discovery “for a group…” and choose the group you’ve just created.</p>
<p><a href="http://jama00.files.wordpress.com/2011/01/image3.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border:0;margin:5px;" title="image" src="http://jama00.files.wordpress.com/2011/01/image_thumb3.png?w=533&#038;h=125" border="0" alt="image" width="533" height="125" /></a></p>
<p>What’s the point of disabling a discovery that didn’t run anyway? Well now you can go to powershell and run the “Remove-DisabledMonitoringObject” cmdlet. This will remove the discovered object classes for this discovery and all of the monitoring attached to those classes.</p>
<p>Discoveries make SCOM stand out from other monitoring tools, but it needs to work both ways. Finding out this took me about 1 day. And that’s just 1 issue with 1 server (DNS was also installed on this server and had the same issue). Loads of servers might change role without me knowing about it and when it’s not being reported to me I’ll just have extra noise in SCOM. I’m just not sure if this can be picked up within SCOM itself or that the “un-discovery” needs to be done by the mp’s logic. For the AD part it needs to be picked up by Microsoft anyway, but if the logic is build in the management pack then it will have an impact on all the custom build mp’s by all you SCOM authors out there.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/225/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/225/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/225/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=225&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2011/01/26/scoms-un-discovery-what-doesnt-work-here-and-how-to-correct-it/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cf7b53165bf74a34da3a800f1509b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rob1974</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/01/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/01/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/01/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2011/01/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>Distributing files with SCOM</title>
		<link>http://jama00.wordpress.com/2010/10/29/distributing-files-with-scom/</link>
		<comments>http://jama00.wordpress.com/2010/10/29/distributing-files-with-scom/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 11:24:17 +0000</pubDate>
		<dc:creator>MarcKlaver</dc:creator>
				<category><![CDATA[management packs]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/2010/10/29/distributing-files-with-scom/</guid>
		<description><![CDATA[Didn’t you wish there was a way to distribute files, using the SCOM environment? And not depend on others to get a file across? Well we did and we wrote a management pack that does just that; distributing files to the target servers. But hold on, don’t get too exited it is still SCOM and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=215&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Didn’t you wish there was a way to distribute files, using the SCOM environment? And not depend on others to get a file across? Well we did and we wrote a management pack that does just that; distributing files to the target servers. But hold on, don’t get too exited it is still SCOM and no file distribution application, so our solution has a few disadvantages:</p>
<ol>
<li>Targeting – If you target the MP to a class, all servers in that class will get the MP (even if all rules in the MP are disabled by default). </li>
<li>Scheduling – There is no way to schedule a delivery to a remote server. As soon as the MP is imported and the RMS detects the new configuration, the MP will be distributed. </li>
</ol>
<p>Both issues can result in very high network traffic, if not taken into account. Now the first one we can slightly control, by targeting at specific classes. The more specific the class the better. Of course we wanted our files to be distributed to all computers <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  The second one is only under control by controlling the time of the MP import. Of course this is not ideal, but till now we had nothing.</p>
<p>What we do is creating a management pack, that will hold a script. In that script, all other files we want to distribute are placed in a comment section at the bottom of the script, after being converted to a hex notation. It looks something like this:</p>
<blockquote><p><font size="2" face="Courier New">&#8216;&lt;BEGIN_FILE&gt;jamaMaintenanceMode.vbs        <br />&#8217;272D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D         <br />&#8217;0A272046696C6520202020202020203A206A616D614D61696E         <br />&#8217;74206C6F6720656E74727920746F207075742074686520636F         <br />&#8217;61696E74656E616E6365206D6F64652E0D0A2720246376735F         <br />&#8217;652E7662732C7620312E3420323030392F30382F3331203130         <br />&#8217;2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D2D</font></p>
</blockquote>
<p>At the other side (the agent side) we reconstruct the files again, and place the files on a fixed location. Now we have distributed the files using SCOM! The solution can distribute both text based files as binary files, but binary files will double in size when converted to the hex notation. So distributing a 500K binary file, will end up with a 1MB script to be distributed (and a 2MB script on the agent side, were it is stored in unicode).</p>
<p>So in short it is a nice method for distributing either small files or to a very limited set of targets. Distributing large files to all agents isn’t a good idea with this method (but it will work).</p>
<p>&#160;</p>
<p>What do you need:</p>
<p><a href="http://jama00.files.wordpress.com/2010/10/image.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2010/10/image_thumb.png?w=216&#038;h=152" width="216" height="152" /></a> </p>
<p>The above files and directory structure.&#160; You should create this directory structure before continuing:</p>
<blockquote><p>include_binary – This is the location were you need to place your binary files, which need to be distributed.</p>
<p>include_text – This is the location were you need to place your text files, which need to be distributed.</p>
<p>output – This directory is used to store the generated code.</p>
</blockquote>
<p>The files you need can be found <a href="http://cid-de5df6855a3c5a4e.office.live.com/self.aspx/.Public/SCOM%5E_FileDistribution.zip" target="_blank">here!</a></p>
<p>&#160;</p>
<p>Now importing this MP’s without editing, results in a management pack doing nothing. So if you want to distribute a file, this is how:</p>
<ol>
<li>You should edit the BuildTargetScript.cmd file for every change in your distribution you want to be delivered:
<p><a href="http://jama00.files.wordpress.com/2010/10/image1.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2010/10/image_thumb1.png?w=325&#038;h=142" width="325" height="142" /></a> </p>
<p>The script that will generate the files, will check for this version number. If it is not equal to what is found in the registry it will recreate the files.&#160; The STR_TARGET_DIR variable will hold your target directory on the target machines. This variable is used to check if the files can be generated correctly on your local desktop.</p>
</li>
<li>You should also change the jamaTextDistribution.vbs
<p><a href="http://jama00.files.wordpress.com/2010/10/image2.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2010/10/image_thumb2.png?w=645&#038;h=114" width="645" height="114" /></a> </p>
<p>These two constants will be combined to create your target directory for the files:</p>
<p>%SystemDrive%\STR_BASE_DIR\STR_DISTRIBUTION_DIR</p>
<p>All files will be placed inside the above directory (this combined directory, must be equal to the STR_TARGET_DIR form the BuildTargetScript.cmd file above).</p>
<p>Secondly you should change were in the registry you would like to store the version number:</p>
<p><a href="http://jama00.files.wordpress.com/2010/10/image3.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2010/10/image_thumb3.png?w=503&#038;h=28" width="503" height="28" /></a> </p>
<p>You only have to do this once. If the key can not be found, it will be created.</p>
<p>&#160;</p>
</li>
<li>Finally you have to change the jamaDistribution.Distribution.xml file that will be distributed. Running the BuildTargetScript.cmd file will generate an ouput file in the output directory. The <strong><em>complete</em></strong> contents of that file needs to be inserted into this .xml file. Below you can find the location where inside the .xml file you need to paste the contents of the output file:
<p><a href="http://jama00.files.wordpress.com/2010/10/image4.png"><img style="display:inline;border-width:0;" title="image" border="0" alt="image" src="http://jama00.files.wordpress.com/2010/10/image_thumb4.png?w=645&#038;h=99" width="645" height="99" /></a>&#160; </p>
</li>
<li>Now import the two management packs and your file(s) will be distributed.&#160; <strong>NOTE</strong>: Default the script will run every hour, but if all files are present, the impact is minimal. </li>
</ol>
<p>&#160;</p>
<p>What’s next? </p>
<p>Well since we can now get any file at the agent side we can start building a complete file distribution system (which we will <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ) and after that we can finally automate the update of our manual installed agents and fully automate the manual installation!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/215/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/215/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/215/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=215&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2010/10/29/distributing-files-with-scom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8a361f8e4f5aaa8c1fe150859d77415?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">MarcKlaver</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/10/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/10/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/10/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/10/image_thumb3.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/10/image_thumb4.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>WINS Connector Alert</title>
		<link>http://jama00.wordpress.com/2010/08/26/wins-connector-alert/</link>
		<comments>http://jama00.wordpress.com/2010/08/26/wins-connector-alert/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 13:57:08 +0000</pubDate>
		<dc:creator>rob1974</dc:creator>
				<category><![CDATA[management packs]]></category>
		<category><![CDATA[troubleshooting]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/?p=199</guid>
		<description><![CDATA[The WINS connector checks the WINS lookup by a DNS server. I suppose the monitor only runs when you have configured DNS to use WINS forward lookup. In order for this monitor to work you need to have a static record in WINS which doesn’t exist in DNS (this is not mentioned in the knowledge, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=199&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The WINS connector checks the WINS lookup by a DNS server. I suppose the monitor only runs when you have configured DNS to use WINS forward lookup.</p>
<p><a href="http://jama00.files.wordpress.com/2010/08/image.png"><img style="display:inline;border:0;" title="image" src="http://jama00.files.wordpress.com/2010/08/image_thumb.png?w=406&#038;h=115" border="0" alt="image" width="406" height="115" /></a></p>
<p>In order for this monitor to work you need to have a static record in WINS which doesn’t exist in DNS (this is not mentioned in the knowledge, but it runs a nslookup, so make sure it doesn’t resolve by using dns) and configure the monitor to lookup this HostName. Default the monitor looks up “PlaceHolder”, so you could just create a Wins record named “PlaceHolder”.</p>
<p>I had done this, but i still received errors and when i ran the nslookup query i did receive a valid response for placeholder, so the wins connector does work.</p>
<p>The knowledge mention something about a debug flag to get some helpful troubleshooting information to solve the issue. The description of the debug events i got:</p>
<blockquote><p>DNS.TTL.vbs : Starting DNS.TTL.vbs Host:PlaceHolder Server:xxx.xxx.xxx.xxx</p>
<p>DNS.TTL.vbs : Writing Property Bag . State=False ttl1:0 ttl2:0 Authority Flag:</p></blockquote>
<p>It’s not helpful at all and even worse it’s wrong as well. The vbscript file’s name is ttl.vbs, so look for this in the “system center management” folder. Also the parameters are wrong so manually running it fails as well.</p>
<p>To run the script manually on the dns server open a commandline box and run:</p>
<blockquote><p>path.to.ttl.vbs&gt;cscript /nologo ttl.vbs &lt;hostname&gt; &lt;dnsserverip&gt; false</p>
<p>&lt;hostname&gt;= static wins entry, which doesnt exist in dns (placeholder)  (The script says to fill in fqdn, but this is incorrect as well).</p>
<p>&lt;dnsserverip&gt; = listening ip address of the dns server </p>
<p>bolean = debug flag. When you set this to true you get the worthless debug information in scom, so keep it on false <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></blockquote>
<p>When you save the output to an xml file and open it you’ll get something like this.</p>
<blockquote><p>&lt;Collection&gt;</p>
<p>  &lt;DataItem type=&#8221;<strong>System.PropertyBagData</strong>&#8221; time=&#8221;<strong>2010-08-25T17:18:49.1162249+02:00</strong>&#8221; sourceHealthServiceId=&#8221;<strong>BA0AF2AD-5058-0DA0-D5D0-BF3CDD878B88</strong>&#8220;&gt;</p>
<p>    &lt;ConversionType&gt;StateData&lt;/ConversionType&gt;</p>
<p>    &lt;Property Name=&#8221;<strong>state</strong>&#8221; VariantType=&#8221;<strong>8</strong>&#8220;&gt;ERROR&lt;/Property&gt;</p>
<p>  &lt;/DataItem&gt;</p>
<p>&lt;/Collection&gt;</p></blockquote>
<p>i&#8217;ve modified the script so it will run show the stdout for the nslookup and show a line that it has exited the regex compare function (which it shouldn&#8217;t when it functions ok).</p>
<p>Just save the script below to a temp location and run it from there. When you run this vbs and all goes well you should just get this as output:</p>
<blockquote><p>std_output:</p>
<p>&#8212;&#8212;&#8212;&#8212;<br />
Got answer:<br />
    HEADER:<br />
        opcode = QUERY, id = 1, rcode = NOERROR<br />
        header flags:  response, want recursion, recursion avail.<br />
        questions = 1,  answers = 1,  authority records = 0,  additional = 0</p>
<p>    QUESTIONS:<br />
        xxxxxxxxxxx, type = PTR, class = IN<br />
    ANSWERS:<br />
    -&gt;  xxxxxxxxxxxxxxxxx</p>
<p>        name = xxxxxxxxxxxxxxxxxx<br />
        ttl = 168 (2 mins 48 secs)</p>
<p>&#8212;&#8212;&#8212;&#8212;<br />
Server:  xxxxxxxxxxxxxxxxxx<br />
Address:  xxxxxxxxxxxxxxxxxx</p>
<p>&#8212;&#8212;&#8212;&#8212;<br />
Got answer:<br />
    HEADER:<br />
        opcode = QUERY, id = 2, rcode = NOERROR<br />
        header flags:  response, auth. answer, want recursion, recursion avail.<br />
        questions = 1,  answers = 1,  authority records = 0,  additional = 0</p>
<p>    QUESTIONS:<br />
        xxxxxxxxxxxxxx, type = A, class = IN<br />
    ANSWERS:<br />
    -&gt;  xxxxxxxxxxxx</p>
<p>        internet address = xxxxxxxxxxxx<br />
        ttl = 1200 (20 mins)</p>
<p>&#8212;&#8212;&#8212;&#8212;<br />
Name:    xxxxxxxxxxxxxxx<br />
Address:  xxxxxxxxxxxx</p></blockquote>
<p>When it fails it will log a line before this output:</p>
<blockquote><p>exit function at regex: 16</p></blockquote>
<p>This means the WINS_LOOKUP_REGEX array fails at  “&#8221;^\s*ttl = &#8220;,_” or the line after that.</p>
<p>I couldn’t be bothered to figure out the exact regular expression mismatch, rewrite the WINS_LOOKUP_REGEX array, disable the monitor and create a new one with a new script. I’ve just disabled this monitor as it’s just gives me incorrect information.</p>
<p>Modified script:</p>
<blockquote>
<pre>'
' Microsoft Corporation
' Copyright (c) Microsoft Corporation. All rights reserved.
'
' ttl.vbs
'
' Determine if a wins connector is healthy.
'
' Parameters -
'                       TargetComputer	The FQDN of the computer targeted by the script.
'			Server - the listening ip
'                      	DebugFlag          True / False

Option Explicit

SetLocale("en-us")

Const DNS_TRACEEVENTNUMBER	= 1125
Const DNS_SCRIPTNAME = "DNS.TTL.vbs"
Const SCOM_ERROR=1
Const SCOM_WARNING=2
Const SCOM_INFORMATIONAL=4
Const SCOM_PB_STATEDATA = 3
Const NSLOOKUP_PATH = "%SystemRoot%\system32\nslookup.exe" 

Dim ImagePath, oWMI, rc, oArgs, oAPI, oDiscoveryData, oInst, SourceID, ManagedEntityId, TargetComputer, OSVersion, oDebugFlag
Dim TTL1 , TTL2, AuthorityFlag
dim host,server,bolDebug
dim objAPI  ,boolWins , oPropertyBag
Dim  sCommand,iErrCode, sOutput, sError,m_sNetshPath ,aSubMatches,  oShell, objArgs

Dim WINS_LOOKUP_REGEX

WINS_LOOKUP_REGEX = Array( _
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
			      "^[\s]*questions = [0-9]*,",_
			      "^[\s]*answers = ",_
			      "[0-9]*,",_
			      "^[\s]*authority records = ",_
			      "[0-9]*",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 ".*\r\n",_
                                 "^\s*ttl = ",_
                                 "[0-9]*.*" )         

'***************
'
' start here.
'
'***************
On Error Resume Next

Set objAPI = CreateObject("MOM.ScriptAPI")
If Err.Number &lt;&gt; 0 Then
  Wscript.Quit
end if
Set oPropertyBag = objAPI.CreateTypedPropertyBag(3)
If Err.Number &lt;&gt; 0 Then
  ThrowErrorAndExit "CreateStateDataTypedPropertyBag failed. code = " &amp; Err.Number
end if

Set objArgs = WScript.Arguments
If objArgs.Count &lt;&gt; 3 Then
    Call objAPI.LogScriptEvent( DNS_SCRIPTNAME &amp; " &lt;host&gt;  &lt;computername&gt;  [debug [true | false]")
    wscript.Quit
End If 

host = objArgs(0)
server = objArgs(1)
bolDebug= objArgs(2)

Set oShell = CreateObject("WScript.Shell")
boolWins=cbool(false)
TTL1=0
TTL2=0

Set oShell = CreateObject("WScript.Shell")

trace "Starting " &amp; DNS_SCRIPTNAME &amp; " Host:" &amp; host  &amp; " Server:" &amp; server 

sOutput=ExecuteCmd("-debug -querytype=a " +host + " "+ server ,NSLOOKUP_PATH  ,true)
If  LCase(sOutput) &lt;&gt; "error" Then

	If   GetSubMatches( WINS_LOOKUP_REGEX, sOutput, sOutput, aSubMatches) Then

		TTL1=cint(aSubMatches(8) )
		AuthorityFlag=cint(aSubMatches(4) )

    end if
end if

if 	AuthorityFlag=1 then
	Wscript.sleep (1020)
	sOutput=ExecuteCmd("-debug -querytype=a " +host + " "+ server ,NSLOOKUP_PATH  ,true)
	If  LCase(sOutput) &lt;&gt; "error" Then

		If   GetSubMatches( WINS_LOOKUP_REGEX, sOutput, sOutput, aSubMatches) Then

			TTL2=cint(aSubMatches(8) )
			if ttl1&gt;ttl2 then
				 boolWins=cbool(true)
			end if
		end if
    end if
end if	

wscript.echo ""
wscript.echo "std_output:"
wscript.echo sOutput 

trace "Writing Property Bag . State=" &amp; cstr(boolWins) &amp; " ttl1:" &amp; cstr(ttl1) &amp; " ttl2:" &amp; cstr(ttl2) &amp; " Authority Flag:" &amp; cstr(	AuthorityFlag)

if boolWins=true then
	oPropertyBag.AddValue "state", "OK"
else
	oPropertyBag.AddValue "state", "ERROR"
end if
objAPI.AddItem(oPropertyBag)
If Err.Number &lt;&gt; 0 Then ThrowErrorAndExit "Error adding state data to property bag. code = " &amp; Err.Number
objAPI.ReturnItems
If Err.Number &lt;&gt; 0 Then ThrowErrorAndExit "Error returning property bag data. code = " &amp; Err.Number  

Set objAPI = Nothing
Set oPropertyBag = Nothing

Wscript.Quit

'*******************************************************

Sub ThrowErrorAndExit(Message)

   Err.Clear
   Call oAPI.LogScriptEvent(DNS_SCRIPTNAME, DNS_TRACEEVENTNUMBER, SCOM_ERROR, Message)
   WScript.Quit

End Sub

Sub Trace(Message)
   If (bolDebug) Then
      Call objAPI.LogScriptEvent(DNS_SCRIPTNAME, DNS_TRACEEVENTNUMBER, SCOM_INFORMATIONAL, Message)
   End If

End Sub

Function GetSubMatches(ByVal aRegexes, ByVal sText, ByRef sRemainingText, ByRef aCapturedSubMatches)
  Dim oRegex
  Set oRegex = New RegExp
  oRegex.Global = False

  Dim oMatches
  Dim oMatch
  Dim sPattern
  Dim aSubMatches()
  aCapturedSubMatches = aSubMatches

  GetSubMatches = False

  Dim i
  Dim lSubMatchCount

  lSubMatchCount = 0
  sRemainingText = sText

  dim intCount
  intCount = 0

  For i = 0 To UBound(aRegexes)
    sPattern = aRegexes(i)
    oRegex.Pattern = "^" &amp; sPattern
    Set oMatches = oRegex.Execute(sRemainingText)
    if oMatches.Count = 0 then
        wscript.echo "exit function at regex: " &amp; intCount
    end if
    If oMatches.Count &lt;&gt; 1 Then
      sRemainingText = sText
      Exit Function
    End If

    Set oMatch = oMatches(0)
    sRemainingText = Mid(sRemainingText, oMatch.Length + 1)

    ' save output If odd line, or only line.

    If i Mod 2 = 1 Then
      lSubMatchCount = lSubMatchCount + 1
      ReDim Preserve aSubMatches(lSubMatchCount - 1)
      aSubMatches(lSubMatchCount - 1) = oMatch.Value
    elseIf UBound(aRegexes)=0 Then
      lSubMatchCount = lSubMatchCount + 1
      ReDim Preserve aSubMatches(lSubMatchCount - 1)
      aSubMatches(lSubMatchCount - 1) = oMatch.Value
    End If
    intCount = intCount + 1
  Next

  GetSubMatches = True
  aCapturedSubMatches = aSubMatches

End Function

Function ExecuteCmd(strOptionToUse, strCmdToUse, boolReadOutput)
Dim ncControlcommand
Dim oShell
Dim curDir
Dim strExecOut

Set oShell = CreateObject("WScript.Shell")
curDir = oShell.CurrentDirectory
ncControlcommand =  "cmd.exe /C """ &amp; QuoteWrap(strCmdToUse) &amp; " " &amp; strOptionToUse &amp; " " &amp;"""" 

IF boolReadOutput Then
    strExecOut = RunCmd(ncControlcommand,true)
Else
    strExecOut = RunCmd(ncControlcommand,false)
End If
ExecuteCmd = strExecOut
End Function

Function RunCmd(CmdString, boolGetOutPut)
    Dim wshshell
    Dim oExec
    Dim output
    Dim strOutPut

    Set wshshell = CreateObject("WScript.Shell")
    Set oExec = wshshell.Exec(CmdString)
    Set output = oExec.StdOut
    Do While oExec.Status = 0
         WScript.Sleep 100
         if output.AtEndOfStream = false then
            IF boolGetOutPut Then
                    strOutPut = strOutPut &amp; output.ReadAll
                End IF
         else
              exit Do
         End If
    Loop
    IF boolGetOutPut Then
        strOutPut = strOutPut &amp; output.ReadAll
    Else
        strOutPut = "1"
    End IF    

    If oExec.ExitCode &lt;&gt; 0 Then
         strOutPut = "Error"

    End If

    Set wshshell = Nothing
    RunCmd = strOutPut
End Function

Function QuoteWrap(myString)
      If (myString &lt;&gt; "") And (left(mySTring,1) &lt;&gt; Chr(34)) And (Right(myString,1) &lt;&gt; Chr(34)) Then
            QuoteWrap = Chr(34) &amp; myString &amp; Chr(34)
      Else
            QuoteWrap = myString
      End If
End Function

Function IsValidObject(ByVal oObject)
  IsValidObject = False

  If IsObject(oObject) Then
    If Not oObject Is Nothing Then
      IsValidObject = True
    End If
  End If
End Function</pre>
</blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=199&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2010/08/26/wins-connector-alert/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cf7b53165bf74a34da3a800f1509b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rob1974</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/08/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
		<item>
		<title>What is the optimal setting for my environment when it comes to missed heartbeats?</title>
		<link>http://jama00.wordpress.com/2010/07/14/what-is-the-optimal-setting-for-my-environment-when-it-comes-to-missed-heartbeats/</link>
		<comments>http://jama00.wordpress.com/2010/07/14/what-is-the-optimal-setting-for-my-environment-when-it-comes-to-missed-heartbeats/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 17:06:21 +0000</pubDate>
		<dc:creator>rob1974</dc:creator>
				<category><![CDATA[Agent Settings]]></category>
		<category><![CDATA[Management Servers]]></category>

		<guid isPermaLink="false">https://jama00.wordpress.com/?p=176</guid>
		<description><![CDATA[I’m probably not the first to write about heartbeats and its mechanism. So just a quick overview of how it works. Heartbeat mechanisme: An agent sends out a heartbeat on the monitoring port 5723 to a management servers. The management server (rms actually) keeps track of the last received heartbeat of each agent in its [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=176&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’m probably not the first to write about heartbeats and its mechanism. So just a quick overview of how it works.</p>
<p>Heartbeat mechanisme: An agent sends out a heartbeat on the monitoring port 5723 to a management servers. The management server (rms actually) keeps track of the last received heartbeat of each agent in its management group. When an agent’s heartbeat hasn’t been received for X time alert “heartbeat failure” alert is generated. The heartbeat failure alert in turn triggers a ping on the agent-managed server’s FQDN. When this fails as well another alert will be generated, the “server unreachable” alert.</p>
<p>This blog is about the “X” time to wait before a heartbeat failure alert will be generated. X isn’t actually a direct configurable time. It’s a combination of 2 settings. The agent setting “the heartbeat interval” in seconds and the server setting “number of missed heartbeats allowed”. The default for this setting is 60 seconds and 3 missed heartbeats allowed. So “X” is default 60&#215;3 = 3 minutes.</p>
<p><a href="http://jama00.files.wordpress.com/2010/07/image.png"><img style="display:inline;border-width:0;" title="image" src="http://jama00.files.wordpress.com/2010/07/image_thumb.png?w=464&#038;h=296" border="0" alt="image" width="464" height="296" /></a></p>
<p><a href="http://jama00.files.wordpress.com/2010/07/image1.png"><img style="display:inline;border-width:0;" title="image" src="http://jama00.files.wordpress.com/2010/07/image_thumb1.png?w=473&#038;h=240" border="0" alt="image" width="473" height="240" /></a> </p>
<p>I assume the default is ok in most cases, but if you have a large and complex network or reboot servers without setting maintenance it might generate a lot of noise as well. So here’s what we did to find the optimal setting for X without starting to experiment with settings themselves.</p>
<p>By running the query below you can see the number of alerts for “Health Service HeartBeat Failure” and “Failed to Connect to Computer” with a closed status.</p>
<blockquote><p>Select alertstringname, count(*) as Number_of_alerts from AlertView<br />
where ResolutionState = 255<br />
and (alertstringname = &#8216;Health Service HeartBeat Failure&#8217; or alertstringname = &#8216;Failed to Connect to Computer&#8217;)<br />
group by AlertStringNAme<br />
order by 2 DESC</p></blockquote>
<p>When you haven’t changed retention for closed alerts it gives the number for about 1 week. For our environment it turned out to be around 3000 heartbeat alerts, which is about a weekly alert for each server. However most of these alerts are gone before someone looked at the “problem”.</p>
<p>In <a href="http://jama00.wordpress.com/2010/07/14/the-moving-average-threshold-alerts/">this post</a> i’ve given some queries to identify the auto closing alerts already. I modified the query a bit to only see heartbeat failure and failed to connect to computer alerts.</p>
<p>By running the query below you can see the number of heartbeat failure alerts which were closed within 2 minutes after creation.</p>
<blockquote><p>Select alertstringname, count(*) as Number_of_alerts from AlertView<br />
where ResolutionState = 255<br />
and ResolvedBy =&#8217;system&#8217;<br />
and (alertstringname = &#8216;Health Service HeartBeat Failure&#8217; or alertstringname = &#8216;Failed to Connect to Computer&#8217;)<br />
and DATEDIFF(MI,TimeRaised,TimeResolved) &lt;= 2<br />
group by AlertStringNAme<br />
order by 2 DESC</p></blockquote>
<p>The result of this query in my environment was 1450 alerts were auto-closed within the first 2 minutes. So if X would have been 5, it probably would have prevented 1450 alerts.</p>
<p>I’ve plotted the X versus the expected number of heartbeat failures. Please note i left out quite a lot of values for X, but i haven’t adjusted the scale for this and after 1 hour i still would get a few heartbeat failures.</p>
<p><a href="http://jama00.files.wordpress.com/2010/07/image2.png"><img style="display:inline;border-width:0;" title="image" src="http://jama00.files.wordpress.com/2010/07/image_thumb2.png?w=433&#038;h=274" border="0" alt="image" width="433" height="274" /></a></p>
<p>So what’s the optimal X for this environment?</p>
<p>Actually you still can’t say what the setting should be. It still depends on what is acceptable for your environment as we’re talking about how fast you can detect whether a server is down or not. Setting X to 60 would give us the least of heartbeats, but it wouldn’t make any sense either. I believe finding a balance between noise and when we have to take a look is more important, i’d say the optimal X for my environment is 7-8. This will leave about 800 heartbeats alerts weekly, but this is acceptable for us.</p>
<p>Also note you might miss unexpected reboots whatever the value for X is. If it’s important not to miss them, just pick up the event about unexpected reboot from the system eventlog by an alert rule and make that alert critical.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/jama00.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/jama00.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/jama00.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/jama00.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/jama00.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/jama00.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/jama00.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/jama00.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=jama00.wordpress.com&amp;blog=10609845&amp;post=176&amp;subd=jama00&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://jama00.wordpress.com/2010/07/14/what-is-the-optimal-setting-for-my-environment-when-it-comes-to-missed-heartbeats/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/6cf7b53165bf74a34da3a800f1509b42?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">rob1974</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/07/image_thumb.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/07/image_thumb1.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>

		<media:content url="http://jama00.files.wordpress.com/2010/07/image_thumb2.png" medium="image">
			<media:title type="html">image</media:title>
		</media:content>
	</item>
	</channel>
</rss>
