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

Wavefront output replaces / with - in metrics #4240

Closed
dimas opened this issue Jun 5, 2018 · 6 comments
Closed

Wavefront output replaces / with - in metrics #4240

dimas opened this issue Jun 5, 2018 · 6 comments
Labels
feature request Requests for new plugin and for new features to existing plugins
Milestone

Comments

@dimas
Copy link

dimas commented Jun 5, 2018

Relevant telegraf.conf:

System info:

Ubuntu 14.04, telegrad 1.6.2

Steps to reproduce:

  1. First, as a proof that slashes are not lost by input, this config:
[[inputs.socket_listener]]
  service_address = "tcp://:8089"
  data_format = "influx"

[[outputs.socket_writer]]
  address = "tcp://localhost:7777"
  data_format = "influx"

then nc -k -v -l 7777 in one terminal and echo 'measurement.xxxxx/yyyyy.path value=100 1528225557' | nc -v localhost 8089 in another, make nc receive:

measurement.xxxxx/yyyyy.path,host=i-05e56b63573fd3a76 value=100 1528225557

So the slash was not lost
2. Now change output to

[[outputs.wavefront]]
  host = "localhost"
  port = 7777
  convert_paths = false

and then use the same set of commands to generate metric and receive it.

Expected behavior:

The Wavefront docs https://docs.wavefront.com/wavefront_data_format.html says that

Valid characters are: a-z, A-Z, 0-9, hyphen ("-"), underscore ("_"), dot ("."). Forward slash ("/") and comma (",") are allowed if metricName is enclosed in double quotes.

So I would expect slash to be kept. Probably quoted.

Actual behavior:

nc receives:

measurement.xxxxx-yyyyy.path 100.000000 1 source="i-05e56b63573fd3a76"

The slash was replaced with dash

Additional info:

To be fair, graphite output does the same thing which may also be wrong. But I did not read Graphite protocol docs so I cannot be 100% sure if slash is allowed or not.

@danielnelson
Copy link
Contributor

@puckpuck Can you take a look at this one?

@puckpuck
Copy link
Contributor

puckpuck commented Jun 6, 2018

@dimas can I ask where the source of your metrics with slashes in the metric name is coming from? Your ask is certainly reasonable to fix, however my fear is existing people that may have metrics getting the slash replaced with a dash, will now see it as a slash thus breaking existing queries.

@dimas
Copy link
Author

dimas commented Jun 6, 2018

@puckpuck , ours are Hystrix metrics. They look like HystrixCommand.<commandKey>.rollingCountSuccess and in our case the command key we giving to hystrix is kinda URL path-like string describing the operation so we end up with something like HystrixCommand.entity/operations/update.rollingCountSuccess

We used to send them directly to Wavefront and they work ok but if we change apps to send data via locally running telegraf, these metrics break. It is not the end of the world but will require updating lots of existing dashboards, alerts etc.

Maybe a new boolean configuration option that allows slashes ?

Cheers

@puckpuck
Copy link
Contributor

puckpuck commented Jun 6, 2018

I'm hesitant to add another config property to the output plugin. I just want to run this internally first to make certain we aren't going to break other stuff, and will get a PR submitted shortly to fix.

@dimas
Copy link
Author

dimas commented Mar 17, 2019

@puckpuck hi, any update on this ?

@puckpuck
Copy link
Contributor

puckpuck commented Apr 2, 2019

We are going to add a new option to the Wavefront output plugin. use_strict when true (default is false) will allow / and , to be accepted in metric names.

@glinton glinton added the feature request Requests for new plugin and for new features to existing plugins label Apr 2, 2019
@glinton glinton added this to the 1.11.0 milestone Apr 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Requests for new plugin and for new features to existing plugins
Projects
None yet
Development

No branches or pull requests

4 participants