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

Directory Tree

check_openhab.php

Rating
0 votes
Favoured:
0
Current Version
1.20240513
Last Release Date
2024-05-13
Compatible With
  • Nagios 3.x
  • Nagios 4.x
License
MIT
Hits
5900
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
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.20240513
corrected number (warning/critical)


/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

/usr/bin/php ./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

/usr/bin/php ./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

/usr/bin/php ./check_openhab.php -C -m number -i TEMPER06_Temperature -mi Temperatur -w 16:20 -c 10:25 -l 10 -t
CRITICAL - OFFLINE (BRIDGE_UNINITIALIZED): 10 - 10.60 °C | temperatur=0;16;10;;100

/usr/bin/php ./check_openhab.php -C -m number -i ONOFF08_Verbrauch -mi kWh -l Verbrauch -t -A 2023-11-17 0
OK - Verbrauch: 0.04 kWh - 2023-11-17(4): 0.04 kWh - ø: 0.0100 kWh | Total=0.04kWh;0;0;;100 SinceDate(2023-11-17)=0.04kWh;;;; Average=0.0100kWh;;;;