upsBasicBatteryStatus

UIGeneratedMonitorbf7af8351d9447e886b410f21bd8c1fc (UnitMonitor)

Date: 2012-03-21
Author: Justin Bennett
Web: http://justin-bennett-msjc.blogspot.com/

Description: SCOM Monitor that polls APC UPS Units using Ralph Burri's custom snmp provider library. Returns error and alert if not in normal status. The OID's for the APC UPS units where looked up from SolarWinds.

References:
http://rburri.wordpress.com/2008/04/29/snmp-discovery-provider-for-opsmgr-2007/
http://support.ipmonitor.com/mibs/POWERNET-MIB/info.aspx

Element properties:

TargetCustom.JB.APC.Management.Pack.SNMPDevice
Parent MonitorSystem.Health.AvailabilityState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityError
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeSystem.SnmpProbe.2SingleEvent2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
UPS Battery Status
Unit Attributes:
Location : {0}
Model : {1}
Name : {2}
Serial Number : {3}
Date of Manuf. : {4}
Batt. Last Repl. : {5}
Batt. Packs : {6}

Monitor Name
APC UPS :: Battery Status

Monitor Type
SNMP - QA Monitor

SNMP Object Type
upsBasicBatteryStatus

OID
1.3.6.1.4.1.318.1.1.1.2.1.1.0

Returns
The status of the UPS batteries: {7}

Legend
1 = Unknown
2 = Battery Normal
3 = Battery Low

Note: The enumeration 'Battery Low' (3) indicates that the UPS will be unable to sustain the current load, and its services will be lost if power is not restored.

Monitoring Condition

Pass if equal to 2
Monitor failure indicates that the battery status is either 'Unknown' (communication with the UPS has been lost) or that the battery is running low and will turn off shortly. This is used as a final warning condition.
RunAsDefault

Source Code:

<UnitMonitor ID="UIGeneratedMonitorbf7af8351d9447e886b410f21bd8c1fc" Accessibility="Public" Enabled="true" Target="Custom.JB.APC.Management.Pack.SNMPDevice" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="Snmp!System.SnmpProbe.2SingleEvent2StateMonitorType" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="UIGeneratedMonitorbf7af8351d9447e886b410f21bd8c1fc_AlertMessageResourceID">
<AlertOnState>Error</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>High</AlertPriority>
<AlertSeverity>Error</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/UPSLocation$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/Model$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/UPSName$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/SerialNumber$</AlertParameter4>
<AlertParameter5>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/DateOfManufacture$</AlertParameter5>
<AlertParameter6>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/BatteryLastReplaceDate$</AlertParameter6>
<AlertParameter7>$Target/Property[Type="Custom.JB.APC.Management.Pack.SNMPDevice"]/BatteryNumOfBattPacks$</AlertParameter7>
<AlertParameter8>$Data/Context/SnmpVarBinds/SnmpVarBind[1]/Value$</AlertParameter8>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="UIGeneratedOpStateId476ee5057a61461b8620e287b6cf47a4" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
<OperationalState ID="UIGeneratedOpStateIda58c259f360d43ed86d37b1e93442933" MonitorTypeStateID="FirstEventRaised" HealthState="Error"/>
</OperationalStates>
<Configuration>
<FirstInterval>60</FirstInterval>
<FirstIsWriteAction>false</FirstIsWriteAction>
<FirstIP>$Target/Property[Type="NetLib!Microsoft.SystemCenter.NetworkDevice"]/IPAddress$</FirstIP>
<FirstCommunityString>$Target/Property[Type="NetLib!Microsoft.SystemCenter.NetworkDevice"]/CommunityString$</FirstCommunityString>
<FirstVersion>$Target/Property[Type="NetLib!Microsoft.SystemCenter.NetworkDevice"]/Version$</FirstVersion>
<FirstSnmpVarBinds>
<SnmpVarBind>
<OID>1.3.6.1.4.1.318.1.1.1.2.1.1.0</OID>
<Syntax>0</Syntax>
<Value VariantType="8"/>
</SnmpVarBind>
</FirstSnmpVarBinds>
<FirstExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">/DataItem/SnmpVarBinds/SnmpVarBind[1]/Value</XPathQuery>
</ValueExpression>
<Operator>NotEqual</Operator>
<ValueExpression>
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</FirstExpression>
<SecondInterval>60</SecondInterval>
<SecondIsWriteAction>false</SecondIsWriteAction>
<SecondIP>$Target/Property[Type="NetLib!Microsoft.SystemCenter.NetworkDevice"]/IPAddress$</SecondIP>
<SecondCommunityString>$Target/Property[Type="NetLib!Microsoft.SystemCenter.NetworkDevice"]/CommunityString$</SecondCommunityString>
<SecondVersion>$Target/Property[Type="NetLib!Microsoft.SystemCenter.NetworkDevice"]/Version$</SecondVersion>
<SecondSnmpVarBinds>
<SnmpVarBind>
<OID>1.3.6.1.4.1.318.1.1.1.2.1.1.0</OID>
<Syntax>0</Syntax>
<Value VariantType="8"/>
</SnmpVarBind>
</SecondSnmpVarBinds>
<SecondExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="String">/DataItem/SnmpVarBinds/SnmpVarBind[1]/Value</XPathQuery>
</ValueExpression>
<Operator>Equal</Operator>
<ValueExpression>
<Value Type="String">2</Value>
</ValueExpression>
</SimpleExpression>
</SecondExpression>
</Configuration>
</UnitMonitor>