Monitor APC Ambient Temperature Probe

For general APC monitoring, see Monitor APC UPS Units

APC UPS Ambient Temperature Probe

Note: APC names their external temp sensors something like “Integrated”. Log into the UPS (default apc:apc) and change it to “apcAmbientTemp”.

How this all works

Basically what we are going to do is add a new snmp mib for opennms to query. The data from that mib will be stored in the opennms DB and we will need to define a way to display it (create a graph for the data). Once opennms is storing the data we can start using the data to trigger events, alarms ect.

Step 1: Add a mib for opennms to query

Add the following to the datacollection/apc.xml file:

  • Within <snmp-collection... tag:
     <resourceType name="apcAmbientTemp" label="APC Ambient Probe Temperature (powernet393)"
       resourceLabel="${iemProbeName} (index ${index})">
      <persistenceSelectorStrategy class=""/>
      <storageStrategy class=""/>
  • Within <groups> tag:
       <group name="APC-StatusProbe" ifType="all">
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeName" type="string" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeCurrTemp" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeTempUnits" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeCurrHumid" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeHighTempV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeLowTempV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeHighHumidV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeLowHumidV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeMaxTempV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeMinTempV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeMaxHumidV" type="gauge32" />
         <mibObj oid="." instance="apcAmbientTemp" alias="iemProbeMinHumidV" type="gauge32" />
  • Within <systemDef name="APC UPS">:

Step 2: Add a graph definition so we can display the mib data opennms is collecting

Add the following $OPENNMS_HOME/etc/

  • Add to reports= the following:
 company.ambientTemp, companyambientHumid, \

Add anywhere in the file. Temperature"Current Ambient Temperature" \
  --vertical-label="Current Temperature" \
  DEF:currEstab={rrd1}:iemProbeCurrTemp:AVERAGE \
  DEF:minCurrEstab={rrd1}:iemProbeCurrTemp:MIN \
  DEF:maxCurrEstab={rrd1}:iemProbeCurrTemp:MAX \
  LINE2:currEstab#00ff00:"Current " \
  GPRINT:currEstab:AVERAGE:"Avg  \\: %8.2lf %s" \
  GPRINT:currEstab:MIN:"Min  \\: %8.2lf %s" \
  GPRINT:currEstab:MAX:"Max  \\: %8.2lf %s\\n" Humidity"Current Ambient Humidity" \
  --vertical-label="Current Humidity" \
  DEF:currEstab={rrd1}:iemProbeCurrHumid:AVERAGE \
  DEF:minCurrEstab={rrd1}:iemProbeCurrHumid:MIN \
  DEF:maxCurrEstab={rrd1}:iemProbeCurrHumid:MAX \
  LINE2:currEstab#00ff00:"Current " \
  GPRINT:currEstab:AVERAGE:"Avg  \\: %8.2lf %s" \
  GPRINT:currEstab:MIN:"Min  \\: %8.2lf %s" \
  GPRINT:currEstab:MAX:"Max  \\: %8.2lf %s\\n"

Step 3: Add some thresholds for the mib data opennms is collecting

Edit the /$OPENNMS_HOME/etc/thresholds.xml file and add the following after the <group name="netsnmp"... group

     <group name="apcups" rrdRepository="/opt/opennms/share/rrd/snmp/">
       <threshold type="high" ds-type="apcAmbientTemp" value="30"
           rearm="28.0" trigger="1" ds-label="iemProbeName"
           rearmedUEI="" ds-name="iemProbeCurrTemp"/>

Step 4: Add APC into the Threshold Daemon group

Edit the threshold daemon file $OPENNMS_HOME/etc/threshd-configuration.xml and create the threshold group as follows.

     <package name="apcups">
         <filter>IPADDR != '' &amp; (nodeSysOID LIKE '.')</filter>
         <include-range begin="" end=""/>
         <service name="SNMP" interval="300000" user-defined="false" status="on">
             <parameter key="thresholding-group" value="apcups"/>
         <outage-calendar xmlns="">OpenNMS Restart</outage-calendar>
         <outage-calendar xmlns="">LEP Move To Auriga</outage-calendar>

Step 5: Add a custom event to opennms based in the thresholds

Once this is completed, you will need to edit the events file $OPENNMS_HOME/etc/eventconf.xml to create the event custom UEI event. Append this to the end before the </event> tag.

   <event-file xmlns="">events/</event-file>
==Step 6: events/
Now, edit ''/opt/opennms/etc/events/'' and add the following.
<pre><?xml version="1.0" encoding="UTF-8"?>
<events xmlns="">
       <uei xmlns=""></uei>
       <event-label xmlns="">company : High Temperature</event-label>
       <descr xmlns="">High temperature alarm for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]</descr>
       <logmsg dest="logndisplay">High temperature alarm for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
       <severity xmlns="">Major</severity>
       <alarm-data reduction-key="%uei%!%nodeid%!%parm[label]%" alarm-type="1" auto-clean="false" />
       <uei xmlns=""></uei>
       <event-label xmlns="">company : High Temperature - Re-Armed</event-label>
       <descr xmlns="">High Temp rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]</descr>
       <logmsg dest="logndisplay">High Temp rearmed for %service% datasource %parm[ds]% on interface %interface%, parms: %parm[all]%</logmsg>
       <severity xmlns="">Normal</severity>
              reduction-key="%uei%:%nodeid%:%parm[label]%" alarm-type="2" auto-clean="true" />

Step 7: Add notifications to opennms based in the events you have defined

Add to $OPENNMS_HOME/etc/notifications.xml before the </notifications> tag.

    <notification name="High Temperature" status="on" writeable="yes">
        <uei xmlns=""></uei>
        <description xmlns="">High Temperature in Server Room</description>
        <rule xmlns="">(IPADDR IPLIKE *.*.*.*)</rule>
        <destinationPath xmlns="">IDS-SysAdmin</destinationPath>
        <text-message xmlns="">Node: %nodelabel% &amp;#xd;&amp;#xd;https://opennms_server/opennms/event/detail.jsp?id=%eventid%</text-message>
        <subject xmlns="">High Temperature (%nodelabel%)</subject>
        <numeric-message xmlns="">&amp;#xd;</numeric-message>
    <notification name="High Temperature Re-Armed" status="on" writeable="yes">
        <uei xmlns=""></uei>
        <description xmlns="">High Temperature in Server Room</description>
        <rule xmlns="">(IPADDR IPLIKE *.*.*.*)</rule>
        <destinationPath xmlns="">IDS-SysAdmin</destinationPath>
        <text-message xmlns="">Node: %nodelabel% &amp;#xd;&amp;#xd;https://opennms_server/opennms/event/detail.jsp?id=%eventid%</text-message>
        <subject xmlns="">Re-Armed High Temperature (%nodelabel%)</subject>
        <numeric-message xmlns="">&amp;#xd;</numeric-message>

This is also available at GitHub - opennms-config-modules/apc: OpenNMS configuration module for APC devices.

I Think there internal sensor are named integrated , Am I correct ?

Honestly, I don’t have access to APC equipment any more, so I can’t verify.

Is “apcAmbientTemp” the added external sensor that connects through an RJ-45 ?

Some of the context of this original post were migrated from our previous wiki site, so I’m not the original author of this entire post. I don’t believe sensor connects via RJ-45, but IIRC, it is an add on option for some models.