@cryptotaxi247 / netdata-1 / commits / 6a2a9a201

minor twilio improvements

Costa Tsaousis (ktsaou) committed Nov 6, 2016 at 03:23 UTC 6a2a9a20139702a6df054869d69948777c09f667
1 file changed +4 -3
plugins.d/alarm-notify.sh
+4 -3
@@ -376,7 +376,7 @@ if [ \( "${SEND_PUSHOVER}" = "YES" -o "${SEND_SLACK}" = "YES" -o "${SEND_TWILIO}
376 SEND_PUSHBULLET="NO"
377 SEND_TELEGRAM="NO"
378 SEND_SLACK="NO"
379 - SEND_TWILIO="NO"
379 + SEND_TWILIO="NO"
380 fi
381 fi
382
@@ -605,7 +605,7 @@ send_twilio() {
605 httpcode=$(${curl} -X POST --write-out %{http_code} --silent --output /dev/null \
606 --data-urlencode "From=${twilionumber}" \
607 --data-urlencode "To=${user}" \
608 - --data-urlencode "Body=${title}${message}" \
608 + --data-urlencode "Body=${title} ${message}" \
609 -u "${accountsid}:${accounttoken}" \
610 "https://api.twilio.com/2010-04-01/Accounts/${accountsid}/Messages.json")
611
@@ -852,13 +852,14 @@ The source of this alarm is line ${src}"
852
853 SENT_PUSHBULLET=$?
854
855 +# -----------------------------------------------------------------------------
856 # send the twilio SMS
857
858 send_twilio "${TWILIO_ACCOUNT_SID}" "${TWILIO_ACCOUNT_TOKEN}" "${TWILIO_NUMBER}" "${to_twilio}" "${host} ${status_message} - ${name//_/ } - ${chart}" "${alarm}
859 Severity: ${severity}
860 Chart: ${chart}
861 Family: ${family}
861 -The source of this alarm is line ${src}"
862 +${info}"
863
864 SENT_TWILIO=$?
865