]> arthur.barton.de Git - netdata.git/commitdiff
properly show raised for duration when status is CLEAR
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 23 Oct 2016 21:01:31 +0000 (00:01 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Sun, 23 Oct 2016 21:01:31 +0000 (00:01 +0300)
plugins.d/alarm-notify.sh

index b8c11171d13eb88b149e2a99b50edf55f1649ed3..35e1307dc80048e2c7ebff449c5df71b036079a4 100755 (executable)
@@ -717,10 +717,6 @@ case "${status}" in
         image="${images_base_url}/images/check-mark-2-128-green.png"
        status_message="recovered"
                color="#77ca6d"
-
-               # don't show the value when the status is CLEAR
-               # for certain alarms, this value might not have any meaning
-               alarm="${name//_/ } ${raised_for}"
                ;;
 esac
 
@@ -732,6 +728,10 @@ then
         raised_for="(alarm was raised for ${non_clear_duration_txt})"
     fi
 
+    # don't show the value when the status is CLEAR
+    # for certain alarms, this value might not have any meaning
+    alarm="${name//_/ } ${raised_for}"
+
 elif [ "${old_status}" = "WARNING" -a "${status}" = "CRITICAL" ]
 then
     severity="Escalated to ${status}"