convert all attributes to labels

10 views
Skip to first unread message

Rahul Bhattacharya

unread,
Mar 29, 2020, 4:56:06 PM3/29/20
to Prometheus Users

i have a metric with a lot of attributes.
I want to export that into prometheus with labels
For instance i have a object with objectname containing type=status, connector=something,task=something
but it has attributes WorkerId, Trace and State

if i use a rule like this, it does not work.

  • pattern: "com.connect.task<type=status, connector=([^:]+), task=([^:]+,WorkerId: ([^:]+),Trace: ([^:]+))><>State: ([^:]+)"
    name: "com_connect_connector_task_status"
    value: 1
    labels:
    connector: $1
    task: $2
    status: $3
    worker_id: $4
    trace: $5

How are users supposed to get attributes into labels

Reply all
Reply to author
Forward
0 new messages