Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Docker check

Rating
0 votes
Favoured:
1
Current Version
1.1
Last Release Date
2017-03-14
Compatible With
  • Nagios 3.x
  • Nagios 4.x
Owner
Twitter Handle
@framebreak
License
GPL
Hits
7576

Help Support Ethan Galstad's New Project:

Help Support Ethan

A Message From The Founder...

As the founder of Nagios, I'm asking for your help in a cause that's dear to my heart.

I'm launching a new project to help better the world by providing the information, ideas, and inspiration that I believe can improve the lives of people everywhere.

I know you're busy managing networks, but I would appreciate it if you would consider liking my Facebook page and showing your support for the content and messages I produce by sharing them with your friends and family.

You can learn more about my project by visiting ethangalstad.me/nagios. Thank you for your time. I wish you all the best in your endeavors, whatever they may be.

- Ethan

This is a Nagios plugin that monitors CPU / MEM / BANDWIDTH and status Docker.
Minimum Docker version -> 1.10.0
Nagios user need permission to use Docker, please add user "nagios" in docker group -> usermod -aG docker ${USER}
For use this script, user need shell "/bin/bash", please execute next command -> chsh -s /bin/bash ${USER}

Usage: ./check_docker_stats.sh [-v] [-h] [-n [-s -c -m -N]]
-h, --help
print this help message
-v, --version
print version program
-n, --name
name docker to check
-c, --cpulimitperc PERC_WARNING_CPU,PERC_CRITCAL_CPU
number in percent alert for CPU
-m, --memlimitperc PERC_WARNING_MEM,PERC_CRITICAL_MEM
number in percent alert for MEM usage
-N, --ntwlimit WARNING_NET_RX,WARNING_NET_TX,CRITCAL_NET_RX,CRITCAL_NET_TX
bandwidth (RX -> DL,TX -> UL) in kBps for docker selected
-s, --status
check if docker is alive

./check_docker.sh -n container_name -c PERC_WARNING_CPU,PERC_CRITCAL_CPU
-m PERC_WARNING_MEM,PERC_CRITICAL_MEM
-N WARNING_NET_RX,WARNING_NET_TX,CRITCAL_NET_RX,CRITCAL_NET_TX

./check_docker.sh -n dockername -c 80,90 -m 25,30 -N 1000,500,2000,1000

Troubleshooting:
If docker stats have zero value for current|limit memory stats, please execute this command :
cd help_script; ./enable_memswap_stats.sh