Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[receiver/snmpreceiver] Add support for SNMP objects of type counter64 #26119

Merged

Conversation

technimad-splunk
Copy link
Contributor

Description:
Add support for SNMP obecjts of type counter64. The gosnmp library already has support for this type.
And we already cast all numerical values to an int64.

Link to tracking Issue: #23897

Testing: Started the collector. No startup or runtime errors percieved.
I didn't have a SNMP target with counter64 support.
I'm relying on the gosnmp library to have tested interoperability.

Documentation: n/a

@djaglowski djaglowski merged commit 05ad1a7 into open-telemetry:main Aug 29, 2023
91 checks passed
@github-actions github-actions bot added this to the next release milestone Aug 29, 2023
@Scrappy79
Copy link

Scrappy79 commented Aug 31, 2023

@technimad-splunk, looks like the error is still ongoing with the latest contrib version (0.84.0):

Error scraping metrics {"kind": "receiver", "name": "XXXXX", "data_type": "metrics", "error": "problem with getting indexed data: data for OID '.1.3.6.1.2.1.31.1.1.1.6.1' not a supported type

  hw.network.io:
    description: Received and transmitted network traffic
    unit: By
    sum:
      aggregation: cumulative
      monotonic: true
      value_type: int
    column_oids:
      - oid: ".1.3.6.1.2.1.31.1.1.1.6"
        attributes:
          - name: hw.network.interface.descr

@technimad-splunk
Copy link
Contributor Author

Hi @Scrappy79, thanks for sharing.
I've found the issue. Data of a Counter64 is returned as a uint64, which isn't handled at the moment.
I will submit a new PR to fix this.

@Scrappy79
Copy link

Thanks @technimad-splunk, much appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants