Skip to content

Latest commit

 

History

History
27 lines (23 loc) · 807 Bytes

README.md

File metadata and controls

27 lines (23 loc) · 807 Bytes

fetch-prom-metrics

Fetch List of Prometheus Metrics into and save as csv with help of: parides

prerequisites:

Install parides

pip install parides

usage

  • Include List of Tuples of format ("QUERYNAME", "PROM_QUERY") in querylist.py:
queries = [("QUERYNAME", "PROM_QUERY"),
           ("QUERYNAME", "PROM_QUERY")
]
  • configure resolutiom, start + end time and url in config.py:
resolution  = "10s"
start_time  = (dt.utcnow() - timedelta(minutes=5))
end_time    = dt.utcnow()
url         = "http://PROM_HOST:9090"
  • run e.g. bash python3 fetch.py -> All queries are executed and results stored in prom-metrics/EXECUTIONTIME/QUERYNAME.csv