Reverse monitor a server, alert when it's up not down

We have a situation where we want to be alerted if a normally powered down server is powered up for a set number of days, i.e. if someone forgot to power it back down. Its default state is powered off, only powering on to perform a specific task, then being powered down again.
I was asked to create an alert if it is left powered on.
Was thinking of a simple icmp ping as we need nothing fancier, but still, how to alert when a number of pings succeed rather than fail.
Any ideas?

Hi Ervia

How comfortable are you authoring your own monitoring outside of the SCOM console? You could use ICMP Ping Probe - Microsoft.SystemCenter.ICMPProbe (ProbeActionModuleType) to create a monitor type that looks for a status code of 0 (ping succeeds) as it’s unhealthy condition detection. I don’t have any examples to hand, but I could put something together if you’re not sure how.


You could monitor the ‘System\System Up Time’ performance counter.

Here is an example:

<UnitMonitor ID="Custom.UnitMonitor.SystemUpTime" Accessibility="Internal" Enabled="true" Target="Windows!Microsoft.Windows.Server.OperatingSystem" ParentMonitorID="Health!System.Health.ConfigurationState" Remotable="true" Priority="Normal" TypeID="Perf!System.Performance.ThresholdMonitorType" ConfirmDelivery="false">
	<AlertSettings AlertMessage="Custom.UnitMonitor.SystemUpTime.AlertMessage">
		<OperationalState ID="UnderThreshold" MonitorTypeStateID="UnderThreshold" HealthState="Success" />
		<OperationalState ID="OverThreshold" MonitorTypeStateID="OverThreshold" HealthState="Warning" />
		<CounterName>System Up Time</CounterName>
		<Frequency>600</Frequency><!--10 minutes in seconds-->
		<Threshold>86400</Threshold><!--1 day in seconds-->
		<StringResource ID="Custom.UnitMonitor.SystemUpTime.AlertMessage" />
	<LanguagePack ID="ENU" IsDefault="true">
			<DisplayString ElementID="Custom.UnitMonitor.SystemUpTime">
				<Name>System Up Time</Name>
				<Description>Monitors the "System\System Up Time" performance counter to alert when a Windows Server has been up too long.</Description>
			<DisplayString ElementID="Custom.UnitMonitor.SystemUpTime.AlertMessage">
				<Name>System Up Time</Name>
				<Description>Monitors the "System\System Up Time" performance counter to alert when a Windows Server has been up too long.</Description>
			<DisplayString ElementID="Custom.UnitMonitor.SystemUpTime" SubElementID="UnderThreshold">
			<DisplayString ElementID="Custom.UnitMonitor.SystemUpTime" SubElementID="OverThreshold">

Hi Keith,
The answer is not comfortable at all :slight_smile: It would be great if you could put something together as the idea is great, but creating it is way out of my knowledge.

Hi Ervia

I’ve put an example MP on github. Its pretty simple, but should cover your requirement. Or if it doesn’t the source code should point you in the right direction.

Hope that helps.

1 Like