Skip to content

DHT22 Sensor nagios plugin for Single Board Computers (in Fahrenheit)

License

Notifications You must be signed in to change notification settings

jquiros2/check_dht22

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

check_dht22

I. DESCRIPTION:

DHT22 Sensor nagios plugin for Single Board Computers

Copyright (c) 2017 Frostbyte frostbytegr@gmail.com

Check environment temperature and humidity with DHT22 via GPIO

II. CREDITS:

III. FEATURES:

  • Output includes perfdata
  • Threshold ranges (min/max) for both temperature and humidity
  • Both warning and critical thresholds may be fully or partially omitted
    • Anything that has not been explicitly specified will be disabled
  • Only allows for threshold ranges that are within the sensor's documented capabilities
    • Temperature: from -40 to 80
    • Humidity: from 0 to 100
  • Output validation against the sensor's checksums and documented capabilities
    • If measured data are invalid, will retry every 2 seconds for a maximum of 4 times

IV. SUPPORTED DEVICES:

  • Raspberry Pi
  • Raspberry Pi 2
  • Raspberry Pi 3
  • ASUS Tinker Board

V. GPIO HEADER PINOUT

VI. INSTALLATION:

  1. Give execution permissions to the build script and execute it:
    • chmod u+x build && ./build
  2. Copy the compiled plugin to the nagios plugins directory:
    • sudo cp bin/check_dht22 /usr/local/lib/nagios/plugins/check_dht22
  3. Allow nagios/icinga to execute the plugin as sudo, by adding this entry to the sudoers file:
    • nagios ALL=(ALL) NOPASSWD: /usr/local/lib/nagios/plugins/check_dht22

VII. USAGE:

  • sudo check_dht22 -p <gpio_pin> [-w tmp_warn_range,hum_warn_range] [-c tmp_crit_range,hum_crit_range]
    • example: sudo check_dht22 -p 7 -w 10:40,30:70 -c 5:45,25:75

About

DHT22 Sensor nagios plugin for Single Board Computers (in Fahrenheit)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 89.2%
  • Shell 10.8%