-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add a Count option to snmp plugin #3504
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
Conversation
Add a Count option to the snmp plugin allowing to gather the number of table entries (matching given criteria) rather than their values. This is especially useful in combination with the recently introduced Filter options. Example: Count number of total/connected stations on a (Lancom) Access Point. Indentation changes to existing code are deferred to the next commit in order ease review.
Mechanical indentation changes intentionally exempted from the last commit (to facilitate review).
Allow the value to be of an type other than DS_COUNTER when using the Count option. I'm sure this can be done more elgantly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution!
I have a small nit.
I have a small nit.
Which is?
|
@octo dropped absolute counters
But that's in the collectd-6.0 branch, no?
In main, I'll need to cope with someone requesting DS_TYPE_ABSOLUTE.
|
yes, that's correct, that's in 6.0. So, for 6.0 there is some change required. |
So, for 6.0 there is some change required.
So what am I expected to do? Create a second Pull Request for collectd-6?
I guess it would be far easier to make that trivial change within a merge to -6 once my branch has been merged, no?
|
I'd update the PR and drop DS_TYPE_ABSOLUTE right now. We removed it, since it was not widely used, if it was used at all. Anyways, that can be done in another PR, I'm good with mer 86D2 ging this here. |
ChangeLog: A count option was added allowing to gather the number of table entries (matching given criteria) rather than their values.
Add a
Count
option to the snmp plugin allowing to gather the number of table entries (matching given criteria) rather than their values.This is especially useful in combination with the recently introduced Filter options.
Example: Count number of total/connected stations on a (Lancom) Access Point.