]> arthur.barton.de Git - netdata.git/commitdiff
pushover notification now do not generate sound and vibration for CLEAR notifications
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 15 Sep 2016 21:01:40 +0000 (00:01 +0300)
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>
Thu, 15 Sep 2016 21:01:40 +0000 (00:01 +0300)
plugins.d/alarm-notify.sh

index 735b27a523a80d08dcbd50b6353e23f5f303bcb0..0b25a6a49411b23e98bf9187825eb13ad38b1a15 100755 (executable)
@@ -297,8 +297,14 @@ send_pushover() {
     if [ "${SEND_PUSHOVER}" = "YES" -a ! -z "${apptoken}" -a ! -z "${usertokens}" -a ! -z "${title}" -a ! -z "${message}" ]
         then
 
-        priority=0
-        [ "${status}" = "CRITICAL" ] && priority=1
+        # https://pushover.net/api
+        priority=-2
+        case "${status}" in
+            CLEAR) priority=-1;;   # low priority: no sound or vibration
+            WARNING) priotity=0;;  # normal priority: respect quiet hours
+            CRITICAL) priority=1;; # high priority: bypass quiet hours
+            *) priority=-2;;       # lowest priority: no notification at all
+        esac
 
         for user in ${usertokens}
         do