yabeda-rb / yabeda-puma-plugin

Collects Puma web-server metrics from puma control panel
MIT License
72 stars 18 forks source link

Is it possible to change metrica name and/or add custom attribute? #3

Closed khataev closed 4 years ago

khataev commented 5 years ago

Is there a possibility to do this? I want to achieve this:

puma_pool_capacity{index="0", project="my_project"} 1

or

my_project_puma_pool_capacity{index="0"} 1

Thanks in advance

dsalahutdinov commented 5 years ago

Hey, @khataev . I think there is no need to add extra label to the metrics, moreover it would not be correct to set them up inside the puma process. You have to use the Prometheus configuration to add thous labels automatically for every metrics scrapping service. See this link https://prometheus.io/docs/prometheus/latest/configuration/configuration/#static_config

Envek commented 5 years ago

Now it can't be achieved at the Yabeda side. It is possible to implement such a feature, though.

But I agree that doing that on monitoring system side is more correct.

khataev commented 5 years ago

I agree, that your solution is better, but we could not implement it now, due some legacy in our corporate monitoring standards and agreements. So I ended up with extra middleware that renames plugin's metrics =)