[Watchdog] Watch olefy
parent
65fc5d7518
commit
a95a3f6145
|
@ -549,7 +549,7 @@ olefy_checks() {
|
||||||
touch /tmp/olefy-mailcow; echo "$(tail -50 /tmp/olefy-mailcow)" > /tmp/olefy-mailcow
|
touch /tmp/olefy-mailcow; echo "$(tail -50 /tmp/olefy-mailcow)" > /tmp/olefy-mailcow
|
||||||
host_ip=$(get_container_ip olefy-mailcow)
|
host_ip=$(get_container_ip olefy-mailcow)
|
||||||
err_c_cur=${err_count}
|
err_c_cur=${err_count}
|
||||||
/usr/lib/nagios/plugins/check_tcp -4 -H ${host_ip} -p 10055 2>> /tmp/olefy-mailcow 1>&2; err_count=$(( ${err_count} + $? ))
|
/usr/lib/nagios/plugins/check_tcp -4 -H ${host_ip} -p 10055 -s "PING\n" 2>> /tmp/olefy-mailcow 1>&2; err_count=$(( ${err_count} + $? ))
|
||||||
[ ${err_c_cur} -eq ${err_count} ] && [ ! $((${err_count} - 1)) -lt 0 ] && err_count=$((${err_count} - 1)) diff_c=1
|
[ ${err_c_cur} -eq ${err_count} ] && [ ! $((${err_count} - 1)) -lt 0 ] && err_count=$((${err_count} - 1)) diff_c=1
|
||||||
[ ${err_c_cur} -ne ${err_count} ] && diff_c=$(( ${err_c_cur} - ${err_count} ))
|
[ ${err_c_cur} -ne ${err_count} ] && diff_c=$(( ${err_c_cur} - ${err_count} ))
|
||||||
progress "Olefy" ${THRESHOLD} $(( ${THRESHOLD} - ${err_count} )) ${diff_c}
|
progress "Olefy" ${THRESHOLD} $(( ${THRESHOLD} - ${err_count} )) ${diff_c}
|
||||||
|
@ -719,17 +719,17 @@ PID=$!
|
||||||
echo "Spawned fail2ban_checks with PID ${PID}"
|
echo "Spawned fail2ban_checks with PID ${PID}"
|
||||||
BACKGROUND_TASKS+=(${PID})
|
BACKGROUND_TASKS+=(${PID})
|
||||||
|
|
||||||
#(
|
(
|
||||||
#while true; do
|
while true; do
|
||||||
# if ! olefy_checks; then
|
if ! olefy_checks; then
|
||||||
# log_msg "Olefy hit error limit"
|
log_msg "Olefy hit error limit"
|
||||||
# echo olefy-mailcow > /tmp/com_pipe
|
echo olefy-mailcow > /tmp/com_pipe
|
||||||
# fi
|
fi
|
||||||
#done
|
done
|
||||||
#) &
|
) &
|
||||||
#PID=$!
|
PID=$!
|
||||||
#echo "Spawned olefy_checks with PID ${PID}"
|
echo "Spawned olefy_checks with PID ${PID}"
|
||||||
#BACKGROUND_TASKS+=(${PID})
|
BACKGROUND_TASKS+=(${PID})
|
||||||
|
|
||||||
(
|
(
|
||||||
while true; do
|
while true; do
|
||||||
|
|
|
@ -364,7 +364,7 @@ services:
|
||||||
- /lib/modules:/lib/modules:ro
|
- /lib/modules:/lib/modules:ro
|
||||||
|
|
||||||
watchdog-mailcow:
|
watchdog-mailcow:
|
||||||
image: mailcow/watchdog:1.60
|
image: mailcow/watchdog:1.61
|
||||||
# Debug
|
# Debug
|
||||||
#command: /watchdog.sh
|
#command: /watchdog.sh
|
||||||
build: ./data/Dockerfiles/watchdog
|
build: ./data/Dockerfiles/watchdog
|
||||||
|
|
Loading…
Reference in New Issue