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

snmp_profiles: fixes wrong values and unify OIDs #789

Merged
merged 4 commits into from
Mar 19, 2024
Merged

Conversation

FFHener
Copy link
Contributor

@FFHener FFHener commented Feb 22, 2024

  • fix scale for bitrate of ports (example)
  • collect out errors of interfaces as well (example with no errors)
  • set correct type for interface errors and bitrate
  • use the correct OID for uptime of tplink-switches (example of uptime working) and edgeswitches
  • always start a OID with a .
  • Always use the Description/Label of a Interface
    • this helps to know which Interface is what
    • this might resolve in some Interfaces not being reported correctly if they have the same names
    • for better readability of the monitoring data i prefer Descriptions

We might want to update the /etc/collectd/conf.d/bbb-snmp.conf file after this PR got merged for affected router to get correct data reported. This can be done without a sysupgrade by simply replacing this file and doing a reload of collectd.

@FFHener FFHener marked this pull request as draft February 24, 2024 15:05
@FFHener FFHener marked this pull request as draft February 24, 2024 15:05
@FFHener FFHener changed the title snmp_profiles: several small fixes snmp_profiles: fixes wrong values and unify OIDs Feb 24, 2024
@FFHener FFHener marked this pull request as ready for review February 24, 2024 15:22
@FFHener FFHener force-pushed the snmp-switches branch 2 times, most recently from d7d3947 to 69b198b Compare February 24, 2024 16:54
@FFHener FFHener marked this pull request as draft February 24, 2024 17:07
@FFHener
Copy link
Contributor Author

FFHener commented Feb 24, 2024

Im running again into Value too old errors so this will be a draft until i fixed it. There is a open Issue at collectd that would solve this. This happens when we have several instances of a name. One example is empty names for LAGs in Edgeswitches or not defined ports in tplink switches.

> snmpwalk -v 1 -c public fesev-switch.olsr .1.3.6.1.2.1.31.1.1.1.18
[...]
iso.3.6.1.2.1.31.1.1.1.18.10 = STRING: "dhcp"
iso.3.6.1.2.1.31.1.1.1.18.1000 = ""
iso.3.6.1.2.1.31.1.1.1.18.1001 = ""
[...]

> snmpwalk -v 1 -c public strom-poe.olsr .1.3.6.1.2.1.31.1.1.1.18
[...]
iso.3.6.1.2.1.31.1.1.1.18.1 = STRING: "core"
iso.3.6.1.2.1.31.1.1.1.18.2 = ""
iso.3.6.1.2.1.31.1.1.1.18.3 = ""
[...]

So we have the option of going back to index numbers or have some errors. I still need to check if this errors result in no data being sent in general. Maybe we can just tell collectd in general to stop reporting errors :D

@FFHener
Copy link
Contributor Author

FFHener commented Feb 28, 2024

I decided for supressing all errors of collectd in favour of having nicer names in monitoring. This means label of ports that are used at a location should be unique

@FFHener FFHener marked this pull request as ready for review February 28, 2024 11:29
@FFHener FFHener requested a review from pktpls March 7, 2024 13:21
Copy link
Contributor

@noxilixon noxilixon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm 👍

FFHener added 4 commits March 19, 2024 16:59
Unified way of writing OIDs
Fixed Scales
Replaced wrong OIDs
Use the Name or Label of the Interface. Depending on the configuration
this might not be unique, however it helps inunderstanding the produced
data as there is otherwise no easy way of knowing which Index belongs
to which Interface. E.g. the first Interfaces usually are used for the
physical ports, but e.g. tplink has internal Interfaces like loopback
first.
@FFHener FFHener merged commit 50c00e2 into master Mar 19, 2024
5 checks passed
@FFHener FFHener deleted the snmp-switches branch March 19, 2024 16:03
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

Successfully merging this pull request may close these issues.

2 participants