How to split out Prometheus config files?

The Prometheus config file (and other config files in the ecosystem) explicitly do not support any form of templating. Instead this is left up to your configuration management system to handle.

Additionally it sounds a bit unusual that you have dev/test/prod sections in your config file. Usually a) you’d have a Prometheus per environment and b) the main difference between these Prometheus servers would be a different value for the env label in your external_labels.

Leave a Comment