From 3d190e5666efd8839ae90a57344af5563f0a9bd1 Mon Sep 17 00:00:00 2001 From: Andrea Dell'Amico Date: Wed, 11 Oct 2017 16:19:41 +0200 Subject: [PATCH] nagios: The check_load warning and critical limits are now variables. Add the -r option to the check_load plugin so that the returned load is divided by the number of available CPUs. --- nagios/defaults/main.yml | 4 ++++ nagios/templates/common-nrpe.cfg.j2 | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/nagios/defaults/main.yml b/nagios/defaults/main.yml index 4450cc3b..178ac3cf 100644 --- a/nagios/defaults/main.yml +++ b/nagios/defaults/main.yml @@ -41,6 +41,10 @@ nagios_plugins_base_pkgs: nagios_plugins_contrib: - nagios-plugins-contrib +nagios_load_per_cpu: True +nagios_load_w: 4,3,3 +nagios_load_c: 6,5,5 + nagios_psql_query_time_w: 40 nagios_psql_query_time_c: 60 nagios_psql_db_size_w: 150000000 diff --git a/nagios/templates/common-nrpe.cfg.j2 b/nagios/templates/common-nrpe.cfg.j2 index 4be7a47e..48fa5d83 100644 --- a/nagios/templates/common-nrpe.cfg.j2 +++ b/nagios/templates/common-nrpe.cfg.j2 @@ -1,7 +1,7 @@ # command[global_check_disk]={{ nagios_plugins_dir }}/check_disk -w {{ nagios_check_disk_w }}% -c {{ nagios_check_disk_c }}% -X tmpfs -X proc -X sysfs -X devpts -X dev -A -i /mnt/.* -command[global_check_load]={{ nagios_plugins_dir }}/check_load -w 20,15,10 -c 35,30,25 +command[global_check_load]={{ nagios_plugins_dir }}/check_load {% if nagios_load_per_cpu %}-r{% endif %} -w {{ nagios_load_w }} -c {{ nagios_load_c }} command[global_check_memory]={{ nagios_plugins_dir }}/check_memory -u G -w 5% -c 1% command[global_check_swap]={{ nagios_plugins_dir }}/check_swap -w 20% -c 5% command[global_check_zombie_procs]={{ nagios_plugins_dir }}/check_procs -w 5 -c 10 -s Z