Browse Source

changed alert message (removed values) to reduce alert fatique

Volker Tanger 4 months ago
parent
commit
e01eca0dba
2 changed files with 7 additions and 2 deletions
  1. 3 2
      functions.moshel
  2. 4 0
      history.txt

+ 3 - 2
functions.moshel

@@ -8,7 +8,7 @@
 #
 #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
-MOSHELVERSION="2.1.5"
+MOSHELVERSION="2.1.6"
 
 #---------------------------------------------------------
 # init library and files
@@ -66,8 +66,9 @@ TextsAndGraphs () {   # print alert and status graph snippets
 	echo "$MYNAME : $Name ? Check failed - ${WEBURL}/data/index.html?$MYNAME/$Name.short   <br>" >> /tmp/tmp.$$.moshel_alert.tmp
 	echo "<li> <font color=\"#${HTMLALERT}\"><b>Check failed</b>: <a href=\"${WEBURL}/data/index.html?$MYNAME/$Name.short\">$Name</a> <a href=\"${WEBURL}/data/index.html?$MYNAME/$Name.long\">[l]</a> ${Message}</font>" >> /tmp/tmp.$$.moshel_collected.tmp
     elif [ "${Alert}" -eq 1 ]; then
-	echo "$MYNAME : $Name ! $Message - ${WEBURL}/data/index.html?$MYNAME/$Name.short   <br>" >> /tmp/tmp.$$.moshel_alert.tmp
 	echo "<li> <font color=\"#${HTMLALERT}\"><b>ALERT</b>: <a href=\"${WEBURL}/data/index.html?$MYNAME/$Name.short\">$Name</a> <a href=\"${WEBURL}/data/index.html?$MYNAME/$Name.long\">[l]</a> $Message</font>" >> /tmp/tmp.$$.moshel_collected.tmp
+	ErrorMessage=$( echo "$Message" |  sed -e 's/[(0-9]* \![a-z]*\! [0-9)]* //g' )                                                                                                      
+	echo "$MYNAME : $Name ! $ErrorMessage - ${WEBURL}/data/index.html?$MYNAME/$Name.short   <br>" >> /tmp/tmp.$$.moshel_alert.tmp        
     else
 	echo "<li> ok:    <a href=\"${WEBURL}/data/index.html?$MYNAME/$Name.short\">$Name</a>  <a href=\"${WEBURL}/data/index.html?$MYNAME/$Name.long\">[l]</a> ${Message}" >> /tmp/tmp.$$.moshel_collected.tmp
     fi

+ 4 - 0
history.txt

@@ -66,6 +66,10 @@ wanted checks (examples)
 
 ------------------------------------------------------------------------
 
+2024-08-02
+    Volker Tanger <volker.tanger@wyae.de>
+	* feature: changed alert message (removed values) to reduce alert fatique
+	
 2024-07-26
     Volker Tanger <volker.tanger@wyae.de>
 	* feature: added maintenance mode, disabling checks (just insert message)