graphite_exporter icon indicating copy to clipboard operation
graphite_exporter copied to clipboard

Support underscores in metric name components

Open matthiasr opened this issue 7 years ago • 2 comments

Break-out from #80:

The exporter's metric parsing currently fails if any component of the Graphite metric name contains underscores, unless there is a mapping that constructs a valid Prometheus name.

Even without a matching mapping, the exporter should handle these metric names and translate them to valid Prometheus metric names. Existing metric names for metrics without underscores should not change when doing this.

matthiasr avatar Apr 08 '19 12:04 matthiasr

@xkilian can you provide the mapping config and some more example metrics that don't work? I threw together some tests on master and it appears to work fine

glightfoot avatar Jun 25 '20 13:06 glightfoot

The case here, is for a metric whose name is structured like: hostname_one.source.detail_modifier.type If there is no matching mapping rule and it tries to do auto-mapping to a prometheus metric. If the mapping config drops all unmatched metrics by default, then this does not apply. I will get something together.

xkilian avatar Jun 25 '20 14:06 xkilian