Python exporter to query Prometheus time-series data (metrics) and send it to Graphite
workernode.count;source=prometheus;kind=node;team=devops;job=kube-state-metrics 69 1614437217
workernode.count;source=prometheus;kind=node;team=devops;job=kube-state-metrics 69 1614437277
replica.count;source=prometheus;kind=deployment;team=devops;app=web-01 64 1614437217
replica.count;source=prometheus;kind=deployment;team=devops;app=web-01 64 1614437277
replica.count;source=prometheus;kind=deployment;team=devops;app=web-02 14 1614437217
replica.count;source=prometheus;kind=deployment;team=devops;app=web-02 14 1614437277
Metrics sent for: 2 queries
- Python v3.6
- Prometheus endpoint should be accessible (http/https)
- Graphite v1.1.x or higher (if you want to use tagged series)
- Carbon should be accessible on plaintext port
This exporter can be run as a cronjob to fetch Prometheus time-series data on a regular interval
Code released under the MIT License
