added webui

This commit is contained in:
2021-01-08 14:45:26 +01:00
parent 02ba334032
commit cedf566f74
6 changed files with 22 additions and 13 deletions

View File

@@ -9,10 +9,5 @@ set eventqueue
basedir /var/lib/monit/events # set the base directory where events will be stored
slots 100 # optionally limit the queue size
#WEBUIset httpd port 2812 and
#WEBUIallow admin:monit # require user 'admin' with password 'monit'
#WEBUI#use address localhost # only accept connection from localhost (drop if you use M/Monit)
#WEBUI#allow localhost # allow localhost to connect to the server and
include /etc/monit/conf.d/*
include /etc/monit/conf.d/*
include /etc/monit/websocket #enables/disables monit-websocket

View File

@@ -0,0 +1,9 @@
#Set-up monit webui as unixsocket
set httpd unixsocker /var/run/monit/monit.sock
uid www-data
signature disable
allow admin:monit
#Set-up monit webui on port 2812
##set httpd port 2812 and
##allow admin:monit

View File

@@ -18,7 +18,7 @@ check system $HOST
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU(sys) threshold'"
if cpu usage (wait) > 80% for 4 cycles then exec"/opt/MonitNotify.sh 'SYS-WARN: CPU(wait) threshold'"
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU(wait) threshold'"
if cpu usage > 200% for 4 cycles then exec "/opt/MonitNotify.sh "/opt/MonitNotify.sh 'SYS-WARN: CPU threshold'"
if cpu usage > 200% for 4 cycles then exec "/opt/MonitNotify.sh /opt/MonitNotify.sh 'SYS-WARN: CPU threshold'"
else if recovered then exec "/opt/MonitNotify.sh 'SYS-OK: CPU threshold'"
#Disk