How to monitor Docker containers with Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
naveen46
Posts: 5
Joined: Sun Dec 18, 2016 10:31 am

How to monitor Docker containers with Nagios

Post by naveen46 »

I need help in Monitoring Docker containers with Nagios.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: How to monitor Docker containers with Nagios

Post by dwhitfield »

You'll want to check out https://exchange.nagios.com/directory/P ... er/details if you haven't already.

To help us help you: What version of Core are you using? Was it compiled from source or installed from distro repos? On what OS/version is nagios running? cat /etc/*-release may be of use. Also, please give us as much info as you can about what you are trying to monitor in docker...like, what applications and metrics? Thanks!
naveen46
Posts: 5
Joined: Sun Dec 18, 2016 10:31 am

Re: How to monitor Docker containers with Nagios

Post by naveen46 »

I am using CentOS release 6.6 (Final) OS, Nagios core Version is 4.2.0.
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: How to monitor Docker containers with Nagios

Post by dwhitfield »

You neglected to give us any information about what you are trying to monitor in docker. If you are running enough of the OS in docker, you should be able to monitor them just like any other OS, but we will need more information if we are going to be more specific.

Did you look at the plugin I suggested?

Also, I will note that 4.2.4 fixes a serious security hole, so you might want to look at upgrading: https://assets.nagios.com/downloads/nag ... ading.html
naveen46
Posts: 5
Joined: Sun Dec 18, 2016 10:31 am

Re: How to monitor Docker containers with Nagios

Post by naveen46 »

Yes, I tried to use that plugin getting error like NRPE: Unable to read output.

NRPE 3.0, Nagios-plugins -2.1.4
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: How to monitor Docker containers with Nagios

Post by avandemore »

We have a NRPE troubleshooting document: https://assets.nagios.com/downloads/nag ... utions.pdf

It says it's for XI, but it's applicable to Core as well.
Previous Nagios employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: How to monitor Docker containers with Nagios

Post by dwhitfield »

In addition to the trouble-shooting document, are you running NRPE through xinetd or stand-alone? If the second, did you allow it through the firewall? Did you add the server's IP into your allowed_from in your nrpe.cfg?

Also, can you upload as a file your /usr/local/nagios/var/objects.cache? Thanks!
naveen46
Posts: 5
Joined: Sun Dec 18, 2016 10:31 am

Re: How to monitor Docker containers with Nagios

Post by naveen46 »

running through xinetd service, Yes I've added server's IP into nrpe.cfg file.
Attachments
objects.cache.txt
(24.94 KiB) Downloaded 396 times
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: How to monitor Docker containers with Nagios

Post by mcapra »

If NRPE is running under xinetd, you will need to alter a different file to whitelist the Nagios XI machine. The file you want to be altering is usually located at /etc/xinetd.d/nrpe. Specifically, the only_from directive. You will also need to restart the xinetd service after changing this file.
Former Nagios employee
https://www.mcapra.com/
naveen46
Posts: 5
Joined: Sun Dec 18, 2016 10:31 am

Re: How to monitor Docker containers with Nagios

Post by naveen46 »

there is no NRPE file in /etc/xinetd.d/ location
Locked