GT APC Ups Battery RunTime Remaining

GT.APC.UPS.Monitor.upsAdvBatteryRunTimeRemaining (UnitMonitor)

SCOM Monitor that polls APC UPS Units. Returns error and alert if not in normal status.

References:
http://support.ipmonitor.com/mibs/POWERNET-MIB/info.aspx

Element properties:

TargetGT.APC.UPS.Device
Parent MonitorSystem.Health.AvailabilityState
CategoryCustom
EnabledTrue
Alert GenerateTrue
Alert SeverityWarning
Alert PriorityHigh
Alert Auto ResolveTrue
Monitor TypeSystem.NetworkManagement.SnmpProbe.2SingleEvent2StateMonitorType
RemotableTrue
AccessibilityPublic
Alert Message
GT APC ups Battery Runtime Remaining
Unit Attributes:
Name: {0}
Location: {1}
Primary Owner: {2}
IP : {3}

Monitor Name
APC UPS :: Battery Runtime Remaining

Monitor Type
SNMP - QA Monitor

SNMP Object Type
upsAdvBatteryRunTimeRemaining

OID
1.3.6.1.4.1.318.1.1.1.2.2.3.0

Returns
The status of the UPS battery run time remaining: {4}

Monitoring Condition

Pass if greater than 120000 time ticks (20 minutes)
The UPS battery run time remaining before battery exhaustion.
RunAsDefault

Source Code:

<UnitMonitor ID="GT.APC.UPS.Monitor.upsAdvBatteryRunTimeRemaining" Accessibility="Public" Enabled="true" Target="GT.APC.UPS.Device" ParentMonitorID="Health!System.Health.AvailabilityState" Remotable="true" Priority="Normal" TypeID="NetworkLibrary!System.NetworkManagement.SnmpProbe.2SingleEvent2StateMonitorType" ConfirmDelivery="false">
<Category>Custom</Category>
<AlertSettings AlertMessage="GT.APC.UPS.Monitor.upsAdvBatteryRunTimeRemaining_AlertMessageResourceID">
<AlertOnState>Warning</AlertOnState>
<AutoResolve>true</AutoResolve>
<AlertPriority>High</AlertPriority>
<AlertSeverity>Warning</AlertSeverity>
<AlertParameters>
<AlertParameter1>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/sysName$</AlertParameter1>
<AlertParameter2>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/Location$</AlertParameter2>
<AlertParameter3>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/PrimaryOwnerContact$</AlertParameter3>
<AlertParameter4>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPAddress$</AlertParameter4>
<AlertParameter5>$Data/Context/SnmpVarBinds/SnmpVarBind[1]/Value$</AlertParameter5>
</AlertParameters>
</AlertSettings>
<OperationalStates>
<OperationalState ID="GT.APC.UPS.Monitor.upsAdvBatteryRunTimeRemaining.Success" MonitorTypeStateID="SecondEventRaised" HealthState="Success"/>
<OperationalState ID="GT.APC.UPS.Monitor.upsAdvBatteryRunTimeRemaining.Error" MonitorTypeStateID="FirstEventRaised" HealthState="Warning"/>
</OperationalStates>
<Configuration>
<FirstInterval>600</FirstInterval>
<FirstIP>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPAddress$</FirstIP>
<FirstVersion>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPVersion$</FirstVersion>
<FirstSnmpVarBinds>
<SnmpVarBind>
<OID>.1.3.6.1.4.1.318.1.1.1.2.2.3.0</OID>
<Syntax>0</Syntax>
<Value VariantType="8"/>
</SnmpVarBind>
</FirstSnmpVarBinds>
<FirstExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">SnmpVarBinds/SnmpVarBind[OID=".1.3.6.1.4.1.318.1.1.1.2.2.3.0"]/Value</XPathQuery>
</ValueExpression>
<Operator>Less</Operator>
<ValueExpression>
<Value Type="Integer">120000</Value>
</ValueExpression>
</SimpleExpression>
</FirstExpression>
<SecondInterval>600</SecondInterval>
<SecondIP>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPAddress$</SecondIP>
<SecondVersion>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/SNMPVersion$</SecondVersion>
<SecondSnmpVarBinds>
<SnmpVarBind>
<OID>.1.3.6.1.4.1.318.1.1.1.2.2.3.0</OID>
<Syntax>0</Syntax>
<Value VariantType="8"/>
</SnmpVarBind>
</SecondSnmpVarBinds>
<SecondExpression>
<SimpleExpression>
<ValueExpression>
<XPathQuery Type="Integer">SnmpVarBinds/SnmpVarBind[OID=".1.3.6.1.4.1.318.1.1.1.2.2.3.0"]/Value</XPathQuery>
</ValueExpression>
<Operator>GreaterEqual</Operator>
<ValueExpression>
<Value Type="Integer">120000</Value>
</ValueExpression>
</SimpleExpression>
</SecondExpression>
<NoOfRetries>3</NoOfRetries>
<Timeout>500</Timeout>
<Port>$Target/Property[Type="NetworkLibrary!System.NetworkManagement.Node"]/PortNumber$</Port>
</Configuration>
</UnitMonitor>