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

graphite output: tags in top level namespace #879

Closed
verterok opened this issue Mar 17, 2016 · 5 comments · Fixed by #1001
Closed

graphite output: tags in top level namespace #879

verterok opened this issue Mar 17, 2016 · 5 comments · Fixed by #1001

Comments

@verterok
Copy link

Hi,
Couldn't find a related issue, so submitting this one.
I'm using the graphite output out current infra and tools rely on it.

After upgrading from 0.10.1, the metrics namespace for a host ends up with a lot of top level entries that (I think) should be inside/below the name of the measurement.
I know this was done to address #595 and #596

For example when using the elasticsearch input (alonside others) I end up getting metrics with this scheme:

${graphite_output_prefix}.${host}.logstash-2016_02_17.elasticsearch_indices.number_of_replicas

Which is creating a top level namespace for each elasticsearch index, I think it would be nicer to have the index name below the name, e.g:

${graphite_output_prefix}.${host}.elasticsearch_indices.logstash-2016_02_17.number_of_replicas

I'm new to the telegraf code, but do you think this would be possible to change? I can try to work on fix if there is a chance to get such change accepted.

Thanks.

@verterok verterok changed the title graphite output: tags pollute the namespace graphite output: tags in top level namespace Mar 17, 2016
@sparrc
Copy link
Contributor

sparrc commented Mar 18, 2016

I'm not very familiar with how graphite metrics are typically named, but shouldn't the "field" name go higher up also then?, ie:

${graphite_output_prefix}.${host}.elasticsearch_indices.number_of_replicas.logstash-2016_02_17

@verterok
Copy link
Author

Hi,
I have no strong preference for one way or the other.

The main difference is how you end up doing wildcard queries in graphite.

${graphite_output_prefix}.${host}.elasticsearch_indices.
   number_of_replicas
       logstash-2016_02_17
       logstash-2016_02_18
   active_shards
       logstash-2016_02_17
       logstash-2016_02_18
   number_of_shards
       logstash-2016_02_17
       logstash-2016_02_18

vs

${graphite_output_prefix}.${host}.elasticsearch_indices.
   logstash-2016_02_17
         number_of_replicas
         active_shards
         number_of_shards
   logstash-2016_02_18
         number_of_replicas
         active_shards
         number_of_shards

We usually use the later, so we get the actual metric name in the last part, but no idea if there is a standard way.

@verterok
Copy link
Author

Hi,
Worked a bit on this and came up with this changes: verterok@a79c6bd

See the files blow for the difference in the metric names/namespace
current-graphite.output.txt vs proposed-graphite.output.txt

@sparrc
Copy link
Contributor

sparrc commented Mar 28, 2016

I see that you're also converting / -> _, is this a standard graphite practice?

@verterok
Copy link
Author

Yeah, that change slipped into that branch. My intention was to not include it yet and can easily remove it.
Found that the disk metrics were sent with / in the names (the path tag I think), which isn't a proper metric name for graphite, as an example: the default storage (whisper) uses the metric name as the path to the .wsp file.

sparrc added a commit that referenced this issue Apr 8, 2016
sparrc added a commit that referenced this issue Apr 8, 2016
sparrc added a commit that referenced this issue Apr 8, 2016
sparrc added a commit that referenced this issue Apr 9, 2016
sparrc added a commit that referenced this issue Apr 9, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
sparrc added a commit that referenced this issue Apr 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants