wimvr / nagios-check_homeassistant Goto Github PK
View Code? Open in Web Editor NEWNagios plugin to check if Home Assistant is running
License: Apache License 2.0
Nagios plugin to check if Home Assistant is running
License: Apache License 2.0
Ive installed your script as /usr/local/bin/check_homeassistant.sh
Defined a command as follows
define command {
command_name check_homeassistant
command_line /usr/local/bin/check_homeassistant.sh -H $HOSTADDRESS -p -p $ARG1$
}
Defined a service as follows
define host {
use linux-server
host_name homeassistant.home
alias Home Assistant
address 192.168.0.4
max_check_attempts 5
check_period 24x7
notification_interval 30
notification_period 24x7
}
define service {
use generic-service
host_name homeassistant.home
service_description Home Assistant Running
check_command check_homeassistant!4357
notifications_enabled 1
}
root@monitor /h/s/nagios-check_homeassistant (master)# /usr/local/bin/check_homeassistant.sh -H homeassistant.home -p 4357
OK: observer reports Home Assistant up and running
But in the Nagios UI it says:
Current Status: | CRITICAL (for 0d 0h 12m 45s) |
---|---|
Status Information: | CRITICAL: No response received while requesting status |
Logs
[1697288569] Successfully launched command file worker with pid 2829578
[1697288635] SERVICE ALERT: homeassistant.home;Home Assistant Running;CRITICAL;SOFT;1;CRITICAL: No response received while requesting status
[1697288755] SERVICE ALERT: homeassistant.home;Home Assistant Running;CRITICAL;SOFT;2;CRITICAL: No response received while requesting status
[1697288875] SERVICE NOTIFICATION: nagiosadmin;homeassistant.home;Home Assistant Running;CRITICAL;notify-service-by-email;CRITICAL: No response received while requesting status
[1697288875] SERVICE ALERT: homeassistant.home;Home Assistant Running;CRITICAL;HARD;3;CRITICAL: No response received while requesting status
[1697288875] wproc: NOTIFY job 2 from worker Core Worker 2829575 is a non-check helper but exited with return code 78
[1697288875] wproc: host=homeassistant.home; service=Home Assistant Running; contact=nagiosadmin
[1697288875] wproc: early_timeout=0; exited_ok=1; wait_status=19968; error_code=0;
[1697288875] wproc: stderr line 01: Program mode requires special privileges, e.g., root or TrustedUser.
[1697288875] wproc: stdout line 01: WARNING: RunAsUser for MSP ignored, check group ids (egid=992, want=127)
[1697288875] wproc: stdout line 02: can not chdir(/var/spool/mqueue-client/): Permission denied
[1697289221] Caught SIGTERM, shutting down...
[1697289221] Caught SIGTERM, shutting down...
[1697289221] Caught SIGTERM, shutting down...
[1697289221] Successfully shutdown... (PID=2829571)
[1697289221] Nagios 4.4.14 starting... (PID=2836202)
[1697289221] Local time is Sun Oct 15 00:13:41 AEDT 2023
Any tips on getting this working would be much appreciated.
I am a beginner with nagios
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.