@cryptotaxi247 / netdata-1 / commits / e3ba4c14d

fix_irc_notification: Remove line break from message (#7243)

* fix_irc_notification: Remove line break from message The line break present on netdata alarms are creating 421 errors on the server, this is happening because according RFC1459 this is the end of the message * fix_irc_notification: Adjust tabulatin the script 'alarm-notify.sh' is not following our default format, this commit returns to old format the newest line brought

thiagoftsm committed Nov 7, 2019 at 15:57 UTC e3ba4c14d1f1c9ae43062a00e0157e30c15ed78f
1 file changed +2 -1
health/notifications/alarm-notify.sh.in
+2 -1
@@ -1628,9 +1628,10 @@ send_irc() {
1628 *) color="#777777" ;;
1629 esac
1630
1631 + SNDMESSAGE="${MESSAGE//$'\n'/", "}"
1632 for CHANNEL in ${CHANNELS}; do
1633 error=0
1633 - send_alarm=$(echo -e "USER ${NICKNAME} guest ${REALNAME} ${SERVERNAME}\\nNICK ${NICKNAME}\\nJOIN ${CHANNEL}\\nPRIVMSG ${CHANNEL} :${MESSAGE}\\nQUIT\\n" \ | nc "${NETWORK}" 6667)
1634 + send_alarm=$(echo -e "USER ${NICKNAME} guest ${REALNAME} ${SERVERNAME}\\nNICK ${NICKNAME}\\nJOIN ${CHANNEL}\\nPRIVMSG ${CHANNEL} :${SNDMESSAGE}\\nQUIT\\n" \ | nc "${NETWORK}" 6667)
1635 reply_codes=$(echo "${send_alarm}" | cut -d ' ' -f 2 | grep -o '[0-9]*')
1636 for code in ${reply_codes}; do
1637 if [ "${code}" -ge 400 ] && [ "${code}" -le 599 ]; then