Nagios Plugin to check equipment from a phoscon/deconz server |
You need to install php-curl
Usage: |
/usr/bin/php check_deconz.php -H [deconz server] -P [port] -m [mode] (-e [equipment] -l label -w warn -c crit -s =https -d =debug -h =help) |
mode |
battery gbattery gbattery_name temperature humidity pressure openclosed closedopen |
-e |
equipment |
-l |
lable |
Example Critical and Warning Numbers: |
|
-w 10 -c 20 | = warning > 10 and critical > 20 |
-w ~20 -c ~10 | = warning < 20 and critical < 10 |
-c @10:20 | = critical ≥ 10 and ≤ 20, (inside the range of {10 .. 20}) |
-c 10:20 | = critical < 10 or > 20, (outside the range of {10 .. 20}) |
-w 10:20 -c 5:25 | = warning < 10 or > 20, (outside the range of {10 .. 20}) and critical < 5 or > 25,(outside the range of {5 .. 25}) |
IMPORTANT:
You must connect your nagios server with your phoscon app.
Step 1:
Download all files to your nagios plugins directory
Step 2:
In a new browser tab open the Phoscon App
Click on Menu → Settings → Gateway
Click on “Advanced” button
Click on the “Authenticate app” button
Step 3:
# /usr/bin/php deconz_config.php -H <phoscon IP> -P <phoscon Port> -m <mode
example: /usr/bin/php deconz_config.php -H 192.168.3.231 -P 80 -m create
the scipt create a config file (f.e. 192.168.3.231.conf) with an apikey to connect to your phoscon app.
If you want to delete a config file and his apikey, call the script with -m delete
Would you like to support me?
Then donate to PayPal...