问题原文
原帖链接 · srkiNZ84 · CC BY-SA 3.0
Right now we're using Prometheus for our monitoring and we have a lot of config (our prometheus.yml main config file is 1400+ lines long).
I would like to split this out into logical groupings (maybe DEV/TEST/PROD?) but I can't seem to find any documentation as to how to use "includes" (or similar) in the Prometheus config file syntax.
Has anyone done this with their Prometheus config file? If so, how did you do it?
已采纳解答
原帖链接 · brian-brazil · CC BY-SA 3.0
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.
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
