From cf2caef79e2895b097109c97295a5013151a9fa7 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 31 Oct 2020 18:41:51 +0000 Subject: Add kernel config checks --- nagios/nrpe.cfg | 2 ++ nagios/objects/cluster.cfg | 12 ++++++++++++ nagios/objects/commands.cfg | 10 ++++++++++ 3 files changed, 24 insertions(+) diff --git a/nagios/nrpe.cfg b/nagios/nrpe.cfg index 65d9000..cff492f 100644 --- a/nagios/nrpe.cfg +++ b/nagios/nrpe.cfg @@ -16,6 +16,8 @@ command[check_total_procs]=/usr/lib64/nagios/plugins/check_procs -w 150 -c 200 - command[check_drbd]=/usr/lib64/nagios/plugins/check_drbd -d all -r Primary command[check_raid]=/usr/lib64/nagios/plugins/check_raid.pl command[check_file_age]=/usr/lib64/nagios/plugins/check_file_age -f $ARG1$ -w 1800 -c 2700 +command[check_file_no_linger]=/usr/lib64/nagios/plugins/check_file_age -f $ARG1$ -w 600 -c 86400 -i +command[check_file_exists]=/usr/lib64/nagios/plugins/check_file_age -f $ARG1$ -w 15552000 -c 15552001 command[check_haproxy]=/usr/lib64/nagios/plugins/check_haproxy_stats -s /run/haproxy.stats command[check_time]=/usr/lib64/nagios/plugins/check_ntp_time -H uk.pool.ntp.org command[check_swap]=/usr/lib64/nagios/plugins/check_swap $ARG1$ diff --git a/nagios/objects/cluster.cfg b/nagios/objects/cluster.cfg index 451cdf4..7d1ab50 100644 --- a/nagios/objects/cluster.cfg +++ b/nagios/objects/cluster.cfg @@ -117,6 +117,18 @@ define service { service_description Portage Repo check_command check_file_age!/usr/portage/.git/FETCH_HEAD } +define service { + use remote-service + hostgroup_name linux-servers + service_description Saved kernel config + check_command check_file_exists!/etc/portage/savedconfig/sys-kernel/gentoo-kernel +} +define service { + use remote-service + hostgroup_name linux-servers + service_description New kernel config + check_command check_file_no_linger!/etc/portage/savedconfig/sys-kernel/._cfg*_gentoo-kernel +} define service { use remote-service host_name defiant diff --git a/nagios/objects/commands.cfg b/nagios/objects/commands.cfg index 4bf4f67..5e13407 100644 --- a/nagios/objects/commands.cfg +++ b/nagios/objects/commands.cfg @@ -18,6 +18,16 @@ define command { command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_file_age -a $ARG1$ } +define command { + command_name check_file_exists + command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_file_exists -a $ARG1$ +} + +define command { + command_name check_file_no_linger + command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_file_no_linger -a $ARG1$ +} + define command { command_name check_disk command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_disk -a $ARG1$ $ARG2$ $ARG3$ -- cgit v1.2.3