collectd-fast-jmx icon indicating copy to clipboard operation
collectd-fast-jmx copied to clipboard

Support pattens with placeholders to specify output metric name

Open AlexIvchenko opened this issue 6 years ago • 0 comments

Now it's impossible to specify custom name for a metric based on ObjectName keys and domain. We can just specify prefix and keys which will be joined with dash for now. It's not flexible enough for me. There are many monitoring systems with own naming conventions and I would like to have an ability to fit output name to my monitoring system.

Let's just say that I want to put my jmx metrics to graphite. Graphite supports hierarchy of names (dot is used as separator) and tags https://graphite.readthedocs.io/en/latest/tags.html Consider the following cassandra jmx metric: org.apache.cassandra.metrics:type=(ColumnFamily|IndexColumnFamily),keyspace=(Keyspace name),scope=(ColumnFamily Name),name=(Metric name) I want to have in graphite something like this: cassandra.write-latency;keyspace=k1;scope=s1;type=t1 Because using tags in graphite gives me many cool features but I am not able to do this for now.

I suggest to add new optional config property called "InstancePattern". How can I achieve my wishes with this property: InstancePattern "${domain}.write-latency;keyspace=${keyspace};scope=${scope};type=${type}"

If you like this idea let me know and I will implement and test this.

AlexIvchenko avatar Oct 06 '18 20:10 AlexIvchenko