Skip to content

Support pattens with placeholders to specify output metric name #40

@AlexIvchenko

Description

@AlexIvchenko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions