User Tools

Site Tools


avaya:sbce:monitoring

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
avaya:sbce:monitoring [2026/04/02 15:05] reto.buergiavaya:sbce:monitoring [2026/04/14 12:12] (current) – [**Testing:**] reto.buergi
Line 49: Line 49:
                 echo -e "<prtg>"                 echo -e "<prtg>"
                 echo "<error>2</error>"                 echo "<error>2</error>"
-                echo "<text>`psql -d sbcedb -c "select trap_severity_level,alarm_notes,alarm_timestampsecs from alarms;"|tail -n +3|head -n -2|sed -re 's/.(.*).*\|.(.*).\|.*([0-9]{10}).*/echo "Serverity: \1 Alarmtext: \2 Date: `date -d @\3`"/e'`</text>" +                echo -e "<text>\n" 
-                echo -e "</prtg>"+                psql -d sbcedb -c "select trap_severity_level,alarm_notes,alarm_timestampsecs from alarms;"|tail -n +3|head -n -2|sed -re 's/.(.*).*\|.(.*).\|.*([0-9]{10}).*/echo "Serverity: \1 Alarmtext: \2 Date: `date -d @\3`"/e' 
 +                echo -e "</text>\n</prtg>"
         fi         fi
  
 elif [ $1 = "hastatus" ]; then elif [ $1 = "hastatus" ]; then
         if [[ $hainfo == "Primary" || $hainfo == "Secondary" ]]; then         if [[ $hainfo == "Primary" || $hainfo == "Secondary" ]]; then
-                echo "$hainfo SBC" 
-        elif [ -z "$nodeip" ]; then 
                 echo -e "<prtg>\n<result>"                 echo -e "<prtg>\n<result>"
                 echo "<channel>HA Status</channel>"                 echo "<channel>HA Status</channel>"
-                echo "<value>NO HA Single SBC</value>"+                echo "<text>$hainfo</text>" 
 +                echo "<value>$hainfo</value>"
                 echo -e "</result>\n</prtg>"                 echo -e "</result>\n</prtg>"
-        else + 
-                echo "HA-Status: SBC $hainfo"+        elif [ -z "$nodeip]; then
                 echo -e "<prtg>\n<result>"                 echo -e "<prtg>\n<result>"
                 echo "<channel>HA Status</channel>"                 echo "<channel>HA Status</channel>"
-                echo "<text>$hainfo</text>" +                echo "<value>NO HA</value>"
-                echo "<value>$hainfo</value>"+
                 echo -e "</result>\n</prtg>"                 echo -e "</result>\n</prtg>"
 +        else
 +                exit 0
         fi         fi
  
Line 74: Line 75:
 fi fi
 </code> </code>
-  mkdir -p /var/prtg/scripts +  mkdir -p /var/prtg/scriptsxml 
-  ln -s /sbin/check_sbc.sh /var/prtg/scripts/check_sbc.sh +  ln -s /sbin/check_sbc.sh /var/prtg/scriptsxml/check_sbc.sh 
   chown -R prtg /var/prtg   chown -R prtg /var/prtg
   chown -R prtg.prtg /sbin/check_sbc.sh   chown -R prtg.prtg /sbin/check_sbc.sh
   chmod 755 /sbin/check_sbc.sh   chmod 755 /sbin/check_sbc.sh
 +-----------------------------------------------------------\\
 +======Testing======
 +
 +  su - prtg
 +  /var/prtg/scriptsxml/check_sbc.sh alarmstatus
 +  /var/prtg/scriptsxml/check_sbc.sh sipstatus
 +  /var/prtg/scriptsxml/check_sbc.sh hastatus
 +-----------------------------------------------------------
 +

This topic does not exist yet

You've followed a link to a topic that doesn't exist yet. If permissions allow, you may create it by clicking on Create this page.

avaya/sbce/monitoring.1775135152.txt.gz · Last modified: by reto.buergi