]> arthur.barton.de Git - netdata.git/commitdiff
telegram notification show the host; fixes #1072
authorCosta Tsaousis <costa@tsaousis.gr>
Tue, 11 Oct 2016 09:59:48 +0000 (12:59 +0300)
committerCosta Tsaousis <costa@tsaousis.gr>
Tue, 11 Oct 2016 09:59:48 +0000 (12:59 +0300)
plugins.d/alarm-notify.sh

index feec6ceae0718a116ccdcb3781161838f26441ad..dcb5d4016b78655c61b680bea1874d91e06d2c07 100755 (executable)
@@ -651,15 +651,11 @@ SENT_PUSHOVER=$?
 # send the telegram.org message
 
 # https://core.telegram.org/bots/api#formatting-options
-telegram_message="<b>${severity}"
-[ "${status_message}" != "recovered" ] && telegram_message="${telegram_message}, ${status_message}"
-telegram_message="${telegram_message}
-${chart} (${family})</b>
+send_telegram "${TELEGRAM_BOT_TOKEN}" "${to_telegram}" "${host} ${status_message} - <b>${name//_/ }</b>
+${chart} (${family})
 <a href=\"${goto_url}\">${alarm}</a>
 <i>${info}</i>"
 
-send_telegram "${TELEGRAM_BOT_TOKEN}" "${to_telegram}" "${telegram_message}"
-
 SENT_TELEGRAM=$?
 
 # -----------------------------------------------------------------------------