Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-5115

Default netsnmp group memAvailSwap / memTotalSwap threshold raises alerts for devices that have no swap space allocated

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.16, 1.9.93
    • Fix Version/s: 1.10.2
    • Component/s: Thresholding
    • Security Level: Default (Default Security Scheme)
    • Labels:

      Description

      Some NetSNMP devices have no swap space at all – for example, the lightweight OpenWrt distribution running on routers/wireless APs. In my case, I'm testing with OpenWrt 10.03.1 final (using snmpd-static - 5.4.2.1-5). This device has no swap and returns 0 for both "memAvailSwap" and "memTotalSwap". This causes alerts for the rule "expression="memAvailSwap / memTotalSwap * 100.0"", e.g. "A Threshold has been exceeded on node: ... The parameter memAvailSwap / memTotalSwap * 100.0 reached a value of 0 while the threshold is 10.0. This alert will be rearmed when memAvailSwap / memTotalSwap * 100.0 reaches 15.0."

      The fix is to add a filter so the threshold only applies when a non-zero value is returned for memTotalSwap.

      <group name="netsnmp" rrdRepository="/var/lib/opennms/rrd/snmp/">
      ...
      <expression
      description="Trigger an alert when the amount of available swap space reaches 10% or less of the total amount of swap space for two consecutive measurement intervals (by default, 5 minutes each) (indicating a possible lack of enough free physical memory), including only systems that report having a swap device of size greater than 0 bytes"
      type="low" ds-type="node" value="10.0" rearm="15.0"
      trigger="2" ds-label="" filterOperator="or" expression="memAvailSwap / memTotalSwap * 100.0">
      <resource-filter field="memTotalSwap">^[1-9]+[0-9]*$</resource-filter>
      </expression>
      ...
      </group>

      Thanks,
      Tim Miller Dyck

        Attachments

          Activity

            People

            • Assignee:
              agalue Alejandro Galue
              Reporter:
              tim@peaceworks.ca Tim Miller Dyck (work)
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 15 minutes
                15m
                Remaining:
                Remaining Estimate - 15 minutes
                15m
                Logged:
                Time Spent - Not Specified
                Not Specified