From 03cba89c26e3b70d6bd2ab296127c43fa50baf22 Mon Sep 17 00:00:00 2001 From: larsen0815 Date: Mon, 13 Mar 2023 12:48:25 +0100 Subject: [PATCH] Rename "check_rasp_temp" to "check_rasp_temp.sh" --- README.md | 108 +++++++++++++------------- check_rasp_temp => check_rasp_temp.sh | 0 2 files changed, 54 insertions(+), 54 deletions(-) rename check_rasp_temp => check_rasp_temp.sh (100%) diff --git a/README.md b/README.md index 67e1ad2..f41172d 100644 --- a/README.md +++ b/README.md @@ -1,54 +1,54 @@ -# check\_rasp\_temp - -Nagios-Plugin to check the CPU temperature of a Raspberry Pi - - -## Installation -This example uses a Raspberry Pi with Raspbian Wheezy and a Nagios server running Debian Wheezy. -You might want to use other thresholds, e.g. the Raspberry in our server room is normally running at ~43°C so I have set the threshold to 45°C. - -#### Download Plugin -``` -cd /usr/lib/nagios/plugins/ && \ -wget https://raw.githubusercontent.com/larsen0815/check_rasp_temp/master/check_rasp_temp && \ -chmod +x check_rasp_temp -``` - -#### Plugin needs to be run as root -``` -cat < /etc/sudoers.d/nagios_rasp_temp -nagios ALL=(root) NOPASSWD: /usr/lib/nagios/plugins/check_rasp_temp -EOF -``` - -#### Define NRPE command with thresholds -``` -cat < /etc/nagios/nrpe.d/rasp_temp.cfg -command[check_rasp_temp]=sudo -u root /usr/lib/nagios/plugins/check_rasp_temp -w 60 -c 70 -EOF -``` - -#### Reload NRPE server -``` -service nagios-nrpe-server reload -``` - -#### Define service on your Nagios host -``` -define service{ - use generic-service - hostgroup_name raspberry-devices - service_description Temperature - check_command check_nrpe!check_rasp_temp -} -``` - -#### Reload Nagios server -``` -service nagios3 reload -``` - -#### Test your new check on your Nagios server -``` -/usr/lib/nagios/plugins/check_nrpe -H #Raspberry_IP# -c check_rasp_temp -``` +# check\_rasp\_temp + +Nagios-Plugin to check the CPU temperature of a Raspberry Pi + + +## Installation +This example uses a Raspberry Pi with Raspbian Wheezy and a Nagios server running Debian Wheezy. +You might want to use other thresholds, e.g. the Raspberry in our server room is normally running at ~43°C so I have set the threshold to 45°C. + +#### Download Plugin +``` +cd /usr/lib/nagios/plugins/ && \ +wget https://raw.githubusercontent.com/larsen0815/check_rasp_temp/master/check_rasp_temp.sh && \ +chmod +x check_rasp_temp.sh +``` + +#### Plugin needs to be run as root +``` +cat < /etc/sudoers.d/nagios_rasp_temp +nagios ALL=(root) NOPASSWD: /usr/lib/nagios/plugins/check_rasp_temp.sh +EOF +``` + +#### Define NRPE command with thresholds +``` +cat < /etc/nagios/nrpe.d/rasp_temp.cfg +command[check_rasp_temp]=sudo -u root /usr/lib/nagios/plugins/check_rasp_temp.sh -w 60 -c 70 +EOF +``` + +#### Reload NRPE server +``` +service nagios-nrpe-server reload +``` + +#### Define service on your Nagios host +``` +define service{ + use generic-service + hostgroup_name raspberry-devices + service_description Temperature + check_command check_nrpe!check_rasp_temp +} +``` + +#### Reload Nagios server +``` +service nagios3 reload +``` + +#### Test your new check on your Nagios server +``` +/usr/lib/nagios/plugins/check_nrpe -H #Raspberry_IP# -c check_rasp_temp +``` diff --git a/check_rasp_temp b/check_rasp_temp.sh similarity index 100% rename from check_rasp_temp rename to check_rasp_temp.sh