Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_rpi_temp.py - Raspberry Pi temperature
0.2
2019-09-30
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
ClaudioKuenzler
GPL
5995
File | Description |
---|---|
901-raspberry-pi-temperature-graph.png | 901-raspberry-pi-temperature-graph.png |
Meet The New Nagios Core Services Platform
Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.
Monitoring Made Magically Better
- Nagios Core on Overdrive
- Powerful Monitoring Dashboards
- Time-Saving Configuration Wizards
- Open Source Powered Monitoring On Steroids
- And So Much More!
check_rpi_temp is a monitoring plugin written in Python (compatible with Python2 and Python3) and measures the board temperature of a Raspberry Pi computer. It allows to check thresholds against Celsius and Fahrenheit values. Easy and automatic graphing thanks to the performance data.
The usage is straight forward:
pi@raspberrypi:~ $ /usr/lib/nagios/plugins/check_rpi_temp.py -w 50 -c 60
RPI TEMP OK: Temperature 40.80 degrees c |rpi_temp=40.80;50.00;60.00;;
Or if you prefer Fahrenheit:
pi@raspberrypi:~ $ /usr/lib/nagios/plugins/check_rpi_temp.py -w 90 -c 105 -u f
RPI TEMP CRITICAL: Temperature 105.44 is higher than critical threshold (105.00) |rpi_temp=105.44;90.00;105.00;;
Important note: You need to make sure the user running the command is able to execute vcgencmd. For example if you use the 'nagios' user (default in an NRPE setup), the command fails:
nagios@raspberrypi:~$ /usr/bin/vcgencmd measure_temp
VCHI initialization failed
By default the "pi" and the "root" user are able to run this command. So either define a sudoers rule or create a new user with the same privileges as the pi user.
The usage is straight forward:
pi@raspberrypi:~ $ /usr/lib/nagios/plugins/check_rpi_temp.py -w 50 -c 60
RPI TEMP OK: Temperature 40.80 degrees c |rpi_temp=40.80;50.00;60.00;;
Or if you prefer Fahrenheit:
pi@raspberrypi:~ $ /usr/lib/nagios/plugins/check_rpi_temp.py -w 90 -c 105 -u f
RPI TEMP CRITICAL: Temperature 105.44 is higher than critical threshold (105.00) |rpi_temp=105.44;90.00;105.00;;
Important note: You need to make sure the user running the command is able to execute vcgencmd. For example if you use the 'nagios' user (default in an NRPE setup), the command fails:
nagios@raspberrypi:~$ /usr/bin/vcgencmd measure_temp
VCHI initialization failed
By default the "pi" and the "root" user are able to run this command. So either define a sudoers rule or create a new user with the same privileges as the pi user.
Reviews (0)
Be the first to review this listing!