-
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
[Instrumental] Underscore metric name output #1607
[Instrumental] Underscore metric name output #1607
Conversation
…end of write cycle so we don't hold open idle connections, which has the benefit of mostly removing the chance of getting hopelessly connection lost
…into telegraf master
…ed ident & auth handshake
correct URL from instrumental fork to origin and put the change in the correct part of the file
Connection Loss Improvement
Underscore metric names
you need to run |
@sparrc It is done! |
…different section.
// replace invalid components of metric name with underscore | ||
clean_metric := MetricNameReplacer.ReplaceAllString(metric, "_") | ||
|
||
if !ValueIncludesBadChar.MatchString(value) { |
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.
do we still need to be checking this? how would it ever be true if we already replaced the bad characters above?
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 above cleans up the metric name, this line rejects bad values. If someone sends a name with bad characters, we just turn them to underscores, but if someone sends a bad value, we simply drop it.
I think the bad value that triggered this change was a time (as in HH:MM).
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.
@sparrc bumps
Thanks @sparrc ! |
Some of the metrics emitted by various input plugins include illegal metric names for Instrumental, and this does a more thorough job of massaging those metrics into something usable.
Required for all PRs:
README.md updated (if adding a new plugin)