Nagios Plugin to check Things and Items from an Openhab Server |
You need to install php-curl
Usage: |
/usr/bin/php check_openhab.php -H [Openhab Server] -P [Port] -m [mode] -i [Item/ Thing or Group]
|
mode |
number + warn crit Contact or Contact+ Switch or Switch+ State State+ Date String or String+ Group GContact or GContact+ GSwitch or GSwitch+ |
numbertype |
Temperatur = °C or String to find/ not find |
-A | only number - set Date to calculate average with a startnumber ( -A [YYYY-mm-dd] [startnumber] ) |
-t |
only number/contact(+)/state(+) test if thing of an item is ONLINE or OFFLINE |
-U |
only State+, unique Things |
-gl | can be used to print the label of an item instead of the name (Group/GContact/Gcontact+/Gswitch/Gswitch+) |
-T [Token] |
since openhab 3.0 you can create a token to access the rest api. You can create it in the web interface of openhab |
-C |
config file (default=openhab.php) instead of the controller parameters -H, -P, -s, -T (you can specify any file with path) <?php |
Would you like to support me?
Then donate to PayPal...