check_deconz.php

Category: nagios
Downloaded: 622

Nagios Plugin to check equipment from a phoscon/deconz server

You need to install php-curl

If you find a bug or have a request, write me.

  


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     
= warning and critical battery equipment

gbattery
= warning and critical all batteries

gbattery_name
= warning and critical all batteries and name warning/critical/offline equipment

temperature
= warning and critical temperature equipment

humidity
= warning and critical hunidity equipment

pressure
= warning and critical pressure equipment

openclosed
= citical open equipment

closedopen
= citical closed equipment

-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 


MIT-Lizenz


 

Would you like to support me?
Then donate to PayPal...