-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[Metricbeat] [Statsd] Add support for Graphite series 1.1.0+ tags #39619
Conversation
This pull request does not have a backport label.
To fixup this pull request, you need to add the backport labels for the needed
|
Can you also please update the changelog? |
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.
LGTM!
CHANGELOG.next.asciidoc
Outdated
@@ -48,6 +48,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] | |||
*Metricbeat* | |||
|
|||
- Setting period for counter cache for Prometheus remote_write at least to 60sec {pull}38553[38553] | |||
- Added conditional to check if statsd metric contains , or ; and split accordingly {pull}39619[39619] |
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.
- Added conditional to check if statsd metric contains , or ; and split accordingly {pull}39619[39619] | |
- Added a conditional check to see if the statsd metric contains ',' or ';' and split accordingly. {pull}39619[39619] |
Hi @aliabbas-elastic , Can we verify these changes? I've opened an issue for it here. |
Co-authored-by: subham sarkar <[email protected]>
CHANGELOG.next.asciidoc
Outdated
@@ -48,6 +48,7 @@ https://github.com/elastic/beats/compare/v8.8.1\...main[Check the HEAD diff] | |||
*Metricbeat* | |||
|
|||
- Setting period for counter cache for Prometheus remote_write at least to 60sec {pull}38553[38553] | |||
- Added a conditional check to see if the statsd metric contains ',' or ';' and split accordingly. {pull}39619[39619] |
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.
- Added a conditional check to see if the statsd metric contains ',' or ';' and split accordingly. {pull}39619[39619] | |
- Add support of Graphite series 1.1.0+ tagging extension for statsd module. {pull}39619[39619] |
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.
Also, I think we should update README. See an example: https://github.com/prometheus/statsd_exporter?tab=readme-ov-file#tagging-extensions
@ritalwar @tehbooom What do you think? Else, one has to go to code to figure it out to see what extensions are supported.
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.
@ritalwar @shmsr How do we feel about adding this to the README?
[float]
=== Suported tag extensions
The `statsd` module supports the following tags:
https://docs.datadoghq.com/developers/dogstatsd/datagram_shell/?tab=metrics#the-dogstatsd-protocol[DogStatsD]
`<metric name>:<value>|<type>|@samplerate|#<k>:<v>,<k>:<v>`
https://github.com/influxdata/telegraf/blob/master/plugins/inputs/statsd/README.md#influx-statsd[InfluxDB]
`<metric name>,<k>=<v>,<k>=<v>:<value>|<type>|@samplerate`
https://graphite.readthedocs.io/en/latest/tags.html#graphite-tag-support[Graphite 1.1.x]
`<metric name>;<k>=<v>;<k>=<v>:<value>|<type>|@samplerate`
Would look like this:
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.
Perhaps the heading could be like:
- "DogStatsD-style tags"
- "InfluxDB-style tags"
and so on.
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'm fine with just listing the names, but we can add something like:
Supported Tag Extensions
Examples of tag styles supported by the statsd
module:
- DogStatsD
<metric name>:<value>|<type>|@samplerate|#<k>:<v>,<k>:<v>
- InfluxDB
<metric name>,<k>=<v>,<k>=<v>:<value>|<type>|@samplerate
- Graphite 1.1.x
<metric name>;<k>=<v>;<k>=<v>:<value>|<type>|@samplerate
// Metric tags could be separated by `,` or `;` | ||
// We split here based on the separator |
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.
// Metric tags could be separated by `,` or `;` | |
// We split here based on the separator | |
// Metric tags could be separated by `,` or `;`, we split here based on the separator. |
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.
LGTM. Let's wait for @ritalwar to approval as well and then we can merge.
@aliabbas-elastic, could you please do one round of testing as well so we can merge this? |
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.
Approving this PR but let me run one round of sanity tests for compatible metric formats. I'll update here soon
Yes, let's wait for @aliabbas-elastic before merging |
Co-authored-by: Aliabbas Attarwala <[email protected]>
Proposed commit message
Added conditional to check if
statsd
metric contains,
or;
and split accordinglyChecklist
CHANGELOG.next.asciidoc
orCHANGELOG-developer.next.asciidoc
.Disruptive User Impact
Author's Checklist
How to test this PR locally
Related issues
Use cases
Screenshots
Logs