Skip to content

This project contains the steps for monitoring the docker container using cgroups.

License

Notifications You must be signed in to change notification settings

mohitrajvardhan17/Zabbix-Docker_monitoring_using_CGROUPS

Repository files navigation

Zabbix-Docker monitoring using CGROUPS

This project contains the steps to configure zabbix-agent based monitoring for the docker container(using linux cgroups) which are running inside docker-swarm.

Introduction

This project focuses on configuring basic docker monitoring using zabbix-agent.The metric related with docker container which would be monitored as part of this project is mentioned below:

  1. CPU utilization(%)
  2. Memory utilization(%)
  3. Used cache memory(Bytes)
  4. Total page fault(Bytes)
  5. Used RSS memory(Bytes)
  6. Used swap memory(Bytes)

Pre-requisite

Following points needs to be fulfilled before starting the implementation:

  • Docker container should be running inside docker-swarm on the server which needs to be monitored.
  • Docker API should be enabled and accessible by running the command "curl --silent --unix-socket /var/run/docker.sock http:/containers/json".
  • Docker container should be mounted on the cgroup.This could be checked by running the command "ls -ltra /sys/fs/cgroup/cpu/docker/[CONTAINER-ID]".(Note:Replace "[CONTAINER-ID]" in the command with the your docker container id)
  • This project was built on Python 2.7.5 hence the same Python version or any latest version compatible with Python 2.7.5 would be required.
  • This project has been tested and implemented on "Red Hat Enterprise Linux Server 7.2 (Maipo)" and may not work on any other Linux distribution.

Installation Steps:

Follow the below mentioned steps to configure docker monitoring using zabbix-agent

  1. COPY the userparameter_docker.conf file in the "/etc/zabbix/zabbix_agentd.d/" directory on the server(aka HOST-ONE) running the zabbix-agent.
  2. COPY the DockerMonitoring.py file in the "/etc/zabbix/" directory on the same server(aka HOST-ONE) running the zabbix-agent.
  3. RESTART the zabbix-agent using the command "systemctl restart zabbix-agent" running on the same server(aka HOST-ONE).
  4. IMPORT the zbx_docker_templates.xml template from the Zabbix frontend.(for any help related with importing the template: click here)
  5. APPLY the zbx_docker_templates.xml template on the same server(aka HOST-ONE) containing the zabbix-agent.(for any help related with applying the template on host: click here)

Support

All reported issues, which are not real issues, but requests for support will be closed with reference to this README section.

License

This project is licensed under the terms of the GNU General Public License v3.0 license.

About

This project contains the steps for monitoring the docker container using cgroups.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages