• Icon: Sub-task Sub-task
    • Resolution: Won't fix
    • Icon: Minor Minor
    • None
    • 1.6.5
    • Server (S)
    • None

      I have improved the APC Battery template and thought I'd share it. Changes compared to the default template you ship with 1.6.5:

      • occasional zero values are ignored (using max(120) instead of last(0)) - happens with APC units every now and then
      • being explicit about the number of minutes left (10 and 5) running on battery
      • added dependency of the 10 minute alert on the 5 minute alert (so the 10 minute alert doesn't occur if the 5 minute alert is active)
      • added upsBasicOutputStatus (.1.3.6.1.4.1.318.1.1.1.4.1.1.09 item which tells whether an APC UPS is on line or on battery or in other states.
      • added a trigger that fires if the APC UPS loses power and goes on battery ( {Template_APC_Battery:upsBasicOutputStatus.last(0)}

        =3)

      • fixed the number of seconds left on battery (you used the value 10 but that means seconds so I changed it to 600 - triggering an alert 10 seconds before the lights go out is pretty useless and probably not intended)

      Here goes the template:

      <?xml version="1.0"?>
      <zabbix_export version="1.0" date="24.09.09" time="21.06">
      <hosts>
      <host name="Template_APC_Battery">
      <useip>0</useip>
      <dns></dns>
      <ip>0.0.0.0</ip>
      <port>10050</port>
      <status>3</status>
      <groups>
      <group>Templates</group>
      </groups>
      <items>
      <item type="1" key="upsAdvBatteryTemperature" value_type="3">
      <description>APC: Battery Temperature</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units></units>
      <multiplier>0</multiplier>
      <delta>0</delta>
      <formula>1</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.2.2.2.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      </item>
      <item type="1" key="upsAdvOutputCurrent" value_type="0">
      <description>APC: Load Current (Amps)</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units></units>
      <multiplier>0</multiplier>
      <delta>0</delta>
      <formula>0.01</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.4.2.4.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      </item>
      <item type="1" key="upsAdvOutputLoad" value_type="0">
      <description>APC: Output Load (%)</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units></units>
      <multiplier>0</multiplier>
      <delta>0</delta>
      <formula>0.01</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.4.2.3.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      </item>
      <item type="1" key="upsAdvReplaceBatteryIndicator" value_type="3">
      <description>APC: Replace Battery Indicator</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>600</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units></units>
      <multiplier>0</multiplier>
      <delta>0</delta>
      <formula>1</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.2.2.4.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      <valuemap>APC Battery Replacement Status</valuemap>
      </item>
      <item type="1" key="upsAdvRunTimeRemaining" value_type="3">
      <description>APC: Run Time Remaining</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units>s</units>
      <multiplier>1</multiplier>
      <delta>0</delta>
      <formula>0.01</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.2.2.3.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      </item>
      <item type="1" key="upsBasicBatteryStatus" value_type="3">
      <description>APC: Battery Status</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units></units>
      <multiplier>0</multiplier>
      <delta>0</delta>
      <formula>1</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.2.1.1.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      <valuemap>APC Battery Status</valuemap>
      </item>
      <item type="1" key="upsBasicBatteryTimeOnBattery" value_type="3">
      <description>APC: Time On Battery</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units>s</units>
      <multiplier>1</multiplier>
      <delta>0</delta>
      <formula>0.01</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.2.1.2.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      </item>
      <item type="1" key="upsBasicOutputStatus" value_type="3">
      <description>APC: Basic Output Status</description>
      <ipmi_sensor></ipmi_sensor>
      <delay>30</delay>
      <history>7</history>
      <trends>365</trends>
      <status>0</status>
      <units></units>
      <multiplier>0</multiplier>
      <delta>0</delta>
      <formula>1</formula>
      <lastlogsize>0</lastlogsize>
      <logtimefmt></logtimefmt>
      <delay_flex></delay_flex>
      <params></params>
      <trapper_hosts></trapper_hosts>
      <snmp_community>public</snmp_community>
      <snmp_oid>.1.3.6.1.4.1.318.1.1.1.4.1.1.0</snmp_oid>
      <snmp_port>161</snmp_port>
      <snmpv3_securityname></snmpv3_securityname>
      <snmpv3_securitylevel>0</snmpv3_securitylevel>
      <snmpv3_authpassphrase></snmpv3_authpassphrase>
      <snmpv3_privpassphrase></snmpv3_privpassphrase>
      <valuemap>APC Battery Basic Output Status</valuemap>
      </item>
      </items>
      <triggers>
      <trigger>
      <description>APC: High Battery Temperature -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsAdvBatteryTemperature.last(0)}>40</expression>
      <url></url>
      <status>0</status>
      <priority>5</priority>
      <comments></comments>
      </trigger>
      <trigger>
      <description>APC: Loss of Input Power -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsBasicBatteryStatus.last(0)}#2</expression>
      <url></url>
      <status>0</status>
      <priority>5</priority>
      <comments></comments>
      </trigger>
      <trigger>
      <description>APC: Replace Battery -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsAdvReplaceBatteryIndicator.last(0)}#1</expression>
      <url></url>
      <status>0</status>
      <priority>5</priority>
      <comments></comments>
      </trigger>
      <trigger>
      <description>APC: Battery time left: <5 minutes -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsAdvRunTimeRemaining.max(60)}<300</expression>
      <url></url>
      <status>0</status>
      <priority>5</priority>
      <comments></comments>
      </trigger>
      <trigger>
      <description>APC: Battery time left: <10 minutes -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsAdvRunTimeRemaining.max(120)}<600</expression>
      <url></url>
      <status>0</status>
      <priority>4</priority>
      <comments></comments>
      </trigger>
      <trigger>
      <description>APC: Output Load Too High -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsAdvOutputLoad.last(0)}>90</expression>
      <url></url>
      <status>0</status>
      <priority>2</priority>
      <comments></comments>
      </trigger>
      <trigger>
      <description>APC: Running on battery -

      {HOSTNAME}</description>
      <type>0</type>
      <expression>{{HOSTNAME}

      :upsBasicOutputStatus.last(0)}=3</expression>
      <url></url>
      <status>0</status>
      <priority>4</priority>
      <comments></comments>
      </trigger>
      </triggers>
      </host>
      </hosts>
      <dependencies>
      <dependency description="Template_APC_Battery:APC: Battery time left: <10 minutes -

      {HOSTNAME}">
      <depends>usv1:APC: Battery time left: <5 minutes - {HOSTNAME}

      </depends>
      </dependency>
      </dependencies>
      </zabbix_export>

            Unassigned Unassigned
            signum Christoph Haas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: