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

Mikrotik "mtxrNote" field with more than 239 characters times-out exporter #682

Closed
carlosedp opened this issue Sep 2, 2021 · 0 comments
Closed

Comments

@carlosedp
Copy link
Contributor

On a Mikrotik router, if the note field mtxrNote (usually used for MOTD and etc) has more than 249 characters, the exporter times-out

Host operating system: output of uname -a

Linux on x86 in Docker.
Linux 2176cd2c77f6 5.10.25-linuxkit #1 SMP Tue Mar 23 09:27:39 UTC 2021 x86_64 GNU/Linux

snmp_exporter version: output of snmp_exporter -version

Latest image from prom/snmp-exporter:master as of 2021-09-02.

What device/snmpwalk OID are you using?

Mikrotik Router, OID .1.3.6.1.4.1.14988.1.1.7.5.0 named mtxrNote.0.

If this is a new device, please link to the MIB(s).

https://box.mikrotik.com/f/a41daf63d0c14347a088/?dl=1

What did you do that produced an error?

Walk device SNMP tree when "mtxrNote" field contains more than 239 characters.

What did you expect to see?

Successful fetch of all data. The snmpwalk utility successfully reads all OIDs with the note field longer than 240 chars:

$ snmpwalk -c public 192.168.1.1 .1.3.6.1.4.1.14988
...
SNMPv2-SMI::enterprises.14988.1.1.7.5.0 = STRING: "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
...

What did you see instead?

Run with 239 chars:

level=debug ts=2021-09-02T17:48:11.725Z caller=main.go:98 module=mikrotik target=192.168.1.1 msg="Starting scrape"
level=debug ts=2021-09-02T17:48:11.725Z caller=collector.go:128 module=mikrotik target=192.168.1.1 msg="Getting OIDs" oids=2
level=debug ts=2021-09-02T17:48:11.734Z caller=collector.go:137 module=mikrotik target=192.168.1.1 msg="Get of OIDs completed" oids=2 duration_seconds=8.593858ms
level=debug ts=2021-09-02T17:48:11.734Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.2.1.2
level=debug ts=2021-09-02T17:48:11.851Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.2.1.2 duration_seconds=116.753289ms
level=debug ts=2021-09-02T17:48:11.851Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.2.1.25
level=debug ts=2021-09-02T17:48:11.887Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.2.1.25 duration_seconds=36.00234ms
level=debug ts=2021-09-02T17:48:11.887Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.2.1.31
level=debug ts=2021-09-02T17:48:12.062Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.2.1.31 duration_seconds=175.160412ms
level=debug ts=2021-09-02T17:48:12.062Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.4.1.14988
level=debug ts=2021-09-02T17:48:13.041Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.4.1.14988 duration_seconds=978.998572ms
level=debug ts=2021-09-02T17:48:13.041Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.4.1.2021.10.1.1
level=debug ts=2021-09-02T17:48:13.097Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.4.1.2021.10.1.1 duration_seconds=56.304339ms
level=debug ts=2021-09-02T17:48:13.097Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.4.1.2021.10.1.2
level=debug ts=2021-09-02T17:48:13.154Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.4.1.2021.10.1.2 duration_seconds=56.939079ms
level=debug ts=2021-09-02T17:48:13.166Z caller=main.go:109 module=mikrotik target=192.168.1.1 msg="Finished scrape" duration_seconds=1.440777804

Run with 240 chars timing-out:

level=debug ts=2021-09-02T17:49:30.620Z caller=main.go:98 module=mikrotik target=192.168.1.1 msg="Starting scrape"
level=debug ts=2021-09-02T17:49:30.620Z caller=collector.go:128 module=mikrotik target=192.168.1.1 msg="Getting OIDs" oids=2
level=debug ts=2021-09-02T17:49:30.650Z caller=collector.go:137 module=mikrotik target=192.168.1.1 msg="Get of OIDs completed" oids=2 duration_seconds=29.827656ms
level=debug ts=2021-09-02T17:49:30.650Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.2.1.2
level=debug ts=2021-09-02T17:49:30.845Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.2.1.2 duration_seconds=194.989196ms
level=debug ts=2021-09-02T17:49:30.845Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.2.1.25
level=debug ts=2021-09-02T17:49:30.884Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.2.1.25 duration_seconds=38.489825ms
level=debug ts=2021-09-02T17:49:30.884Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.2.1.31
level=debug ts=2021-09-02T17:49:31.048Z caller=collector.go:174 module=mikrotik target=192.168.1.1 msg="Walk of subtree completed" oid=1.3.6.1.2.1.31 duration_seconds=163.708968ms
level=debug ts=2021-09-02T17:49:31.048Z caller=collector.go:161 module=mikrotik target=192.168.1.1 msg="Walking subtree" oid=1.3.6.1.4.1.14988
level=info ts=2021-09-02T17:49:51.054Z caller=collector.go:225 module=mikrotik target=192.168.1.1 msg="Error scraping target" err="error walking target 192.168.1.1: request timeout (after 3 retries)"
level=debug ts=2021-09-02T17:49:51.054Z caller=main.go:109 module=mikrotik target=192.168.1.1 msg="Finished scrape" duration_seconds=20.433978244
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

1 participant