Home Directory Plugins Others check_openhab.php

Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

check_openhab.php

Rating
0 votes
Favoured:
0
Current Version
1.20210629
Last Release Date
2021-06-29
Compatible With
  • Nagios 3.x
  • Nagios 4.x
License
MIT
Hits
1923
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
Nagios Plugin to check Things and Items from an Openhab Server.
If you find a bug or have a request, write me an email: nagios@jhoerter.com

You need to install php-curl

NEW

Version 1.20210629
changed state+ unknown and perfdata

Version 1.20210610
change unique to -U
add -u user and -p password


/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m State -i mihome:sensor_magnet_aq2:7c49eb17e658:158d00044ee1e9
OK - ONLINE

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m Number -i TEMPER01_Batterieladung -mi Battery -w ~75 -c ~50
WARNING - 58.00 % | Battery=58.00

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m Contact -i WINDOW11_OpenClose
CRITICAL - OPEN

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m Contact+ -i WINDOW11_OpenClose
OK - OPEN

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m String+ -mi "Bedeckt" -i WEATHERFORCAST_ForecastHours06_VorhergesagteWetterlage
CRITICAL - Bedeckt

/usr/bin/php ./check_openhab.php -H 192.168.2.216 -T
oh.nagios.En5S2bbp1RPKgGRyTjD9s97YskZm8RkS1Q3uwf89hvAqV6sA8oUGwL985QzIcXafyZCTpxQKRN7w2jF9EH3Hgs
-m state -i deconz:openclosesensor:00212E06A601:00158d00044ee1e9010006 -d

{"statusInfo":{"status":"OFFLINE","statusDetail":"BRIDGE_OFFLINE"},"editable":true,"label":"DOOR02","bridgeUID":
"deconz:deconz:00212E06A612","configuration":{"lastSeenPolling":1440,"id":"3"},"properties":{"uid":"00:15:8d:00:04:4e:e1:e9-01-0006"},
"UID":"deconz:openclosesensor:00212E06A612:00158d00044ee1e9010006","thingTypeUID":"deconz:openclosesensor","channels":
[{"linkedItems":["DOOR02_OpenClose"],"uid":"deconz:openclosesensor:00212E06A612:00158d00044ee1e9010006:open","id":"open",
"channelTypeUID":"deconz:open","itemType":"Contact","kind":"STATE","label":"Open/Close","description":"Open/Close detected",
"defaultTags":[],"properties":{},"configuration":{}},{"linkedItems":[],"uid":"deconz:openclosesensor:00212E06A612:00158d00044ee1e9010006:
last_updated","id":"last_updated","channelTypeUID":"deconz:last_updated","itemType":"DateTime","kind":"STATE","label":
"Last Updated","description":"The date and time when the sensor was last updated.","defaultTags":[],"properties":{},"configuration":{}}]}

CRITICAL - DOOR02 (OFFLINE): BRIDGE_OFFLINE

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m group -i Temperatur -mi temperatur -w 18:21 -c 10:25
CRITICAL - Total: 9 /W: 1 (TEMPER01_Temperature) /C: 2 (TEMPER07_Temperature 27.07°C,TEMPER09_Temperature 28.47°C) | TOTAL= 9;;;; OK=6 WARNING=1 CRITICAL=2

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m gcontact -i Window
CRITICAL - Total: 11 - Open: 1 (WINDOW08_OpenClose)

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m gcontact -i Window -gl
CRITICAL - Total: 11 - Open: 1 (WINDOW08)

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m gswitch+ -i Detector
CRITICAL - Total: 3 - Off: 3 (DETECTOR01_Fire,DETECTOR02_CarbonMonoxide,DETECTOR03_Fire)

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m Contact+ -i WINDOW01_OpenClose -l WINDOW
CRITICAL - WINDOW: CLOSED

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m Number -i TEMPER07_Temperature -mi Temperatur -w 10:15 -c 3:30
WARNING - 9.82 °C | Temperatur=9.82 °C

/usr/bin/php ./check_openhab.php -H 192.168.2.213 -P 8080 -m Number -i TEMPER07_Temperature -mi Celsius -w 10:15 -c 3:30
WARNING - 9.82 Celsius| default=9.82

./check_openhab.php -C -m state+ -U -c 0 -i VSX-527
CRITICAL - Total: 46 - Online: 44 - Offline: 2 (LIGHT01,MOTION01) | Total=46;0;0;0;46 Online=44 Offline=2

./check_openhab.php -C -m state+ -c 0 -i VSX-527
CRITICAL - Total: 60 - Online: 58 - Offline: 2 (LIGHT01,MOTION01) | Total=60;0;0;0;60 Online=58 Offline=2

/usr/bin/php ./check_openhab.php -C -m Number -i TEMPER07_Temperature -mi Temperatur -w 10:15 -c 3:30
WARNING - 9.82 °C | Temperatur=9.82