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

Directory Tree

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
14671
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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