Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Environment variables in prometheus values

i would like to set environment specific values based on environment qa/prod in prometheus values file

 ## Additional alertmanager container environment variable
  ## For instance to add a http_proxy
  ##
  extraEnv: {}
like image 443
shiv455 Avatar asked Oct 17 '22 19:10

shiv455


1 Answers

Prometheus does not support environment variables. There are a few threads discussing this in GitHub.

You can use envsubs or if you want a more robust and versatile tool I recommend to GO with Confd (its written in GO :D). You can also get the secrets from backends like etcd or AWS ssm.

Here you have Pormetheus with confd ready to go (just need to modify the config to your needs.

like image 92
NicoKowe Avatar answered Oct 21 '22 03:10

NicoKowe