Difficulty: beginner
Estimated Time: 15-20 minutes


In this tutorial you will learn how to use the Prometheus API Client for Python to collect and manipulate Prometheus time-series metric data.
We will use a Jupyter notebook to interact with a Prometheus instance which is currently being deployed.
Please give the environment a couple of minutes to set up.
Once the environment is ready to be used, you will see the links to access it in your workshop terminal.

The Environment

During this tutorial you will be using a hosted OpenShift 4.7 environment that is created just for you. This environment is not shared with other users of the system.
Your environment will only be active for a one hour period. Keep this in mind before embarking on getting through the content.
Each time you start this tutorial, a new environment will be created on the fly.

Let's get started!

The contents of this scenario are available on github

Feedback for this scenario

Did you like this scenario? or Do you think we can improve on something?
You can help us by providing your feedback/suggestions here.

Continue Learning

More information about the applications we used

  • Prometheus - A Cloud native application monitoring system.
  • Prometheus API Client Python - A Python side client to query metrics data from Prometheus.
  • Jupyter Notebooks - an open-source web application that allows you to create and share documents that contain live code, equations, visualizations and narrative text.

Time-series forecasting on Prometheus metrics

Deploying Prometheus and Grafana on OpenShift

Working with Prometheus Metrics in Python

Step 1 of 3

More about Prometheus

What is Prometheus?

Prometheus is an open-source systems monitoring and alerting toolkit originally built at SoundCloud.

What is Prometheus API Client?

Prometheus-api-client is a python client we built to collect metric data from Prometheus and change it in a more data science suitable format of a Pandas Dataframe.