Complete Prometheus Monitoring Tutorial for Beginners 🚀
Tags: prometheus, devops, kubernetes, tutorial
Published: 2020-09-26 12:49:03

This **[complete Prometheus tutorial](https://www.youtube.com/playlist?list=PLy7NrYWoggjxCF3av5JKwyG7FFF9eLeL4)** consists of 3 parts and is a **detailed guide to getting started with Prometheus** in your Kubernetes cluster.

1. [How Prometheus Monitoring works and its Architecture explained](https://youtu.be/h4Sl21AKiDg)
2. [Setting up Prometheus in your Kubernetes cluster](https://youtu.be/QoDqxm7ybLc)
3. [Steps to monitor any third party app using Prometheus](https://youtu.be/mLPg49b33sA)

##Part 1: How Prometheus Monitoring works? Architecture explained 🔥 ##

In the first part you will learn all the basics **from what Prometheus is to understanding the whole Architecture and Components**:
- What is Prometheus?
- Different use cases of where and why Prometheus is used
- Why it's such an important tool in modern infrastructure
- What are targets and metrics?
- How does Prometheus collect those metrics from its targets?
- I explain Prometheus Architecture with simple diagrams and go through the main components: Prometheus Server, Pushgateway, Alertmanager, Prometheus Data Storage
- See an example configuration
- Look at some Key Characteristics why Prometheus became so popular, especially in containerized environments

*Prometheus Server Components:*
![Prometheus Server](https://dev-to-uploads.s3.amazonaws.com/i/rm6wvzsbx4m3ufh79p30.png)


##Part 2 - Demo: Setup Prometheus in your Kubernetes cluster 👩🏻‍💻 ##
In the second part you will learn how to setup Prometheus Monitoring and Grafana in your Kubernetes cluster.

In general there are 3 ways to do the setup:

**1. Create all the Kubernetes configuration files yourself 👩🏻‍💻**

This way is pretty inefficient and it's a lot of effort.

**2. Using a Kubernetes Operator 😎**

With this option you would go and find an operator for Prometheus and deploy it in the cluster using the configuration files of the operator. It is more efficient.

**3. Using Helm chart to deploy the Prometheus Operator 🚀**

This is the most efficient way. Prometheus Operator has a Helm chart that is maintained by the Helm community. You can use this Helm chart to deploy the operator. 
So, Helm will do the initial setup. Operator will then manage the running Prometheus setup.

In the demo I show you the third way. We will easily deploy Prometheus and Grafana using Helm chart for Prometheus Operator. 

*Walkthrough of the different components created:*
![Prometheus components created](https://dev-to-uploads.s3.amazonaws.com/i/dghbocxpbc4fr79e8vow.png)

I walk you through the different components, which were created, so that you have a **good understanding 💡 of what they are and what they do.**

##Part 3- Demo: Steps to monitor any third party app using Prometheus 👩🏻‍💻 ##

A typical scenario would be that you have an application deployed in your Kubernetes cluster and at some point you decide that you want to monitor it using Prometheus.

So in the 3rd part you learn how to monitor any third-party application in your Kubernetes cluster using Prometheus Monitoring.

In the demo I deploy MongoDB as an example, but the **concepts you learn here can be applied to any other application** like Mysql or Redis.

*Steps to monitor third-party apps in Promoetheus:*
![Steps to monitor third-party apps in Prometheus](https://dev-to-uploads.s3.amazonaws.com/i/ymwyauv7rmkb4s6ryla2.png)

1. Deploy MongoDB Application using K8s Deployment and Service 🍃
2. Expose metrics using MongoDB Exporter
3. Allow Prometheus to scrape metrics using ServiceMonitor
4. View the scraped data in Prometheus UI and Grafana 👀


`Hope this hands-on tutorials will help you in getting started to use Prometheus at your work or projects 🚀`

-----------------
► Get **30% off** - with this code: UDEMY_NANA_NOV2020: [Udemy course - Logging in Kubernetes with EFK stack](https://bit.ly/35qF26i)
► **Kubernetes 101**: [Compact and easy-to-read ebook bundle 🚀](https://www.techworld-with-nana.com/e-books) 
It's a handy way to quickly look something up or refresh your knowledge at work and use it as your cheatsheet  😎

**Like, share and follow me** 😍 for more content:
- [Private FB group](https://www.facebook.com/groups/techworldwithnana)
- [Twitter](https://twitter.com/Njuchi_)
- [YouTube](https://www.youtube.com/channel/UCdngmbVKX1Tgre699-XLlUA?sub_confirmation=1)
- [Instagram](https://www.instagram.com/techworld_with_nana/)
- [LinkedIn](linkedin.com/in/nana-janashia)