Key Terminologies
- Targets: The Prometheus Server monitors a particular Target, and that Target could be anything like an entire Linux server or Windows server or standalone Apache server a single application or service like a database.
- Metrics: Each target has units of monitoring, for example for a Linux Server as a Target, these units could be current CPU Status, its memory usage, Disk space usage etc. Similarly for an application it could be number of exceptions, number of requests, request duration etc. That unit for a specific target is called a metric. Metrics gets saved into the Prometheus Database component.
- TYPE and HELP Attributes: Prometheus defines human readable text based format for this Metrics. Metrics entries or data has TYPE and HELP attributes to increase its readability. HELP is basically a description that describes what the metrics is about and TYPE is the type for metric.
- Exporter: Exporter is basically a script or service that fetches Metrics from a Target and converts them in format the Prometheus understands and exposes this converted data at its own slash metrics endpoint where Prometheus can scrape them.
- Alert Manager: Alert Manager is a Prometheus component that is responsible for firing Alerts via different channels like a slack channel or some other notification client. The Prometheus Server will then read the alert rules and if the condition in the rules is met an alert gets fired through that configured channel.
Kubernetes Prometheus
With modern DevOps becoming more and more complex, monitoring and alerting stakeholders has become even more crucial for any microservice, and Prometheus is a tool to do the same. Prometheus is a completely open-sourced tool created to monitor highly dynamic container environments like Kubernetes, Docker Swarm, etc. However, it can also be used in a traditional non-container infrastructure where you have just bare servers with applications deployed directly on them. In this article, we will learn what prometheus is. We will see why Prometheus is so important in such infrastructure. And what are some of its use cases?
Table of Content
- What is Prometheus Monitoring?
- Why use Prometheus for Kubernetes monitoring?
- Prometheus Architecture
- Key Terminologies
- Tutorial – Deploying Prometheus Monitoring in Kubernetes Cluster
- Step 1: Creating a Kubernetes Cluster
- Step 2: Installing Helm
- Step 3: Adding the Prometheus repository
- Step 4: Installing Prometheus
- Step 5: Checking all the resources installed
- Step 6: Expose the “prometheus-server” Service
- Advantages of Prometheus
- How Prometheus compares to other Kubernetes monitoring tools
- The challenges of Prometheus scaling and monitoring
- Increased management overhead for SREs and platform teams
- Prometheus Kubernetes Service Discovery
- Conclusion
- Kubernetes Prometheus – FAQ’s