line / promgen

Promgen is a configuration file generator for Prometheus
https://line.github.io/promgen/
MIT License
1.04k stars 150 forks source link

How to configure farm hosts when my application deploy in k8s cluster? #376

Open ZhiXingHeYiApple opened 2 years ago

ZhiXingHeYiApple commented 2 years ago

I view the source code and official document, but very confused that how to configure farm hosts when my application deploy in k8s cluster. That promgen make full use of prometheus file_sd_config, through update /etc/prometheus/promgen.jsonfile to scrape tagets dynamicly. But the pod ip of my application is not fixed, I don't know how to configure farm hosts (Note: I also consider the custom discovery plugin, but the souce code prove that it's may not good choice). It's doublt that whether promgen can integrate with prometheus-operator and thanos. If that's possible, any suggestion will be appreciated!

kfdm commented 2 years ago

Promgen is a configuration management tool for file_sd_config. If you are using k8s you will likely want to use a different tool or the default Promethus k8s support.

ZhiXingHeYiApple commented 2 years ago

@kfdm That's disappointment。I try to integrate promgen with thanos due to this ppt Whether it's possible to reform project code to integrate promgen with k8s CRD (ServiceMonitor、PodMonitor)? May be that's bad idea. Or other good advices will be useful. Thank you!