Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Werner authored Sep 13, 2018
1 parent f1e61c7 commit 8161f74
Showing 1 changed file with 39 additions and 1 deletion.
40 changes: 39 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1,39 @@
# check_dht
# check_dht [![CodeFactor](https://www.codefactor.io/repository/github/wernerfred/check_dht/badge)](https://www.codefactor.io/repository/github/wernerfred/check_dht)

This plugin will read the temperature and humidity values from your sensor (dht11, dht22, 3202).

This check plugin needs the adafruit dht library available on: https://github.com/adafruit/Adafruit_Python_DHT.git

Usage:
```
> python check_dht.py -h
usage: check_dht.py [-h] [-wt WT] [-ct CT] [-wh WH] [-ch CH] {11,22,3202} gpio
```
Example check:
```
> python check_dht.py 22 4 -wt 40 -ch 99
OK - Temperature: 24.6 C Humidity: 47.7 % | temperature=24.6c humidity=47%
```

Example ```CheckCommand``` for use with ```icinga2```:
```
object CheckCommand "check_dht" {
command = ["/usr/bin/sudo", "/usr/bin/python", PluginDir + "/check_dht.py" ]
arguments = {
"--model" = {
skip_key = true
order = 0
value = "$dht_model$"
}
"--gpio" = {
skip_key = true
order = 1
value = "$dht_gpio$"
}
"--wt" = "$dht_warning_temperature$"
"--wh" = "$dht_warning_humidity$"
"--ct" = "$dht_critical_temperatur$"
"--ch" = "$dht_critical_humidity$"
}
}
```

0 comments on commit 8161f74

Please sign in to comment.