Giter Club home page Giter Club logo

docker-swarm-service-monitor's Introduction

zabbix docker-swarm-service-monitor

此脚本使用于zabbix通过low level discovery 监控docker service

zabbix agent 配置文件中增加

UserParameter=dockerservice.discovery,/usr/bin/python /usr/local/zabbix/scripts/docker_low_discovery.py UserParameter=dockerservice.status[*],/usr/bin/python /usr/local/zabbix/scripts/docker_service_monitor.py $1 UserParameter=ds[*],/usr/bin/python /usr/local/zabbix/scripts/get_service_stats.py $1 $2

创建docker service 在每个节点上都部署

docker service create -d --name get-container-stats
--restart-max-attempts 5
--mode global
--no-resolve-image=true
--with-registry-auth
-e Redis_host=x.x.x.x
-e Redis_port=6379
-e Redis_pass=xxxx
-e Interval_time=300
--mount type=bind,source=/etc/localtime,target=/etc/localtime
--mount type=bind,source=/var/run/docker.sock,target=/var/run/docker.sock
--mount type=bind,source=/sys/fs/cgroup,target=/sys/fs/cgroup
get-container-stats:v1.0.2

zabbix web 配置

模板:zabbix_temp/zbx_docker_service_templat.xml

image image image

docker-swarm-service-monitor's People

Contributors

yzx2 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.