Skip to main content

Using Python to Extract Prometheus Metrics

Hands-On Lab


Photo of

Training Architect





This lab guides the student through the use of a Python program to interface with the Prometheus API endpoint. The program will use PromQL examples to pull CPU and memory metrics and output them in a Comma Separated Value (CSV) file that may then be used for a Machine Learning program. This lab only covers the extract step and the Machine Learning part is covered in a subsequent lab.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.