4 # real-time performance and health monitoring, done right!
5 # (C) 2016 Costa Tsaousis <costa@tsaousis.gr>
8 # Script the send alarm notifications for netdata
11 # - multiple notification methods
12 # - multiple roles per alarm
13 # - multiple recipients per role
14 # - severity filtering per recipient
16 # Supported notification methods:
18 # - pushover.net notifications
19 # - slack.com notifications
20 # - telegram.org notifications
25 # check for BASH v4+ (required for associative arrays)
26 [ $(( ${BASH_VERSINFO[0]} )) -lt 4 ] && \
27 echo >&2 "${me}: BASH version 4 or later is required (this is ${BASH_VERSION})." && \
30 # defaults to allow running this script by hand
31 NETDATA_CONFIG_DIR="${NETDATA_CONFIG_DIR-/etc/netdata}"
32 NETDATA_CACHE_DIR="${NETDATA_CACHE_DIR-/var/cache/netdata}"
33 [ -z "${NETDATA_REGISTRY_URL}" ] && NETDATA_REGISTRY_URL="https://registry.my-netdata.io"
34 [ -z "${NETDATA_HOSTNAME}" ] && NETDATA_HOSTNAME="$(hostname)"
35 [ -z "${NETDATA_REGISTRY_HOSTNAME}" ] && NETDATA_REGISTRY_HOSTNAME="${NETDATA_HOSTNAME}"
37 # -----------------------------------------------------------------------------
38 # parse command line parameters
40 roles="${1}" # the roles that should be notified for this event
41 host="${2}" # the host generated this event
42 unique_id="${3}" # the unique id of this event
43 alarm_id="${4}" # the unique id of the alarm that generated this event
44 event_id="${5}" # the incremental id of the event, for this alarm id
45 when="${6}" # the timestamp this event occurred
46 name="${7}" # the name of the alarm, as given in netdata health.d entries
47 chart="${8}" # the name of the chart (type.id)
48 family="${9}" # the family of the chart
49 status="${10}" # the current status : REMOVED, UNITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL
50 old_status="${11}" # the previous status: REMOVED, UNITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL
51 value="${12}" # the current value of the alarm
52 old_value="${13}" # the previous value of the alarm
53 src="${14}" # the line number and file the alarm has been configured
54 duration="${15}" # the duration in seconds of the previous alarm state
55 non_clear_duration="${16}" # the total duration in seconds this is/was non-clear
56 units="${17}" # the units of the value
57 info="${18}" # a short description of the alarm
59 # -----------------------------------------------------------------------------
60 # screen statuses we don't need to send a notification
62 # don't do anything if this is not WARNING, CRITICAL or CLEAR
63 if [ "${status}" != "WARNING" -a "${status}" != "CRITICAL" -a "${status}" != "CLEAR" ]
65 echo >&2 "${me}: not sending notification for ${status} on '${chart}.${name}'"
69 # don't do anything if this is CLEAR, but it was not WARNING or CRITICAL
70 if [ "${old_status}" != "WARNING" -a "${old_status}" != "CRITICAL" -a "${status}" = "CLEAR" ]
72 echo >&2 "${me}: not sending notification for ${status} on '${chart}.${name}' (last status was ${old_status})"
76 # -----------------------------------------------------------------------------
79 # By default fetch images from the global public registry.
80 # This is required by default, since all notification methods need to download
81 # images via the Internet, and private registries might not be reachable.
82 # This can be overwritten at the configuration file.
83 images_base_url="https://registry.my-netdata.io"
86 # if empty they will be searched in the system path
90 # enable / disable features
98 DEFAULT_RECIPIENT_SLACK=
99 declare -A role_recipients_slack=()
103 DEFAULT_RECIPIENT_PUSHOVER=
104 declare -A role_recipients_pushover=()
108 DEFAULT_RECIPIENT_TELEGRAM=
109 declare -A role_recipients_telegram=()
112 DEFAULT_RECIPIENT_EMAIL="root"
113 declare -A role_recipients_email=()
115 # load the user configuration
116 # this will overwrite the variables above
117 if [ -f "${NETDATA_CONFIG_DIR}/health_alarm_notify.conf" ]
119 source "${NETDATA_CONFIG_DIR}/health_alarm_notify.conf"
122 # -----------------------------------------------------------------------------
123 # filter a recipient based on alarm event severity
125 filter_recipient_by_criticality() {
126 local method="${1}" x="${2}" r s
129 r="${x/|*/}" # the recipient
130 s="${x/*|/}" # the severity required for notifying this recipient
132 # no severity filtering for this person
133 [ "${r}" = "${s}" ] && return 0
135 # the severity is invalid
137 [ "${s}" != "CRITICAL" ] && return 0
139 # the new or the old status matches the severity
140 if [ "${s}" = "${status}" -o "${s}" = "${old_status}" ]
142 [ ! -d "${NETDATA_CACHE_DIR}/alarm-notify/${method}/${r}" ] && \
143 mkdir -p "${NETDATA_CACHE_DIR}/alarm-notify/${method}/${r}"
145 # we need to keep track of the notifications we sent
146 # so that the same user will receive the recovery
147 # even if old_status does not match the required severity
148 touch "${NETDATA_CACHE_DIR}/alarm-notify/${method}/${r}/${alarm_id}"
152 # it is a cleared alarm we have sent notification for
153 if [ "${status}" != "WARNING" -a "${status}" != "CRITICAL" -a -f "${NETDATA_CACHE_DIR}/alarm-notify/${method}/${r}/${alarm_id}" ]
155 rm "${NETDATA_CACHE_DIR}/alarm-notify/${method}/${r}/${alarm_id}"
162 # -----------------------------------------------------------------------------
163 # find the recipients' addresses per method
165 declare -A arr_slack=()
166 declare -A arr_pushover=()
167 declare -A arr_telegram=()
168 declare -A arr_email=()
170 # netdata may call us with multiple roles, and roles may have multiple but
171 # overlapping recipients - so, here we find the unique recipients.
172 for x in ${roles//,/ }
174 # the roles 'silent' and 'disabled' mean:
175 # don't send a notification for this role
176 [ "${x}" = "silent" -o "${x}" = "disabled" ] && continue
179 a="${role_recipients_email[${x}]}"
180 [ -z "${a}" ] && a="${DEFAULT_RECIPIENT_EMAIL}"
183 [ "${r}" != "disabled" ] && filter_recipient_by_criticality email "${r}" && arr_email[${r/|*/}]="1"
187 a="${role_recipients_pushover[${x}]}"
188 [ -z "${a}" ] && a="${DEFAULT_RECIPIENT_PUSHOVER}"
191 [ "${r}" != "disabled" ] && filter_recipient_by_criticality pushover "${r}" && arr_pushover[${r/|*/}]="1"
195 a="${role_recipients_telegram[${x}]}"
196 [ -z "${a}" ] && a="${DEFAULT_RECIPIENT_TELEGRAM}"
199 [ "${r}" != "disabled" ] && filter_recipient_by_criticality telegram "${r}" && arr_telegram[${r/|*/}]="1"
203 a="${role_recipients_slack[${x}]}"
204 [ -z "${a}" ] && a="${DEFAULT_RECIPIENT_SLACK}"
207 [ "${r}" != "disabled" ] && filter_recipient_by_criticality slack "${r}" && arr_slack[${r/|*/}]="1"
211 # build the list of slack recipients (channels)
212 to_slack="${!arr_slack[*]}"
213 [ -z "${to_slack}" ] && SEND_SLACK="NO"
215 # build the list of pushover recipients (user tokens)
216 to_pushover="${!arr_pushover[*]}"
217 [ -z "${to_pushover}" ] && SEND_PUSHOVER="NO"
219 # check array of telegram recipients (chat ids)
220 to_telegram="${!arr_telegram[*]}"
221 [ -z "${to_telegram}" ] && SEND_TELEGRAM="NO"
223 # build the list of email recipients (email addresses)
225 for x in "${!arr_email[@]}"
227 [ ! -z "${to_email}" ] && to_email="${to_email}, "
228 to_email="${to_email}${x}"
230 [ -z "${to_email}" ] && SEND_EMAIL="NO"
233 # -----------------------------------------------------------------------------
234 # verify the delivery methods supported
237 [ -z "${SLACK_WEBHOOK_URL}" ] && SEND_SLACK="NO"
240 [ -z "${PUSHOVER_APP_TOKEN}" ] && SEND_PUSHOVER="NO"
243 [ -z "${TELEGRAM_BOT_TOKEN}" ] && SEND_TELEGRAM="NO"
245 if [ \( "${SEND_PUSHOVER}" = "YES" -o "${SEND_SLACK}" = "YES" -o "${SEND_TELEGRAM}" = "YES" \) -a -z "${curl}" ]
247 curl="$(which curl 2>/dev/null || command -v curl 2>/dev/null)"
256 if [ "${SEND_EMAIL}" = "YES" -a -z "${sendmail}" ]
258 sendmail="$(which sendmail 2>/dev/null || command -v sendmail 2>/dev/null)"
259 [ -z "${sendmail}" ] && SEND_EMAIL="NO"
262 # check that we have at least a method enabled
263 if [ "${SEND_EMAIL}" != "YES" -a "${SEND_PUSHOVER}" != "YES" -a "${SEND_TELEGRAM}" != "YES" -a "${SEND_SLACK}" != "YES" ]
265 echo >&2 "All notification methods are disabled. Not sending a notification."
269 # -----------------------------------------------------------------------------
270 # get the system hostname
272 [ -z "${host}" ] && host="${NETDATA_HOSTNAME}"
273 [ -z "${host}" ] && host="${NETDATA_REGISTRY_HOSTNAME}"
274 [ -z "${host}" ] && host="$(hostname 2>/dev/null)"
276 # -----------------------------------------------------------------------------
277 # get the date the alarm happened
279 date="$(date --date=@${when} 2>/dev/null)"
280 [ -z "${date}" ] && date="$(date 2>/dev/null)"
282 # -----------------------------------------------------------------------------
283 # URL encode a string
286 local string="${1}" strlen encoded pos c o
289 for (( pos=0 ; pos<strlen ; pos++ ))
298 printf -v o '%%%02x' "'$c"
308 # -----------------------------------------------------------------------------
309 # convert a duration in seconds, to a human readable duration
310 # using DAYS, MINUTES, SECONDS
313 local s="${1}" d=0 h=0 m=0 ds="day" hs="hour" ms="minute" ss="second" ret
315 s=$(( s - (d * 86400) ))
317 s=$(( s - (h * 3600) ))
319 s=$(( s - (m * 60) ))
323 [ ${m} -ge 30 ] && h=$(( h + 1 ))
324 [ ${d} -gt 1 ] && ds="days"
325 [ ${h} -gt 1 ] && hs="hours"
328 ret="${d} ${ds} and ${h} ${hs}"
334 [ ${s} -ge 30 ] && m=$(( m + 1 ))
335 [ ${h} -gt 1 ] && hs="hours"
336 [ ${m} -gt 1 ] && ms="minutes"
339 ret="${h} ${hs} and ${m} ${ms}"
345 [ ${m} -gt 1 ] && ms="minutes"
346 [ ${s} -gt 1 ] && ss="seconds"
349 ret="${m} ${ms} and ${s} ${ss}"
354 [ ${s} -gt 1 ] && ss="seconds"
362 # -----------------------------------------------------------------------------
367 if [ "${SEND_EMAIL}" = "YES" ]
375 echo >&2 "${me}: Sent email notification for: ${host} ${chart}.${name} is ${status} to '${to_email}'"
378 echo >&2 "${me}: Failed to send email notification for: ${host} ${chart}.${name} is ${status} to '${to_email}' with error code ${ret}."
386 # -----------------------------------------------------------------------------
390 local apptoken="${1}" usertokens="${2}" when="${3}" url="${4}" status="${5}" title="${6}" message="${7}" httpcode sent=0 user priority
392 if [ "${SEND_PUSHOVER}" = "YES" -a ! -z "${apptoken}" -a ! -z "${usertokens}" -a ! -z "${title}" -a ! -z "${message}" ]
395 # https://pushover.net/api
398 CLEAR) priority=-1;; # low priority: no sound or vibration
399 WARNING) priotity=0;; # normal priority: respect quiet hours
400 CRITICAL) priority=1;; # high priority: bypass quiet hours
401 *) priority=-2;; # lowest priority: no notification at all
404 for user in ${usertokens}
406 httpcode=$(${curl} --write-out %{http_code} --silent --output /dev/null \
407 --form-string "token=${apptoken}" \
408 --form-string "user=${user}" \
409 --form-string "html=1" \
410 --form-string "title=${title}" \
411 --form-string "message=${message}" \
412 --form-string "timestamp=${when}" \
413 --form-string "url=${url}" \
414 --form-string "url_title=Open netdata dashboard to view the alarm" \
415 --form-string "priority=${priority}" \
416 https://api.pushover.net/1/messages.json)
418 if [ "${httpcode}" == "200" ]
420 echo >&2 "${me}: Sent pushover notification for: ${host} ${chart}.${name} is ${status} to '${user}'"
423 echo >&2 "${me}: Failed to send pushover notification for: ${host} ${chart}.${name} is ${status} to '${user}' with HTTP error code ${httpcode}."
427 [ ${sent} -gt 0 ] && return 0
434 # -----------------------------------------------------------------------------
438 local bottoken="${1}" chatids="${2}" message="${3}" httpcode sent=0 chatid disableNotification=""
440 if [ "${status}" = "CLEAR" ]; then disableNotification="--data-urlencode disable_notification=true"; fi
442 if [ "${SEND_TELEGRAM}" = "YES" -a ! -z "${bottoken}" -a ! -z "${chatids}" -a ! -z "${message}" ];
444 for chatid in ${chatids}
446 # https://core.telegram.org/bots/api#sendmessage
447 httpcode=$(${curl} --write-out %{http_code} --silent --output /dev/null ${disableNotification} \
448 --data-urlencode "parse_mode=HTML" \
449 --data-urlencode "disable_web_page_preview=true" \
450 --data-urlencode "text=$message" \
451 "https://api.telegram.org/bot${bottoken}/sendMessage?chat_id=$chatid")
453 if [ "${httpcode}" == "200" ]
455 echo >&2 "${me}: Sent telegram notification for: ${host} ${chart}.${name} is ${status} to '${chatid}'"
457 elif [ "${httpcode}" == "401" ]
459 echo >&2 "${me}: Failed to send telegram notification for: ${host} ${chart}.${name} is ${status} to '${chatid}': Wrong bot token."
461 echo >&2 "${me}: Failed to send telegram notification for: ${host} ${chart}.${name} is ${status} to '${chatid}' with HTTP error code ${httpcode}."
465 [ ${sent} -gt 0 ] && return 0
471 # -----------------------------------------------------------------------------
475 local webhook="${1}" channels="${2}" httpcode sent=0 channel color payload
477 [ "${SEND_SLACK}" != "YES" ] && return 1
480 WARNING) color="warning" ;;
481 CRITICAL) color="danger" ;;
482 CLEAR) color="good" ;;
483 *) color="#777777" ;;
486 for channel in ${channels}
490 "channel": "#${channel}",
491 "username": "netdata on ${host}",
492 "icon_url": "${images_base_url}/images/seo-performance-128.png",
493 "text": "${host} ${status_message}, \`${chart}\` (_${family}_), *${alarm}*",
496 "fallback": "${alarm} - ${chart} (${family}) - ${info}",
499 "title_link": "${goto_url}",
507 "title": "${family}",
511 "thumb_url": "${image}",
512 "footer": "<${goto_url}|${host}>",
520 httpcode=$(${curl} --write-out %{http_code} --silent --output /dev/null -X POST --data-urlencode "payload=${payload}" "${webhook}")
521 if [ "${httpcode}" == "200" ]
523 echo >&2 "${me}: Sent slack notification for: ${host} ${chart}.${name} is ${status} to '${channel}'"
526 echo >&2 "${me}: Failed to send slack notification for: ${host} ${chart}.${name} is ${status} to '${channel}', with HTTP error code ${httpcode}."
530 [ ${sent} -gt 0 ] && return 0
536 # -----------------------------------------------------------------------------
537 # prepare the content of the notification
539 # the url to send the user on click
540 urlencode "${NETDATA_REGISTRY_HOSTNAME}" >/dev/null; url_host="${REPLY}"
541 urlencode "${chart}" >/dev/null; url_chart="${REPLY}"
542 urlencode "${family}" >/dev/null; url_family="${REPLY}"
543 urlencode "${name}" >/dev/null; url_name="${REPLY}"
544 goto_url="${NETDATA_REGISTRY_URL}/goto-host-from-alarm.html?host=${url_host}&chart=${url_chart}&family=${url_family}&alarm=${url_name}&alarm_unique_id=${unique_id}&alarm_id=${alarm_id}&alarm_event_id=${event_id}"
546 # the severity of the alarm
549 # the time the alarm was raised
550 duration4human ${duration} >/dev/null; duration_txt="${REPLY}"
551 duration4human ${non_clear_duration} >/dev/null; non_clear_duration_txt="${REPLY}"
552 raised_for="(was ${old_status,,} for ${duration_txt})"
554 # the key status message
555 status_message="status unknown"
557 # the color of the alarm
561 alarm="${name//_/ } = ${value} ${units}"
563 # the image of the alarm
564 image="${images_base_url}/images/seo-performance-128.png"
566 # prepare the title based on status
569 image="${images_base_url}/images/alert-128-red.png"
570 status_message="is critical"
575 image="${images_base_url}/images/alert-128-orange.png"
576 status_message="needs attention"
581 image="${images_base_url}/images/check-mark-2-128-green.png"
582 status_message="recovered"
585 # don't show the value when the status is CLEAR
586 # for certain alarms, this value might not have any meaning
587 alarm="${name//_/ } ${raised_for}"
591 if [ "${status}" = "CLEAR" ]
593 severity="Recovered from ${old_status}"
594 if [ $non_clear_duration -gt $duration ]
596 raised_for="(alarm was raised for ${non_clear_duration_txt})"
599 elif [ "${old_status}" = "WARNING" -a "${status}" = "CRITICAL" ]
601 severity="Escalated to ${status}"
602 if [ $non_clear_duration -gt $duration ]
604 raised_for="(alarm is raised for ${non_clear_duration_txt})"
607 elif [ "${old_status}" = "CRITICAL" -a "${status}" = "WARNING" ]
609 severity="Demoted to ${status}"
610 if [ $non_clear_duration -gt $duration ]
612 raised_for="(alarm is raised for ${non_clear_duration_txt})"
619 # prepare HTML versions of elements
621 [ ! -z "${info}" ] && info_html=" <small><br/>${info}</small>"
624 [ ! -z "${raised_for}" ] && raised_for_html="<br/><small>${raised_for}</small>"
626 # -----------------------------------------------------------------------------
627 # send the slack notification
629 # slack aggregates posts from the same username
630 # so we use "${host} ${status}" as the bot username, to make them diff
632 send_slack "${SLACK_WEBHOOK_URL}" "${to_slack}"
635 # -----------------------------------------------------------------------------
636 # send the pushover notification
638 send_pushover "${PUSHOVER_APP_TOKEN}" "${to_pushover}" "${when}" "${goto_url}" "${status}" "${host} ${status_message} - ${name//_/ } - ${chart}" "
639 <font color=\"${color}\"><b>${alarm}</b></font>${info_html}<br/>
640 <small><b>${chart}</b><br/>Chart<br/> </small>
641 <small><b>${family}</b><br/>Family<br/> </small>
642 <small><b>${severity}</b><br/>Severity<br/> </small>
643 <small><b>${date}${raised_for_html}</b><br/>Time<br/> </small>
644 <a href=\"${goto_url}\">View Netdata</a><br/>
645 <small><small>The source of this alarm is line ${src}</small></small>
650 # -----------------------------------------------------------------------------
651 # send the telegram.org message
653 # https://core.telegram.org/bots/api#formatting-options
654 send_telegram "${TELEGRAM_BOT_TOKEN}" "${to_telegram}" "${host} ${status_message} - <b>${name//_/ }</b>
656 <a href=\"${goto_url}\">${alarm}</a>
661 # -----------------------------------------------------------------------------
666 Subject: ${host} ${status_message} - ${name//_/ } - ${chart}
667 Content-Type: text/html
669 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
670 <html xmlns="http://www.w3.org/1999/xhtml" style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; box-sizing: border-box; font-size: 14px; margin: 0; padding: 0;">
671 <body style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 14px; width: 100% !important; min-height: 100%; line-height: 1.6; background: #f6f6f6; margin:0; padding: 0;">
675 <td style="vertical-align: top;" valign="top"></td>
676 <td width="700" style="vertical-align: top; display: block !important; max-width: 700px !important; clear: both !important; margin: 0 auto; padding: 0;" valign="top">
677 <div style="max-width: 700px; display: block; margin: 0 auto; padding: 20px;">
678 <table width="100%" cellpadding="0" cellspacing="0" style="background: #fff; border: 1px solid #e9e9e9;">
681 <td bgcolor="#eee" style="padding: 5px 20px 5px 20px; background-color: #eee;">
682 <div style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 20px; color: #777; font-weight: bold;">netdata notification</div>
686 <td bgcolor="${color}" style="font-size: 16px; vertical-align: top; font-weight: 400; text-align: center; margin: 0; padding: 10px; color: #ffffff; background: ${color} !important; border: 1px solid ${color}; border-top-color: ${color};" align="center" valign="top">
687 <h1 style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-weight: 400; margin: 0;">${host} ${status_message}</h1>
691 <td style="vertical-align: top;" valign="top">
692 <div style="margin: 0; padding: 20px; max-width: 700px;">
693 <table width="100%" cellpadding="0" cellspacing="0" style="max-width:700px">
696 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 18px; vertical-align: top; margin: 0; padding:0 0 20px;" align="left" valign="top">
697 <span>${chart}</span>
698 <span style="display: block; color: #666666; font-size: 12px; font-weight: 300; line-height: 1; text-transform: uppercase;">Chart</span>
701 <tr style="margin: 0; padding: 0;">
702 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 18px; vertical-align: top; margin: 0; padding: 0 0 20px;" align="left" valign="top">
703 <span><b>${alarm}</b>${info_html}</span>
704 <span style="display: block; color: #666666; font-size: 12px; font-weight: 300; line-height: 1; text-transform: uppercase;">Alarm</span>
708 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 18px; vertical-align: top; margin: 0; padding: 0 0 20px;" align="left" valign="top">
709 <span>${family}</span>
710 <span style="display: block; color: #666666; font-size: 12px; font-weight: 300; line-height: 1; text-transform: uppercase;">Family</span>
713 <tr style="margin: 0; padding: 0;">
714 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 18px; vertical-align: top; margin: 0; padding: 0 0 20px;" align="left" valign="top">
715 <span>${severity}</span>
716 <span style="display: block; color: #666666; font-size: 12px; font-weight: 300; line-height: 1; text-transform: uppercase;">Severity</span>
719 <tr style="margin: 0; padding: 0;">
720 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 18px; vertical-align: top; margin: 0; padding: 0 0 20px;" align="left" valign="top"><span>${date}</span>
721 <span>${raised_for_html}</span> <span style="display: block; color: #666666; font-size: 12px; font-weight: 300; line-height: 1; text-transform: uppercase;">Time</span>
724 <tr style="margin: 0; padding: 0;">
725 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 18px; vertical-align: top; margin: 0; padding: 0 0 20px;">
726 <a href="${goto_url}" style="font-size: 14px; color: #ffffff; text-decoration: none; line-height: 1.5; font-weight: bold; text-align: center; display: inline-block; text-transform: capitalize; background: #35568d; border-width: 1px; border-style: solid; border-color: #2b4c86; margin: 0; padding: 10px 15px;" target="_blank">View Netdata</a>
729 <tr style="text-align: center; margin: 0; padding: 0;">
730 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 11px; vertical-align: top; margin: 0; padding: 10px 0 0 0; color: #666666;" align="center" valign="bottom">The source of this alarm is line <code>${src}</code>
733 <tr style="text-align: center; margin: 0; padding: 0;">
734 <td style="font-family: 'Helvetica Neue', 'Helvetica', Helvetica, Arial, sans-serif; font-size: 12px; vertical-align: top; margin:0; padding: 20px 0 0 0; color: #666666; border-top: 1px solid #f0f0f0;" align="center" valign="bottom">Sent by
735 <a href="https://mynetdata.io/" target="_blank">netdata</a>, the real-time performance monitoring.
756 # -----------------------------------------------------------------------------
759 # we did send something
760 [ ${SENT_EMAIL} -eq 0 -o ${SENT_PUSHOVER} -eq 0 -o ${SENT_TELEGRAM} -eq 0 -o ${SENT_SLACK} -eq 0 ] && exit 0
762 # we did not send anything