Configure Counter Behavior

Simple Network Management Protocol (SNMP) uses counters to record data points. The data collector polls the counters, and reports the differences in the counters over time. When the counter hits a preset limit, the counter resets to zero. The data collector assumes that the rollover happens no more than once per poll. If a rollover happens more than once, the resulting data is inaccurate. To resolve the issue of inaccurate data, take one of the following actions:
Simple Network Management Protocol (SNMP) uses counters to record data points. The data collector polls the counters, and reports the differences in the counters over time. When the counter hits a preset limit, the counter resets to zero. The data collector assumes that the rollover happens no more than once per poll. If a rollover happens more than once, the resulting data is inaccurate. To resolve the issue of inaccurate data, take one of the following actions:
  • Poll more often to ensure that the data is accurate
  • Use a 64-bit counter instead of a 32-bit counter
  • Show gaps in the data and leave out the inaccurate data
A counter can also go backwards, which indicates that the data is incorrect. The data collector interprets the backward behavior as a large spike in data, and discards the data point.
Bad Counter Deltas
The delta value for counters is calculated by comparing one poll cycle to the previous poll cycle. When the data collector receives bad delta values, the values are discarded for calculation purposes. Occasionally, the counter value receives a bad poll result, and the value decreases. When the counter value shows a decrease, the data collector skips the bad value.
When
showGapsOnCounterRollover=true
, the data collector discards the previous delta baseline. As a result, the data collector cannot calculate the delta for the next poll cycle.
The following table shows an example of the delta behavior when showGapsOnCounterRollover=true:
Poll Cycle
Counter Value
Delta Baseline
Delta Value
Utilization
Poll1
96
95
1
normal
Poll2
97
96
1
normal
Poll3
30 (bad value)
97
null (drop)
gap
Poll4
99
reset
null (drop)
gap
Poll5
100
99
1
normal
Show Gaps in Data
To show gaps in the data, change the default behavior. Repeat this procedure on each data collector.
The following global settings apply to all devices that a particular data collector polls.
Follow these steps:
  1. Create the
    <DC_installation_directory>
    /IMDataCollector/
    apache-karaf-*
    /etc/com.ca.im.dm.snmp.collector.SnmpCollector.cfg
    file on the data collector host.
    • DC_installation_directory
      The installation directory for the data collector.
      Default:
      /opt
    • apache-karaf-*
      The installation directory for Apache Karaf.
      Example:
      apache-karaf-4.2.6
  2. Add the following line to the file:
    showGapsOnCounterRollover=true
    showGapsOnCounterRollover32=true
    Default:
    • showGapsOnCounterRollover=false
    • showGapsOnCounterRollover32=false
  3. Save the file.
    The new behavior takes effect immediately.
When you hide gaps, the following logic continues to protect against some spikes in the data:
  • If a 64-bit counter appears to wrap at the 32-bit mark, the SNMP agent on the device is likely using the 32-bit counter. If the counter goes from an initial value below the maximum value of a 32-bit counter to a lower value,
    DX NetOps Performance Management
    computes the delta at the counter wrap as a 32-bit counter.
  • If the delta exceeds a certain limit for either a 32-bit or a 64-bit counter, the data point is dropped.
Limit Delta Values
For 32-bit or 64-bit counters, the delta value is likely an error when both of the following criteria apply:
  • A counter rollover occurs
  • The delta is greater than the maximum allowable delta value
    Default: 2^32 for 32-bit; 2^63 for 64-bit
If an error occurs, the value is discarded for calculation purposes, and the report data shows a gap of one poll cycle. You can configure the behavior to increase or decrease the maximum allowable delta value. Repeat this procedure on each data collector.
Follow these steps:
  1. Open the
    <DC_installation_directory>
    /IMDataCollector/
    apache-karaf-*
    /etc/com.ca.im.dm.snmp.collector.SnmpCollector.cfg
    file.
    • DC_installation_directory
      The installation directory for the data collector.
      Default:
      /opt
    • apache-karaf-*
      The installation directory for Apache Karaf.
      Example:
      apache-karaf-4.2.6
  2. To set a non-default threshold, add the following line to the file:
    largeDeltaValueThreshold=integer
    largeDeltaValueThreshold32=
    <integer>
    • Integer
      Specifies the threshold for delta values.
  3. Default:
    • largeDeltaValueThreshold32=2147483648 (0x80000000, or 2^31)
    • largeDeltaValueThreshold=9223372036854775807 (0x7fffffffffffffff, or 2^63-1)
    When a counter rollover occurs,
    DX NetOps Performance Management
    ignores delta values at or above the threshold.
Counter Rollover Log
The counter rollover log tracks detailed information about each counter rollover for all devices on a data collector. Use this log to verify counter behavior and troubleshoot counter issues.
Locate the log on the data collector that polls the relevant device:
/opt/IMDataCollector/apachxxxx/data/log/CounterRollover.log
The log contains currently applied configuration values, rollover events, IP addresses, and OIDs.
Example:
2016-03-07 12:54:13,480 | INFO | ecutor-thread-58 | CounterRollover | .dm.snmp.rdp.impl.SnmpDeltaCache 327 | 186 - com.ca.im.data-collection-manager.core.interfaces - 2.8.0.SNAPSHOT | | Delta calculated is greater than or equal to 2147483648; dropping response: previous=1 / current=0 for ip 10.42.96.32, OID 1.3.6.1.4.1.9.9.42.1.3.5.1.39.2222, itemID 906, in poll group 211.