DEV Community

Cover image for Kubernetes underlying infra monitor
Kavishka Rajakaruna
Kavishka Rajakaruna

Posted on

Kubernetes underlying infra monitor

Recently I followed a tutorial on Kubernetes. That time I realized the Kubernetes also runs on the physical infra.
When I was doing some homework, I found that there are much tools to monitor the states of the containers in the Kube. Cluster. When a container becomes unhealthy it can be easily monitored.
Little while ago, I was searching for the network monitoring tools to monitor my Raspberry Pi based infra. Found several tools including PRTG Monitor and Zabbix. When I was doing some deeper research on the tools found that the PRTG monitor free tier exceeds after adding 100 sensors or devices.
Then I focused on the Zabbix. Zabbix is an opensource network monitoring tools which uses the agent architecture to monitor the devices. I was bit trouble to install the Zabbix since it has several parts

  • Server
  • Frontend (Apache or Nginx)
  • Java Gateway
  • database server (MySQL or Postgres). However I managed to install the Postgres DB based Zabbix version. Also I came up with a docker compose file for those installation.
version: "3"
services:
    pgsql-server:
        image: postgres:latest
        ports: 
            - "5434:5432"
        environment:
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=password
            - APP_DB_USER=zabix
            - APP_DB_PASS=zabix
            - APP_DB_NAME=zabix

    zabix-server:
        image: zabbix/zabbix-server-pgsql
        environment:
            - DB_SERVER_HOST=pgsql-server
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=password
        ports: 
            - "10051:10051"

    zabix-frontend:
        image: zabbix/zabbix-web-nginx-pgsql
        environment: 
            - DB_SERVER_HOST=pgsql-server
            - POSTGRES_USER=root
            - POSTGRES_PASSWORD=password
            - ZBX_SERVER_HOST="zabix-server"
            - PHP_TZ=Asia/Colombo
        links: 
            - pgsql-server:postgres
        ports: 
            - "80:8080"


    zabix-java-gateway:
        image: zabbix/zabbix-java-gateway
        links: 
            - zabix-server:zabbix-server
Enter fullscreen mode Exit fullscreen mode

So, my theory is that we can use Zabbix to monitor the underlying infra in a Kube. cluster.
Highly appreciate your thoughts on this since I'm a rookie to the DevOps.

Top comments (0)