Tim from QuickenLoans contacted me and wanted verification about ability to use AlertMessage override (discussed in my previous post) with unit monitor for SNMP network device. He was using “Device Status Check” monitor and we can see that initial requirement for override use is met – monitor is PUBLIC.
<UnitMonitor ID="Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus" Accessibility="Public" Target="Microsoft.SystemCenter.NetworkDevice" Enabled="true" TypeID="Microsoft.SystemCenter.NetworkDevice.CheckDeviceState" ParentMonitorID="Health!System.Health.AvailabilityState">
<Category>PerformanceHealth</Category>
<OperationalStates>
<OperationalState HealthState="Success" MonitorTypeStateID="DeviceUp" ID="Success" />
<OperationalState HealthState="Error" MonitorTypeStateID="DeviceDown" ID="Error" />
</OperationalStates>
<Configuration>
<Interval>120</Interval>
<IsWriteAction>false</IsWriteAction>
<IP>$Target/Property[Type="Microsoft.SystemCenter.NetworkDevice"]/IPAddress$</IP>
<CommunityString>$Target/Property[Type="Microsoft.SystemCenter.NetworkDevice"]/CommunityString$</CommunityString>
<Version>$Target/Property[Type="Microsoft.SystemCenter.NetworkDevice"]/Version$</Version>
<SnmpVarBinds>
<SnmpVarBind>
<OID>.1.3.6.1.2.1.1.5.0</OID>
<Syntax>1</Syntax>
<Value VariantType="8" />
</SnmpVarBind>
</SnmpVarBinds>
</Configuration>
</UnitMonitor>
As evident above (and to my surprise), this monitor doesn’t have any alert associated with its state change! Luckily, plenty of overrides which are required to raise alert are accessible thru UI, which leads me to believe that some of you were able to raise alert already. For those who never did, nor needed to do such work, we will use GenerateAlert, AlertOnState, AlertPriority and AlertServerity overrides. I’m going to include those overrides in my Management Pack directly and will not spend much time with them as they should be self-explanatory.
<!-- generate alert -->
<MonitorPropertyOverride ID="MonitorPropertyOverrideGenerateAlert" Context="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Enforced="false" Monitor="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus" Property="GenerateAlert">
<Value>true</Value>
</MonitorPropertyOverride>
<!-- auto-resolve this alert when state improves -->
<MonitorPropertyOverride ID="MonitorPropertyOverrideAutoResolve" Context="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Enforced="false" Monitor="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus" Property="AutoResolve">
<Value>true</Value>
</MonitorPropertyOverride>
<!-- minimal state used for alert creation -->
<MonitorPropertyOverride ID="MonitorPropertyOverrideAlertOnState" Context="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Enforced="false" Monitor="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus" Property="AlertOnState">
<Value>Error</Value>
</MonitorPropertyOverride>
<!-- priority -->
<MonitorPropertyOverride ID="MonitorPropertyOverrideAlertPriority" Context="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Enforced="false" Monitor="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus" Property="AlertPriority">
<Value>Normal</Value>
</MonitorPropertyOverride>
<!-- severity -->
<MonitorPropertyOverride ID="MonitorPropertyOverrideAlertSeverity" Context="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice" Enforced="false" Monitor="NetworkDeviceLibrary!Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus" Property="AlertSeverity">
<Value>MatchMonitorHealth</Value>
</MonitorPropertyOverride>
But as some of you are probably aware, using those overrides only helps alert to be raised, but alert will not have any user friendly description. This is where my previous post comes handy. It provides the guide on how to customize alert description. Our new alert would need description, but that is equal to customizing anyway, so same process applies here as well. Initially we need to define alert description and retrieve its GUID from database after it was imported (described in my previous post).
<StringResource ID="Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus.Override.AlertMessageResourceID" />
<DisplayString ElementID="Microsoft.SystemCenter.NetworkDevice.CheckDeviceStatus.Override.AlertMessageResourceID">
<Name>Network device is down</Name>
<Description>Network device identified by commu