Monit check content = '"status" : "OK"

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
JanAtHome
Posts: 38
Joined: Wednesday 10 January 2018 16:49
Target OS: Raspberry Pi / ODroid
Domoticz version: 38153
Location: Raalte Holland
Contact:

Monit check content = '"status" : "OK"

Post by JanAtHome »

[Version: 4.11605
Build Hash: 7de1f368f
Compile Date: 2020-01-08 23:12:15
dzVents Version: 2.5.5
Python Version: 3.7.3 (default, Apr 3 2019, 05:39:12) [GCC 8.2.0]

Hey
What are the correct settings for Monit.
I don't think the status check works for me.
Does anyone know how I check this.

https://www.domoticz.com/wiki/Monitoring_domoticz

screenshot.4322.jpg
screenshot.4322.jpg (187.77 KiB) Viewed 393 times
Attachments
screenshot.4323.jpg
screenshot.4323.jpg (96.86 KiB) Viewed 393 times
User avatar
FireWizard
Posts: 1868
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: Monit check content = '"status" : "OK"

Post by FireWizard »

Hi,

I use monit as well, and for sure I know it works.

I have the following contents in monitrc:

Code: Select all

## Services
###############################################################################
##
## Check general system resources such as load average, cpu and memory
## usage. Each test specifies a resource, conditions and the action to be
## performed should a test fail.
#
  check system <your IP address>
     if loadavg (1min) > 8 then alert
     if loadavg (5min) > 4 then alert
     if memory usage > 75% then alert
     if swap usage > 35% then alert
     if cpu usage (user) > 25% then alert
     if cpu usage (system) > 15% then alert
     if cpu usage (wait) > 15% then alert
     
## Check domoticz
  check process domoticz with pidfile /var/run/domoticz.pid
  start program = "/etc/init.d/domoticz.sh start"
  stop  program = "/etc/init.d/domoticz.sh stop"
  if failed
     url http://127.0.0.1:8080/json.htm?type=command&param=getversion
         and content = '"status" : "OK"'
     for 2 cycles
     then restart
  if 5 restarts within 5 cycles then exec "/sbin/reboot"
This works for one of my Raspberry Pi's , but for another I needed somewhat higher values.

How to check: Stop domoticz and monit will restart it.

Regards
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest