Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom labels #296

Open
SrDayne opened this issue Apr 7, 2023 · 0 comments
Open

Custom labels #296

SrDayne opened this issue Apr 7, 2023 · 0 comments

Comments

@SrDayne
Copy link

SrDayne commented Apr 7, 2023

Is there a way to pass environmental variables as custom labels of metrics?

How metric looks now:
php_fpm_up{instance="example", socket_path="example"} 1

How I expect it to see:
php_fpm_up{instance="example", socket_path="example", custom_label_1="example_1",custom_label_2="example_2"} 1,
where custom labels passed as env vars, like: custom_label_1=$env_var_1, custom_label_2=$env_var_2

For reference, see:
https://github.com/nginxinc/nginx-prometheus-exporter, command line argument -prometheus.const-labels value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant