Monitoring Kubernetes

Student Valerii Bosiak reviews tools for monitoring Kubernetes.

What is the main idea of monitoring ?

Monitoring is a way to see the state of your system. For example load average, active RAM, load on the network and many other useful metrics, which you will necessarily want to see if you have a complex, cohesive infrastructure. If something goes wrong, motoring will help to identify a weak point in your system or to identify the cause of incorrect or inefficient operation of the system.

Popular monitoring tools

There are many monitoring tools exists now. So let's look on some of them.

Prometheus

Prometheus is an open-source systems monitoring and alerting. Since its inception in 2012, many companies and organizations have adopted Prometheus, and the project has a very active developer and user community. It is now a standalone open source project and maintained independently of any company.

Grafana

Grafana is an open-source, general purpose dashboard and graph composer, which runs as a web application. Grafana allows you to query, visualize, alert on and understand your metrics no matter where they are stored.

Grafana main features are:

plethora of visualization options to help understand your data

define alerts and thresholds visually, and get notified via Slack, PagerDuty, and more

supports dozens of databases, natively. Mixing them together in the same Dashboard

official library with hundreds of dashboards and plugins

sharing data and dashboards across teams

Zabbix

Zabbix is software that monitors numerous parameters of a network and the health and integrity of servers. Zabbix uses a flexible notification mechanism that allows users to configure e-mail based alerts for virtually any event. This allows a fast reaction to server problems. Zabbix offers excellent reporting and data visualisation features based on the stored data. This makes Zabbix ideal for capacity planning.

Main Zabbix features:

device monitoring

network monitoring

database monitoring

website monitoring

automated alerts

reports, graphs, and charts

Setup monitoring with Prometeus and Grafana

Requirements:

Working kubernetes cluster

Installed helm

First we need to configure helm in your cluster, if it's not configured. There is one simple command:

helm init --upgrade

Then we add repository in your helm. This repo contain a Prometheus chart:

All done! Now we can go to the web-interface at http://localhost:3000 and http://localhost:9090 relatively.

Conclusion

Monitoring of clusters of the Kubernetes is very important for maintaining the system in an efficient state. Monitoring systems can easily be configured for alerts in a dangerous situation. This will save your time and money many times.