-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Switch CPU from field to tag in Interrupts input plugin (#4999) #5024
Conversation
Looks good, but we will need a few things to manage the change since it can break queries. Can you add a new option to the plugin called In the sample config document the option like:
|
Due to your request to preserve old behaviour it was easier to go back to the original design and just add some conditional logic for gathering tags and fields. |
@danielnelson is this PR acceptable for you guys? |
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.
The option method you went for will work, just a few minor comments:
Hi @danielnelson thanks for the review. Each requested change made sense to me so I followed all your suggestions, made changes and pushed. |
I tweaked the option from |
plugins/inputs/interrupts/README.md
Outdated
@@ -8,6 +8,10 @@ The interrupts plugin gathers metrics about IRQs from `/proc/interrupts` and `/p | |||
## To filter which IRQs to collect, make use of tagpass / tagdrop, i.e. | |||
# [inputs.interrupts.tagdrop] | |||
# irq = [ "NET_RX", "TASKLET" ] | |||
# | |||
# To report cpus as tags instead of fields use cpus_as_tags | |||
# cpus_as_tags = false |
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.
i am using telegraf version 1.9.2 and this is not working.
Error parsing file.conf, line 76: field corresponding to cpu_as_tag' is not defined in
*interrupts.Interrupts'
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.
You need at least version 1.10. We try to mark the milestone a feature will be released in on the pull request, you should be able to see it on the right sidebar.
Required for all PRs:
Resolves #4999