From 63174b256732d47130fe967bd4b2f6aa58df7a60 Mon Sep 17 00:00:00 2001 From: Pavel Loginov Date: Mon, 27 Jul 2020 20:46:27 +0200 Subject: [PATCH] v4.4.0.0 Changelog: https://haproxy-wi.org/changelog.py#4_4 --- app/templates/ajax/smon_dashboard.html | 5 ++++- app/tools/checker_worker.py | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/templates/ajax/smon_dashboard.html b/app/templates/ajax/smon_dashboard.html index 65f1ce2..5508a18 100644 --- a/app/templates/ajax/smon_dashboard.html +++ b/app/templates/ajax/smon_dashboard.html @@ -53,7 +53,10 @@ {% endif %} {% if s.9 %} - {{s.0}}:{{s.1}} + + {{s.0}}:{{s.1}} {% else %} {{s.0}}:{{s.1}} {% endif %} diff --git a/app/tools/checker_worker.py b/app/tools/checker_worker.py index b74d206..4dc0da8 100644 --- a/app/tools/checker_worker.py +++ b/app/tools/checker_worker.py @@ -3,7 +3,8 @@ import subprocess from subprocess import check_output, CalledProcessError import time import argparse -import os, sys +import os +import sys sys.path.append(os.path.join(sys.path[0], os.path.dirname(os.getcwd()))) sys.path.append(os.path.join(sys.path[0], os.getcwd())) import funct @@ -74,11 +75,10 @@ def main(serv, port): servername = servername.split(",") realserver = servername[0] server = servername[1] - alert = "Backend: "+realserver[2:]+", server: "+server+" has changed status to "+ currentstat[i] + " on " + serv + "HAProxy" + alert = "Backend: "+realserver[2:]+", server: "+server+" has changed status to "+ currentstat[i] + " on " + serv + " HAProxy" funct.telegram_send_mess(str(alert), ip=serv) funct.logging("localhost", " "+alert, alerting=1) firstrun = False - oldstat = [] oldstat = currentstat currentstat = [] time.sleep(60)