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

invalid UTF-8 label value #259

Closed
HyperDevil opened this issue Jan 12, 2018 · 6 comments
Closed

invalid UTF-8 label value #259

HyperDevil opened this issue Jan 12, 2018 · 6 comments

Comments

@HyperDevil
Copy link

uname: 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
Target: Mikrotik Cloudcore router
MIB: http://download2.mikrotik.com/Mikrotik.mib
snmp_exporter version: 0.8.0 AMD64
Error message:

invalid UTF-8 label value
prometheus[420]: level=warn ts=2018-01-12T13:57:23.022072428Z caller=scrape.go:673 component="target manager" scrape_pool=snmp-mikrotik target="http://127.0.0.1:9116/snmp?module=mikrotikExperimentalModule&target=10.0.2.1" msg="append failed" err="invalid UTF-8 label value"

Generator config:

 mikrotikExperimentalModule:
    walk: [sysUpTime, interfaces, mtxrHealth, mtxrSystem, mtxrInterfaceStats, mtxrWireless, mtxrDHCP, mtxrOptical, mikrotik, mtXMetaInfo, mtXRouterOsGroups]

snmp.yml file:
https://pastebin.com/sauds104

@brian-brazil
Copy link
Contributor

brian-brazil commented Jan 12, 2018

This is probably your device's MIB claiming that a string is DisplayString or SnmpAdminString but it not actually being ASCII/UTF-8. I'd suggest confirming this, and filing a bug with your vendor.

@HyperDevil
Copy link
Author

Is there any way to find out which string?

@brian-brazil
Copy link
Contributor

I'd suggest bisecting the metrics in the snmp.yml to narrow it down.

@HyperDevil
Copy link
Author

The strange thing is that the output directly via curl from snmp_exporter works fine.
Is there any way in can grep or awk the output from snmp_exporter to find the culprit?

@brian-brazil
Copy link
Contributor

Curl wouldn't be doing UTF-8 validation. I doubt grep or awk have the features required, I usually spot these sort of things by hand.

@HyperDevil
Copy link
Author

You can close the issue.

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

No branches or pull requests

2 participants