The node and interface counters of the Evaluation Layer are incorrect

Description

When I implemented the evaluation layer, the logic to identify nodes versus interfaces was deterministic:

https://github.com/OpenNMS/opennms/blob/master/features/timeseries-evaluate/src/main/java/org/opennms/netmgt/collection/persistence/evaluate/EvaluateStats.java#L142

Unfortunately, that is not the case anymore, as now after all the refactoring made over the years (since the evaluation layer exists), and now "getResource().getParent().getName()" returns something different.

With the current state of the code, I think the checkNode method should receive the CollectionResource entity. There, check the resource type, decide if the resource belongs to Pollerd (interface) or Collectd (node), and increase the appropriate counter.

Currently, both nodes and interfaces are counted as interfaces, and here is how they appear in memory:

The nodes should be agalue-mbp and opennms. The rest are, as you can see, interfaces. Note that "fs/snmp" is not part of the node path identifier anymore. That leads to show the counters as:

Note that "node" has zero, whereas "interfaces" contains the total number of interfaces plus nodes.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Benjamin Reed November 2, 2021 at 2:15 PM

Merged to foundation-2019

Alejandro Galue October 4, 2021 at 2:48 PM

Fixed

Details

Assignee

Reporter

HB Grooming Date

HB Backlog Status

Components

Priority

PagerDuty

Created May 7, 2021 at 5:51 PM
Updated November 9, 2021 at 4:16 PM
Resolved November 2, 2021 at 2:15 PM