Skip to content

Nagios monitoring compatible docker container stats check

Notifications You must be signed in to change notification settings

muonato/check_dcont

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 

Repository files navigation

check_dcont

Nagios monitoring compatible docker container statistics

Usage

check_dcont.sh <container-name> [<container-name>] ...

Nagios monitoring setup

Specify command in your nrpe configuration file on host

command[check_dcont]=sudo /path/to/plugins/check_dcont.sh $ARG1$

Specify sudo right to Opsview user group ( where applicable )

opsview ALL=NOPASSWD:/path/to/plugins/check_dcont

Set command on your nagios monitoring server, allow for lengthy timeout

check_nrpe -H $HOSTADDRESS$ -t 300 -c check_dcont -a '<container-name>'

Examples

Check container statistics

$ ./check_dcont.sh foo-bar
1: CRITICAL - Docker container 'foo-bar' CPU: 89.5% MEM: 40.4%

Check statistics of two containers

$ ./check_dcont.sh fubar-one fubar-two
1: OK - Docker container 'fubar-one' CPU: 0.12% MEM: 0.41%
2: WARNING - Docker container 'fubar-two' CPU: 0.05% MEM: 62.8%

Check non-existent container

$ ./check_dcont.sh foo-bar
1: CRITICAL - Docker container 'foo-bar' statistics failed

Platform

Script development and testing

Red Hat Enterprise Linux 8.9 (Ootpa)
GNU bash, version 4.4.20(1)-release (x86_64-redhat-linux-gnu)
Docker version 24.0.7
Opsview Core 3.20140409.0

About

Nagios monitoring compatible docker container stats check

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages