From 83306793066febaa07d5b407d3703f80959932ff Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Sat, 31 Oct 2020 18:39:06 +0000 Subject: Add lm sensors checks --- nagios/.gitignore | 1 + nagios/nrpe.cfg | 1 + nagios/objects/cluster.cfg | 6 ++++++ nagios/objects/commands.cfg | 5 +++++ 4 files changed, 13 insertions(+) create mode 100644 nagios/.gitignore diff --git a/nagios/.gitignore b/nagios/.gitignore new file mode 100644 index 0000000..54c75f3 --- /dev/null +++ b/nagios/.gitignore @@ -0,0 +1 @@ +nrpe.sensors diff --git a/nagios/nrpe.cfg b/nagios/nrpe.cfg index 5fbf9e1..65d9000 100644 --- a/nagios/nrpe.cfg +++ b/nagios/nrpe.cfg @@ -19,3 +19,4 @@ command[check_file_age]=/usr/lib64/nagios/plugins/check_file_age -f $ARG1$ -w 18 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$ +command[check_sensors]=xargs < /etc/nagios/nrpe.sensors /usr/lib64/nagios/plugins/check_lm_sensors --sanitize diff --git a/nagios/objects/cluster.cfg b/nagios/objects/cluster.cfg index bb03a64..451cdf4 100644 --- a/nagios/objects/cluster.cfg +++ b/nagios/objects/cluster.cfg @@ -123,6 +123,12 @@ define service { service_description Store Volume check_command check_disk!10%!5%!/var/store/ } +define service { + use remote-service + hostgroup_name linux-servers + service_description Sensors + check_command check_sensors +} define service { use remote-service host_name defiant diff --git a/nagios/objects/commands.cfg b/nagios/objects/commands.cfg index c057b2c..4bf4f67 100644 --- a/nagios/objects/commands.cfg +++ b/nagios/objects/commands.cfg @@ -53,6 +53,11 @@ define command { command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_swap -a $ARG1$ } +define command { + command_name check_sensors + command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_sensors +} + define command { command_name check_haproxy command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c check_haproxy -- cgit v1.2.3