{"id":15208,"date":"2023-01-19T01:07:06","date_gmt":"2023-01-18T22:07:06","guid":{"rendered":"https:\/\/kifarunix.com\/?p=15208"},"modified":"2024-03-09T23:50:30","modified_gmt":"2024-03-09T20:50:30","slug":"how-to-monitor-docker-containers-using-nagios","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/how-to-monitor-docker-containers-using-nagios\/","title":{"rendered":"How to Monitor Docker Containers using Nagios"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1005\" height=\"565\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers.png\" alt=\"monitor docker containers using nagios\" class=\"wp-image-15247\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers.png 1005w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers-768x432.png 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers-150x84.png 150w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers-300x169.png 300w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers-696x391.png 696w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/nagios-monitor-docker-containers-747x420.png 747w\" sizes=\"(max-width: 1005px) 100vw, 1005px\" \/><\/figure>\n\n\n\n<p>Can Nagios monitor docker container? Yes, in this tutorial, you will learn how to monitor Docker containers using Nagios. Monitoring your IT infrastructure is an important process as it helps you identify issues in your infrastructure that might have adverse effects on your productivity. IT infra monitoring resolves around checking health status, availability, performance, resource usage of your servers, containers, virtual machines, e.t.c. In this tutorial, we will focus on Docker container monitoring using Nagios core server.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#monitoring-docker-containers-using-nagios\">Monitoring Docker Containers using Nagios<\/a><ul><li><a href=\"#using-community-written-nagios-scripts-to-monitor-docker-container\">Using Community Written Nagios Scripts to Monitor Docker container<\/a><\/li><li><a href=\"#create-nagios-bash-script-plugin-to-monitor-docker-containers\">Create Nagios Bash Script Plugin to Monitor Docker Containers<\/a><\/li><li><a href=\"#configure-nrpe-agents-to-check-docker-containers\">Configure NRPE Agents to Check Docker Containers<\/a><\/li><li><a href=\"#add-docker-container-host-to-nagios-server-for-monitoring\">Add Docker Container Host to Nagios Server for Monitoring<\/a><ul><li><a href=\"#command-definitions-for-docker-container-monitoring\">Command Definitions for Docker Container Monitoring;<\/a><\/li><li><a href=\"#host-hostgroup-definitions\">Host\/Hostgroup definitions;<\/a><\/li><li><a href=\"#service-definitions\">Service Definitions;<\/a><\/li><li><a href=\"#verify-nagios-configuration\">Verify Nagios Configuration<\/a><\/li><li><a href=\"#confirm-nagios-docker-container-monitoring\">Confirm Nagios Docker Container Monitoring<\/a><\/li><\/ul><\/li><\/ul><\/li><li><a href=\"#other-tutorials\">Other Tutorials<\/a><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"monitoring-docker-containers-using-nagios\">Monitoring Docker Containers using Nagios<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"using-community-written-nagios-scripts-to-monitor-docker-container\">Using Community Written Nagios Scripts to Monitor Docker container<\/h3>\n\n\n\n<p>Well, there are multiple scripts on the Internet that have been written for the very purposes of monitoring Docker containers using Nagios.<\/p>\n\n\n\n<p>An example of such awesome Python scripts is check_docker created by none other than <a href=\"https:\/\/github.com\/timdaman\/check_docker\" target=\"_blank\" rel=\"noreferrer noopener\">timdaman<\/a>.<\/p>\n\n\n\n<p>You would simply download his script as follows;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -o \/usr\/local\/bin\/check_docker \\\nhttps:&#47;&#47;raw.githubusercontent.com\/timdaman\/check_docker\/master\/check_docker\/check_docker.py<\/code><\/pre>\n\n\n\n<p>Or simply use wget;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wget -O \/usr\/local\/bin\/check_docker \\\nhttps:&#47;&#47;raw.githubusercontent.com\/timdaman\/check_docker\/master\/check_docker\/check_docker.py<\/code><\/pre>\n\n\n\n<p>This script allows you to check quite a number of Docker container metrics and other stuff such as;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>memory consumption in absolute units (bytes, kb, mb, gb) and as a percentage (0-100%) of the container limit.<\/li>\n\n\n\n<li>CPU usages as a percentage (0-100%) of container limit.<\/li>\n\n\n\n<li>automatic restarts performed by the docker daemon<\/li>\n\n\n\n<li>container status, i.e. is it running?<\/li>\n\n\n\n<li>container health checks are passing?<\/li>\n\n\n\n<li>uptime, i.e. is it able to stay running for a long enough time?<\/li>\n\n\n\n<li>the presence of a container or containers matching specified names<\/li>\n\n\n\n<li>image version, does the running image match that in the remote registry?<\/li>\n\n\n\n<li>image age, when was the image built the last time?<\/li>\n<\/ul>\n\n\n\n<p>You can download the script to your Docker host and make it executable;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x \/usr\/local\/bin\/check_docker<\/code><\/pre>\n\n\n\n<p>To see how to use the script to run various Docker container checks, simply execute it without any command line options;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/check_docker<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>\nusage: check_docker [-h] [--connection [\/<path to>\/docker.socket|<ip\/host address>:<port>] | --secure-connection [<ip\/host address>:<port>]]\n                    [--binary_units | --decimal_units] [--timeout TIMEOUT] [--containers CONTAINERS [CONTAINERS ...]] [--present] [--threads THREADS] [--cpu WARN:CRIT]\n                    [--memory WARN:CRIT:UNITS] [--status STATUS] [--health] [--uptime WARN:CRIT] [--image-age WARN:CRIT] [--version]\n                    [--insecure-registries INSECURE_REGISTRIES [INSECURE_REGISTRIES ...]] [--restarts WARN:CRIT] [--no-ok] [--no-performance] [-V]\nCheck docker containers.\noptions:\n  -h, --help            show this help message and exit\n  --connection [\/<path to>\/docker.socket|<ip\/host address>:<port>]\n                        Where to find docker daemon socket. (default: \/var\/run\/docker.sock)\n  --secure-connection [<ip\/host address>:<port>]\n                        Where to find TLS protected docker daemon socket.\n  --binary_units        Use a base of 1024 when doing calculations of KB, MB, GB, & TB (This is default)\n  --decimal_units       Use a base of 1000 when doing calculations of KB, MB, GB, & TB\n  --timeout TIMEOUT     Connection timeout in seconds. (default: 10.0)\n  --containers CONTAINERS [CONTAINERS ...]\n                        One or more RegEx that match the names of the container(s) to check. If omitted all containers are checked. (default: ['all'])\n  --present             Modifies --containers so that each RegEx must match at least one container.\n  --threads THREADS     This + 1 is the maximum number of concurent threads\/network connections. (default: 10)\n  --cpu WARN:CRIT       Check cpu usage percentage taking into account any limits.\n  --memory WARN:CRIT:UNITS\n                        Check memory usage taking into account any limits. Valid values for units are %,B,KB,MB,GB.\n  --status STATUS       Desired container status (running, exited, etc).\n  --health              Check container's health check status\n  --uptime WARN:CRIT    Minimum container uptime in seconds. Use when infrequent crashes are tolerated.\n  --image-age WARN:CRIT\n                        Maximum image age in days.\n  --version             Check if the running images are the same version as those in the registry. Useful for finding stale images. Does not support login.\n  --insecure-registries INSECURE_REGISTRIES [INSECURE_REGISTRIES ...]\n                        List of registries to connect to with http(no TLS). Useful when using \"--version\" with images from insecure registries.\n  --restarts WARN:CRIT  Container restart thresholds.\n  --no-ok               Make output terse suppressing OK messages. If all checks are OK return a single OK.\n  --no-performance      Suppress performance data. Reduces output when performance data is not being used.\n  -V                    show program's version number and exit\nUNKNOWN: No checks specified.\n<\/code><\/pre>\n\n\n\n<p>You can use this script to check Docker container status, check memory and cpu usage e.t.c as explained in the command line options above.<\/p>\n\n\n\n<p>For  example, to check the CPU usage status of all Docker containers, simply execute;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/check_docker --cpu WARN:CRIT<\/code><\/pre>\n\n\n\n<p>e.g<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/check_docker --cpu 70:80<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OK: dozzle cpu is 0%; OK: nagios-core-4.4.9 cpu is 0%|dozzle_cpu=0;70;80;0;100 nagios-core-4.4.9_cpu=0;70;80;0;100<\/code><\/pre>\n\n\n\n<p>If you want to check for a single Docker container pass the <code>--containers<\/code> options with specific Docker container name;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/check_docker --cpu 70:80 --container dozzle<\/code><\/pre>\n\n\n\n<p>To check running Docker containers;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/bin\/check_docker --status running<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"create-nagios-bash-script-plugin-to-monitor-docker-containers\">Create Nagios Bash Script Plugin to Monitor Docker Containers<\/h3>\n\n\n\n<p>Well, you can create your own bash script for monitoring Docker containers using Nagios. In this tutorial, we will create our bash script that can be used to monitor Docker container status, RAM and CPU usage.<\/p>\n\n\n\n<p>We placed the script under <strong><code>\/usr\/local\/nagios\/libexec\/<\/code><\/strong> as <code><strong>check_docker<\/strong><\/code> on the Docker host;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/usr\/local\/nagios\/libexec\/check_docker<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>#!\/bin\/bash\n# check for --help|-h or --memory or --cpu or --status flag\n\nif [[ $1 == \"-h\" || $1 == \"--help\" ]]; then\n\techo \"Usage: check_docker [[--memory WARN:CRIT|--cpu WARN:CRIT|--status]] --container &lt;name&gt;\"\nelif [[ $1 == \"--memory\" ]]; then\n    if [[ -z $2 || -z $3 || -z $4 ]]; then\n        echo \"Missing argument for --memory option. Usage: check_docker --memory WARN:CRIT --container &lt;name&gt;\"\n        exit 3\n    fi\n    # split warning and critical thresholds\n    IFS=':' read -ra THRESHOLDS &lt;&lt;&lt; \"$2\"\n    WARN=${THRESHOLDS[0]}\n    CRIT=${THRESHOLDS[1]}\n    # get container name\n    CONTAINER=$4\n    # get container memory usage\n    #USAGE=$(docker stats --no-stream --format \"{{.MemUsage}}\" $CONTAINER | awk '{print $1}' | numfmt --to=iec-i)\n    USAGE=$(docker stats --no-stream --format \"{{.MemPerc}}\" $CONTAINER | sed 's\/.$\/\/')\n    # compare usage against thresholds\n    if (( $(echo \"$USAGE &gt; $CRIT\" | awk '{print ($1&gt;$2)}') )); then\n        echo \"CRITICAL: Memory usage of container $CONTAINER is at $USAGE%\"\n        exit 2\n    elif (( $(echo \"$USAGE &gt; $WARN\" | awk '{print ($1&gt;$2)}') )); then\n        echo \"WARNING: Memory usage of container $CONTAINER is at $USAGE%\"\n        exit 1\n    else\n        echo \"OK: Memory usage of container $CONTAINER is at $USAGE%\"\n        exit 0\n    fi\nelif [[ $1 == \"--cpu\" ]]; then\n    if [[ -z $2 || -z $3 || -z $4 ]]; then\n        echo \"Missing argument for --cpu option. Usage: check_docker --cpu WARN:CRIT --container &lt;name&gt;\"\n        exit 3\n    fi\n    # split warning and critical thresholds\n    IFS=':' read -ra THRESHOLDS &lt;&lt;&lt; \"$2\"\n    WARN=${THRESHOLDS[0]}\n    CRIT=${THRESHOLDS[1]}\n    # get container name\n    CONTAINER=$4\n    # get container CPU usage\n    USAGE=$(docker stats --no-stream --format \"{{.CPUPerc}}\" $CONTAINER | sed 's\/.$\/\/')\n    # compare usage against thresholds\n    if (( $(echo \"$USAGE &gt; $CRIT\" | awk '{print ($1&gt;$2)}') )); then\n        echo \"CRITICAL: CPU usage of container $CONTAINER is at $USAGE%\"\n        exit 2\n    elif (( $(echo \"$USAGE &gt; $WARN\" | awk '{print ($1&gt;$2)}') )); then\n        echo \"WARNING: CPU usage of container $CONTAINER is at $USAGE%\"\n        exit 1\n    else\n        echo \"OK: CPU usage of container $CONTAINER is at $USAGE%\"\n        exit 0\n    fi\nelif [[ $1 == \"--status\" ]]; then\n    if [[ -z $2 || -z $3 ]]; then\n        echo \"Missing argument for --status option. Usage: check_docker --status --container &lt;name&gt;\"\n        exit 3\n    fi\n    CONTAINER=$3\n    STATUS=$(docker inspect --format \"{{.State.Status}}\" $CONTAINER)\n    if [ \"$STATUS\" == \"running\" ]; then\n\t    echo \"OK: container $CONTAINER is running\"\n\t    exit 0\n    else\n\t    echo \"CRITICAL: container $CONTAINER is $STATUS\"\n\t    exit 2\n    fi\nelse\n    echo \"Invalid flag. Usage: check_docker [[--memory WARN:CRIT|--cpu WARN:CRIT|--status]] --container &lt;name&gt;\"\n    exit 3\nfi\n<\/code><\/pre>\n\n\n\n<p>Make the script executable;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>chmod +x \/usr\/local\/nagios\/libexec\/check_docker<\/code><\/pre>\n\n\n\n<p>You can then run the script to monitor Docker containers status, RAM and CPU usage.<\/p>\n\n\n\n<p>If you don&#8217;t supply any arguments;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_docker<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Invalid flag. Usage: check_docker &#91;&#91;--memory WARN:CRIT|--cpu WARN:CRIT|--status]] --container &lt;name&gt;<\/code><\/pre>\n\n\n\n<p>To see usage;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>check_docker &#91;--help|-h]<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>Usage: check_docker &#91;&#91;--memory WARN:CRIT|--cpu WARN:CRIT|--status]] --container &lt;name&gt;<\/code><\/pre>\n\n\n\n<p>To check status of the Docker container;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_docker --status --container &lt;name&gt;<\/code><\/pre>\n\n\n\n<p>E.g;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_docker --status --container dozzle<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>OK: container dozzle is running<\/code><\/pre>\n\n\n\n<p>To check Docker Container memory usage;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_docker --memory WARN:CRIT --container &lt;name&gt;<\/code><\/pre>\n\n\n\n<p>To check Docker container CPU usage;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/libexec\/check_docker --cpu WARN:CRIT --container &lt;name&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"configure-nrpe-agents-to-check-docker-containers\">Configure NRPE Agents to Check Docker Containers<\/h3>\n\n\n\n<p>With this in place, you can then install NRPE agents on the host and configure it to check Docker container status, RAM or CPU usage using the script above.<\/p>\n\n\n\n<p>See our sample <strong>nrpe.cfg<\/strong> configuration;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cat \/usr\/local\/nagios\/etc\/nrpe.cfg<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>log_facility=daemon\ndebug=0\nserver_port=5666\nnrpe_user=nagios\nnrpe_group=nagios\nallowed_hosts=127.0.0.1,192.168.59.48\ndont_blame_nrpe=1\ncommand_timeout=60\nconnection_timeout=300\ncommand[check_users]=\/usr\/local\/nagios\/libexec\/check_users -w 5 -c 10\ncommand[check_load]=\/usr\/local\/nagios\/libexec\/check_load -r -w .15,.10,.05 -c .30,.25,.20\ncommand[check_disk]=\/usr\/local\/nagios\/libexec\/check_disk -w 20% -c 10% -p \/\ncommand[check_zombie_procs]=\/usr\/local\/nagios\/libexec\/check_procs -w 5 -c 10 -s Z\ncommand[check_total_procs]=\/usr\/local\/nagios\/libexec\/check_procs -w 150 -c 200\n<strong>command[check_container_status]=\/usr\/local\/nagios\/libexec\/check_docker --status --container $ARG1$\ncommand[check_container_memory]=\/usr\/local\/nagios\/libexec\/check_docker --memory $ARG1$:$ARG2$ --container $ARG3$\ncommand[check_container_cpu]=\/usr\/local\/nagios\/libexec\/check_docker --cpu $ARG1$:$ARG2$ --container $ARG3$<\/strong>\n<\/code><\/pre>\n\n\n\n<p>See the three lines for checking the status, memory and cpu usage of the Docker containers;<\/p>\n\n\n\n<pre class=\"scroll-sz\"><code>command[check_container_status]=\/usr\/local\/nagios\/libexec\/check_docker --status --container $ARG1$\ncommand[check_container_memory]=\/usr\/local\/nagios\/libexec\/check_docker --memory $ARG1$:$ARG2$ --container $ARG3$\ncommand[check_container_cpu]=\/usr\/local\/nagios\/libexec\/check_docker --cpu $ARG1$:$ARG2$ --container $ARG3$\n<\/code><\/pre>\n\n\n\n<p>Restart NRPE agent!<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart nrpe<\/code><\/pre>\n\n\n\n<p>Or;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl restart nagios-nrpe-server<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"add-docker-container-host-to-nagios-server-for-monitoring\">Add Docker Container Host to Nagios Server for Monitoring<\/h3>\n\n\n\n<p>Next, add host, relevant services and check commands to your Nagios servers;<\/p>\n\n\n\n<p>See our sample configs on our Nagios server;<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"command-definitions-for-docker-container-monitoring\">Command Definitions for Docker Container Monitoring;<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vim commands.cfg<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>...\ndefine command {\n    command_name    check_docker_status\n    command_line    \/usr\/local\/nagios\/libexec\/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$\n}\ndefine command {\n    command_name    check_docker_metrics\n    command_line    \/usr\/local\/nagios\/libexec\/check_nrpe -n -H $HOSTADDRESS$ -c $ARG1$ -a $ARG2$ $ARG3$ $ARG4$\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"host-hostgroup-definitions\">Host\/Hostgroup definitions;<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vim host-hostgroups.cfg<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>...\ndefine host {\n    use                     linux-server\n    host_name               east02-docker-node\n    alias                   East02-Docker-NODE\n    address                 192.168.59.49\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"service-definitions\">Service Definitions;<\/h4>\n\n\n\n<pre class=\"wp-block-code\"><code>vim services.cfg<\/code><\/pre>\n\n\n\n<pre class=\"scroll-box\"><code>define service {\n    use                     local-service\n    host_name               east02-docker-node\n    service_description     Check Dozzle Container Status\n    check_command           check_docker_status!check_container_status!dozzle\n}\ndefine service {\n    use                     local-service\n    host_name               east02-docker-node\n    service_description     Current Dozzle Container RAM Usage\n    check_command           check_docker_metrics!check_container_memory!50!70!dozzle\n}\ndefine service {\n    use                     local-service\n    host_name               east02-docker-node\n    service_description     Current Dozzle Container CPU Usage\n    check_command           check_docker_metrics!check_container_cpu!70!80!dozzle\n}\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"verify-nagios-configuration\">Verify Nagios Configuration<\/h4>\n\n\n\n<p>Check Nagios configs for any error and restart the services;<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/usr\/local\/nagios\/bin\/nagios -v \/usr\/local\/nagios\/etc\/nagios.cfg<\/code><\/pre>\n\n\n\n<p>Sample output;<\/p>\n\n\n\n<pre class=\"scroll-box\"><code>Nagios Core 4.4.9\nCopyright (c) 2009-present Nagios Core Development Team and Community Contributors\nCopyright (c) 1999-2009 Ethan Galstad\nLast Modified: 2022-11-16\nLicense: GPL\n\nWebsite: https:\/\/www.nagios.org\nReading configuration data...\n   Read main config file okay...\n   Read object config files okay...\n\nRunning pre-flight check on configuration data...\n\nChecking objects...\n\tChecked 14 services.\n\tChecked 3 hosts.\n\tChecked 1 host groups.\n\tChecked 0 service groups.\n\tChecked 1 contacts.\n\tChecked 1 contact groups.\n\tChecked 27 commands.\n\tChecked 5 time periods.\n\tChecked 0 host escalations.\n\tChecked 0 service escalations.\nChecking for circular paths...\n\tChecked 3 hosts\n\tChecked 0 service dependencies\n\tChecked 0 host dependencies\n\tChecked 5 timeperiods\nChecking global event handlers...\nChecking obsessive compulsive processor commands...\nChecking misc settings...\n\nTotal Warnings: 0\nTotal Errors:   0\n\nThings look okay - No serious problems were detected during the pre-flight check\n<\/code><\/pre>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"confirm-nagios-docker-container-monitoring\">Confirm Nagios Docker Container Monitoring<\/h4>\n\n\n\n<p>Confirm Docker container checks on Nagios;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/monitor-docker-containers-using-nagios.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1911\" height=\"647\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/monitor-docker-containers-using-nagios.png\" alt=\"How to Monitor Docker Containers using Nagios\" class=\"wp-image-15244\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/monitor-docker-containers-using-nagios.png?v=1674078790 1911w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/monitor-docker-containers-using-nagios-768x260.png?v=1674078790 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/01\/monitor-docker-containers-using-nagios-1536x520.png?v=1674078790 1536w\" sizes=\"(max-width: 1911px) 100vw, 1911px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>And that is how you can easily use Nagios to monitor Docker containers.<\/p>\n\n\n\n<p>That brings us to the end of our tutorial on monitoring Docker Containers using Nagios.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"other-tutorials\">Other Tutorials<\/h2>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/deploy-nrpe-agent-as-a-docker-container\/\" target=\"_blank\" rel=\"noreferrer noopener\">Deploy NRPE Agent as a Docker Container<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-check-docker-container-ram-and-cpu-usage\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Check Docker Container RAM and CPU Usage<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Can Nagios monitor docker container? Yes, in this tutorial, you will learn how to monitor Docker containers using Nagios. Monitoring your IT infrastructure is an<\/p>\n","protected":false},"author":10,"featured_media":15247,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[72,1076,1077,121],"tags":[6295,6293,6294,6292],"class_list":["post-15208","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-monitoring","category-containers","category-docker","category-howtos","tag-can-nagios-monitor-docker-container","tag-docker-containers-monitoring-with-nagios","tag-docker-containers-stats","tag-use-nagios-to-monitor-docker-containers","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15208"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=15208"}],"version-history":[{"count":12,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15208\/revisions"}],"predecessor-version":[{"id":20681,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15208\/revisions\/20681"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/15247"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=15208"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=15208"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=15208"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}