From d7258e320ea19504875cd82442dda1122cc760c5 Mon Sep 17 00:00:00 2001 From: James Antill Date: Tue, 25 Jun 2024 15:40:47 -0400 Subject: [PATCH] Add DNF countme nagios checks. Signed-off-by: James Antill --- roles/nagios_client/tasks/main.yml | 1 + .../templates/check_countme.cfg.j2 | 16 ++++ .../services/iad2_internal/file_age.cfg | 92 +++++++++++++++++++ 3 files changed, 109 insertions(+) create mode 100644 roles/nagios_client/templates/check_countme.cfg.j2 diff --git a/roles/nagios_client/tasks/main.yml b/roles/nagios_client/tasks/main.yml index 7998dba30e..85d134f842 100644 --- a/roles/nagios_client/tasks/main.yml +++ b/roles/nagios_client/tasks/main.yml @@ -164,6 +164,7 @@ - check_mirrorlist_cache.cfg - check_celery_redis_queue.cfg - check_proxies.cfg + - check_countme.cfg notify: - restart nrpe tags: diff --git a/roles/nagios_client/templates/check_countme.cfg.j2 b/roles/nagios_client/templates/check_countme.cfg.j2 new file mode 100644 index 0000000000..e002bced1e --- /dev/null +++ b/roles/nagios_client/templates/check_countme.cfg.j2 @@ -0,0 +1,16 @@ +# Raw DB Warn: 1d Crit: 2d +command[check_countme_fedora_raw]={{ libdir }}/nagios/plugins/check_file_age -w 86400 -c 172800 -f /var/lib/countme/raw.db +command[check_countme_centos_raw]={{ libdir }}/nagios/plugins/check_file_age -w 86400 -c 172800 -f /var/lib/countme/raw-centos.db + +# Totals DB Warn: 7d Crit: 8d +command[check_countme_fedora_tot]={{ libdir }}/nagios/plugins/check_file_age -w 604800 -c 691200 -f /var/lib/countme/totals.db +command[check_countme_centos_tot]={{ libdir }}/nagios/plugins/check_file_age -w 604800 -c 691200 -f /var/lib/countme/totals-centos.db + +# Web copied: Warn: 1d Crit: 2d +# Web Generated: Warn: 7d Crit: 8d +command[check_countme_fedora_web1]={{ libdir }}/nagios/plugins/check_file_age -w 86400 -c 172800 -f /var/www/html/csv-reports/countme/totals.db +command[check_countme_centos_web1]={{ libdir }}/nagios/plugins/check_file_age -w 86400 -c 172800 -f /var/www/html/csv-reports/countme/totals-centos.db +command[check_countme_fedora_web2]={{ libdir }}/nagios/plugins/check_file_age -w 604800 -c 691200 -f /var/www/html/csv-reports/countme/totals-countme.db.gz +command[check_countme_centos_web2]={{ libdir }}/nagios/plugins/check_file_age -w 604800 -c 691200 -f /var/www/html/csv-reports/countme/totals-centos-countme.db.gz +command[check_countme_fedora_web3]={{ libdir }}/nagios/plugins/check_file_age -w 604800 -c 691200 -f /var/www/html/csv-reports/countme/totals-unique.db.gz +command[check_countme_centos_web3]={{ libdir }}/nagios/plugins/check_file_age -w 604800 -c 691200 -f /var/www/html/csv-reports/countme/totals-centos-unique.db.gz diff --git a/roles/nagios_server/files/nagios/services/iad2_internal/file_age.cfg b/roles/nagios_server/files/nagios/services/iad2_internal/file_age.cfg index fdf25e043a..4f6ea5f137 100644 --- a/roles/nagios_server/files/nagios/services/iad2_internal/file_age.cfg +++ b/roles/nagios_server/files/nagios/services/iad2_internal/file_age.cfg @@ -43,3 +43,95 @@ define service { notification_interval 130 event_handler restart_rsyslog } + +# Fedora Countme: +define service { + host_name log01.iad2.fedoraproject.org + service_description Check Fedora countme raw DB age + check_command check_by_nrpe!check_countme_fedora_raw + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check Fedora countme totals DB age + check_command check_by_nrpe!check_countme_fedora_tot + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check Fedora countme web DB1 age + check_command check_by_nrpe!check_countme_fedora_web1 + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check Fedora countme web DB2 age + check_command check_by_nrpe!check_countme_fedora_web2 + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check Fedora countme web DB3 age + check_command check_by_nrpe!check_countme_fedora_web3 + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +# CentOS countme +define service { + host_name log01.iad2.fedoraproject.org + service_description Check CentOS countme raw DB age + check_command check_by_nrpe!check_countme_centos_raw + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check CentOS countme totals DB age + check_command check_by_nrpe!check_countme_centos_tot + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check CentOS countme web DB1 age + check_command check_by_nrpe!check_countme_centos_web1 + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check CentOS countme web DB2 age + check_command check_by_nrpe!check_countme_centos_web2 + use defaulttemplate + check_interval 120 + notification_interval 130 +} + +define service { + host_name log01.iad2.fedoraproject.org + service_description Check CentOS countme web DB3 age + check_command check_by_nrpe!check_countme_centos_web3 + use defaulttemplate + check_interval 120 + notification_interval 130 +}