SYNAXON / GraphiteReceiver

A vmware statsfeeder receiver to export the stats directly into graphite.
Apache License 2.0
20 stars 7 forks source link

Added use_global_instance option #49

Closed mtopper closed 7 years ago

mtopper commented 8 years ago

Added an option called use_global_instance option.

I found that when using disable_instance_metrics when combined with using InfluxDB, I was having problems with the templates that the Graphite listener for InfluxDB requires.

Specifically, I wanted to use this template: "prefix.cluster.type.host.category.instance.measurement*",

However, when I allowed GraphiteReceiver to send instance stats, the instance name was empty for counters that don't have an instance, or the global one.

To make this template work for all metrics GraphiteReceiver sends, I modified GraphiteReceiver to replace the null instance name with the string "global" so that all metrics that came back had something in the instance name and will fit with the InfluxDB Graphite listener template.

Then I added a configurable option to enable or disable this behavior, set to false by default so not to change the current behavior unless specifically configured.

toni-moreno commented 8 years ago

Hi @mtopper, I think this could be a great improvement. Thanks a lot!!

:+1: