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
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