Promotheus-Client Custom Metrics with python

34 views
Skip to first unread message

Deethya & Reethya its kids Channel

unread,
May 23, 2022, 2:20:50 PM5/23/22
to Prometheus Users
Hello,

Promotheus-Client  Custom Metrics , how to perform different label with same metric.
As I want to preform  disk usage of container, which particular instrumentation we can use.

I had tried with Histogram, But how to represent same metric with different label name
Ex:
disk_usage_conatiner{pod:"abc",fileSyatem:"/dev/abc"} 45665215
disk_usage_conatiner{pod:"xyz",fileSyatem:"/mapper/c"} 45665215

if we have multiple label, how we can add these labe to same metrics

If any idea please suggest ?

Thanks
DV

Brian Candler

unread,
May 23, 2022, 3:18:46 PM5/23/22
to Prometheus Users
See https://github.com/prometheus/client_python#labels

If that doesn't help, then post your current code and maybe someone can suggest why it's not working.

Reply all
Reply to author
Forward
0 new messages