question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SNMP errors with embedded null character

See original GitHub issue

Note: If you have a feature request, you should contact support so the request can be properly tracked.

Output of the info page

root@b157353ac90d:/# s6-svstat /var/run/s6/services/agent/
up (pid 389) 130 seconds

Additional environment details (Operating System, Cloud provider, etc): Synology (DSM 7.0.1-42218) serving SNMP v2 with UPS (TRIPPLITE SMART1500LCD) hooked up to the synology over USB Datadog 7.32.3 running via docker (nomad on the synology)

Config for SNMP:

          instances:
            - ip_address: 192.168.3.2
              snmp_version: 2
              port: 161
              community_string: home
              min_collection_interval: 60
              enforce_mib_constraints: false
              metric_tags:
                - OID: .1.3.6.1.2.1.1.5.0
                  tag: snmp_host
                  symbol: sysName
                - OID: .1.3.6.1.2.1.1.5.0
                  tag: host
                  symbol: sysName
              metrics: # https://global.download.synology.com/download/Document/Software/DeveloperGuide/Firmware/DSM/All/enu/Synology_DiskStation_MIB_Guide.pdf
                - OID: .1.3.6.1.4.1.6574.4.3.6.1
                  name: upsBatteryRuntimeValue
                - OID: .1.3.6.1.4.1.6574.4.3.1.1.0
                  name: upsBatteryChargeValue
                - OID: .1.3.6.1.4.1.6574.4.2.12.1
                  name: upsInfoLoadValue
                - OID: .1.3.6.1.4.1.6574.4.2.1
                  name: upsInfoStatus

output of snmpwalk for those values

$ snmpwalk -v 2c -c home 192.168.3.2 .1.3.6.1.4.1.6574.4.3.6.1
iso.3.6.1.4.1.6574.4.3.6.1.0 = INTEGER: 2232
$ snmpwalk -v 2c -c home 192.168.3.2 .1.3.6.1.4.1.6574.4.3.1.1.0
iso.3.6.1.4.1.6574.4.3.1.1.0 = Opaque: Float: 100.000000
$ snmpwalk -v 2c -c home 192.168.3.2 .1.3.6.1.4.1.6574.4.2.12.1
iso.3.6.1.4.1.6574.4.2.12.1.0 = Opaque: Float: 17.000000
$ snmpwalk -v 2c -c home 192.168.3.2 .1.3.6.1.4.1.6574.4.2.1
iso.3.6.1.4.1.6574.4.2.1.0 = STRING: "OL"

Steps to reproduce the issue:

  1. Add that config above

Describe the results you received:

2021-12-17 15:01:32 UTC | CORE | INFO | (pkg/collector/worker/check_logger.go:37 in CheckStarted) | check:snmp | Running check...
2021-12-17 15:01:32 UTC | CORE | WARN | (pkg/collector/python/datadog_agent.go:124 in LogMessage) | snmp:8a868ff1a5a67f44 | (snmp.py:461) | Failed to collect metrics for 192.168.3.2:161 - embedded null character
2021-12-17 15:01:32 UTC | CORE | INFO | (pkg/collector/worker/check_logger.go:56 in CheckFinished) | check:snmp | Done running check

Describe the results you expected:

Id expect upsBatteryRuntimeValue, upsBatteryChargeValue, upsInfoLoadValue, upsInfoStatus to be ingested

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
myoung34commented, Feb 22, 2022

👋 any updates?

im currently working around this with https://github.com/myoung34/synology-ups-datadog but its less than ideal

0reactions
AlexandreYangcommented, Apr 8, 2022

Hi @myoung34

@AlexandreYang looks like this might be related to gosnmp?

Looks like so.

Thanks you for making all those tests.

Do you mind opening an issue on https://github.com/gosnmp/gosnmp with the results from your previous post ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

"ValueError: embedded null character" when using open()
I am simply trying to open the files so I can use them but I keep getting the error "ValueError: embedded null character"...
Read more >
Truncation of trap by snmptrapd with DisplayString ending in null
I am receiving a trap with the defined in the following MIB excerpt: [Removed for clarity] ... embedded null characters, and display them...
Read more >
Getting Null values when trying to SNMP to a device ... - N-able
When we try to discover the device from the probe we get no information on the system information and we get NULL values...
Read more >
Thread: Tons of errors-> "snmpd.o:1: error: stray '\177 ... - SourceForge
snmplib /.libs/libnetsnmp.a -ldl -lm snmpd.o:1: error: stray '\177' in program ... error: stray '\20' in program snmpd.o:1:39: warning: null character(s) ...
Read more >
Truncation of trap by snmptrapd with DisplayString ending in null
SNMP uses a length-value approach to representing strings. ... should be able to handle embedded null characters, and display them sensibly.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found