As part of the verification process for the solution of
HZN-1177 (implementation of the NX-OS Adapter for telemetry), I found that adding more details on the example Groovy script, will help people understand what's required to do on the Nexus Switch in order to get the data, and what's required to do on Groovy to process the expected data.
As explained on my comments on the PR for that issue:
I suggest to rename /opt/opennms/etc/resource-types/nxos-cpu-resource.xml with /opt/opennms/etc/resource-types/nxos-resource.xml, and put the following content on it:
And replace the content of /opt/opennms/etc/telemetryd-adapters/cisco-nxos-telemetry-interface.groovy with the attached content.
The above config was tested against an actual Nexus Switch, and the content is good enough to provide enough context and background information to any operator who wants to configure Telemetry data.