Skip to main content

PROMETHEUS

Prometheus is an open-source system and network monitoring tool designed for Kubernetes and microservice architectures. It collects, stores, queries, and creates graphs of performance data.

1) Prometheus Installation

The environment (namespace) to work in is created:
Role-Based Access Control (RBAC) is created:
A ConfigMap containing Prometheus configuration settings for Kubernetes is defined:
Prometheus deployment and service are created:
After creation, access to Prometheus is provided from http://<KUBERNETES_WORKER_IP_ADDRESS>:<NODE_PORT>.

2) KUBE-STATE-METRICS Installation

Kube-state-metrics is used to collect information about the status of resources (e.g., pods, services, replicasets) in the Kubernetes cluster.
For detailed information, you can review Prometheus’s own documentation page: https://prometheus.io/docs/introduction/overview/

3) Grafana Installation

Grafana is an open-source data visualization web application. You can connect to various data sources and display your data in charts and graphs and interpret it more easily.
Grafana installation on Ubuntu operating systems is described below. Deployment configuration can be used for Grafana installation on Kubernetes.
After installation is completed, access is provided from http://<SERVER_IP_ADDRESS>:3000.
Default login information for Grafana:
  • username: admin
  • password: admin

4) Adding Prometheus Connection in Grafana

A Prometheus connection information is added from the left menu. Prometheus is selected. By clicking the “Add new data source” option, the Prometheus server URL information is entered and the connection is saved.
Adding Prometheus Data Source

Grafana - Adding Prometheus data source

Click the “Dashboard” tab from the left menu. Then, a new import process is started with the “New” option.
Dashboard Import Screen

Grafana - Dashboard import screen

Add numbers 315 and 13498 to the ID field respectively. Click the Load button. Select the Prometheus connection where the Dashboard will run and save with the “Import” option.

Dashboard ID: 315

Visually presents information such as CPU usage, memory usage, and network transaction intensity in your cluster and nodes.

Dashboard ID: 13498

Visually presents CPU usage, memory usage, and network transaction intensity information at namespace, pod, and container levels.
For detailed information, you can review Grafana’s own documentation page: https://grafana.com/docs/grafana/latest/