diff options
Diffstat (limited to '')
-rwxr-xr-x | health/notifications/health_alarm_notify.conf (renamed from conf.d/health_alarm_notify.conf) | 253 |
1 files changed, 253 insertions, 0 deletions
diff --git a/conf.d/health_alarm_notify.conf b/health/notifications/health_alarm_notify.conf index 0a95931ec..9e72aac4d 100755 --- a/conf.d/health_alarm_notify.conf +++ b/health/notifications/health_alarm_notify.conf @@ -14,7 +14,10 @@ # - sms messages to your cell phone or any sms enabled device (twilio.com) # - sms messages to your cell phone or any sms enabled device (messagebird.com) # - notifications to users on pagerduty.com +# - notifications to Amazon SNS topics (aws.amazon.com) # - messages to your irc channel on your selected network +# - messages to a local or remote syslog daemon +# - message to Microsoft Team (thru webhook) # # The 'to' line given at netdata alarms defines a *role*, so that many # people can be notified for each role. @@ -44,6 +47,23 @@ #------------------------------------------------------------------------------ +# date handling +# +# You can configure netdata alerts to send dates in any format you want. +# This uses standard `date` command format strings. See `man date` for +# more info on what you can put in here. Note that this has to start with a '+', otherwise it won't work. +# +# For ISO 8601 dates, use '+%FT%T%z' +# For RFC 5322 dates, use '+%a, %d %b %Y %H:%M:%S %z' +# For RFC 3339 dates, use '+%F %T%:z' +# For RFC 1123 dates, use '+%a, %d %b %Y %H:%M:%S %Z' +# For RFC 1036 dates, use '+%A, %d-%b-%y %H:%M:%S %Z' +# For a reasonably local date and time (in that order), use '+%x %X' +# For the old default behavior (compatible with ANSI C's asctime() function), leave this empty. +date_format='' + + +#------------------------------------------------------------------------------ # external commands # The full path to the sendmail command. @@ -61,6 +81,16 @@ curl="" # If not found, irc notifications will be silently disabled. nc="" +# The full path of the logger command. +# If empty, the system $PATH will be searched for it. +# If not found, syslog notifications will be silently disabled. +logger="" + +# The full path of the aws command. +# If empty, the system $PATH will be searched for it. +# If not found, Amazon SNS notifications will be silently disabled. +aws="" + #------------------------------------------------------------------------------ # extra options for external commands # @@ -74,6 +104,10 @@ nc="" # of potentially sensitive information. #curl_options="--insecure" +# Extra options to pass to logger. You shouldn't have to specify anything +# here in most cases. +#logger_options="" + #------------------------------------------------------------------------------ # NOTE ABOUT RECIPIENTS # @@ -144,6 +178,14 @@ DEFAULT_RECIPIENT_EMAIL="root" # autodetected from the environment. #EMAIL_CHARSET="UTF-8" +# You can also have netdata add headers to the message that will +# cause most e-mail clients to treat all notifications for a given +# chart+alarm+host combination as a single thread. This can help +# simplify tracking of alarms, as it provides an easy wway for scripts +# to corelate messages and also will cause most clients to group all the +# messages together. THis is off by default. +#EMAIL_THREADING="YES" + #------------------------------------------------------------------------------ # pushover (pushover.net) global notification options @@ -297,6 +339,60 @@ SLACK_WEBHOOK_URL="" # roles): DEFAULT_RECIPIENT_SLACK="" +#------------------------------------------------------------------------------ +# Microsoft Team (office.com) global notification options +# More details are available here regarding the payload syntax options : https://docs.microsoft.com/en-us/outlook/actionable-messages/message-card-reference +# Online designer : https://acdesignerbeta.azurewebsites.net/ +# multiple recipients can be given like this: +# "CHANNEL1 CHANNEL2 ..." + +# enable/disable sending team notifications +SEND_MSTEAM="YES" + +# if a role's recipients are not configured, a notification will be send to +# this slack channel (empty = do not send a notification for unconfigured +# roles): +# For team the channel name is encoded in the URI after ....IncomingWebhook/___/..... +# This value will be replaced in the webhook value to publish to several channels in a same Team. +# In order to get it working properly, you have to replace the value between [] ....IncomingWebhook/[___]/..... by "CHANNEL" string. +DEFAULT_RECIPIENT_MSTEAM="" +# Based on the way MS Teams is working, put the differents channels here like : "CHANNEL1 CHANNEL2 ..." +# AT LEAST ONE CHANNEL IS MANDATORY +MSTEAM_WEBHOOK_URL="" + +# Define the default color scheme for alert to MS Team - icon and color +# Icons - go to https://emojipedia.org/bomb/ +MSTEAM_ICON_DEFAULT="♡" +MSTEAM_ICON_CLEAR="💚" +MSTEAM_ICON_WARNING="⚠️" +MSTEAM_ICON_CRITICAL="🔥" + +# Colors +MSTEAM_COLOR_DEFAULT="0076D7" +MSTEAM_COLOR_CLEAR="65A677" +MSTEAM_COLOR_WARNING="FFA500" +MSTEAM_COLOR_CRITICAL="D93F3C" + + +#------------------------------------------------------------------------------ +# rocketchat (rocket.chat) global notification options + +# multiple recipients can be given like this: +# "CHANNEL1 CHANNEL2 ..." + +# enable/disable sending rocketchat notifications +SEND_ROCKETCHAT="YES" + +# Login to rocket.chat and create an incoming webhook. You need only one for all +# your netdata servers (or you can have one for each of your netdata). +# Without it, netdata cannot send rocketchat notifications. +ROCKETCHAT_WEBHOOK_URL="" + +# if a role's recipients are not configured, a notification will be send to +# this rocketchat channel (empty = do not send a notification for unconfigured +# roles): +DEFAULT_RECIPIENT_ROCKETCHAT="" + #------------------------------------------------------------------------------ # alerta (alerta.io) global notification options @@ -413,6 +509,28 @@ DEFAULT_RECIPIENT_PD="" #------------------------------------------------------------------------------ +# fleep notification options +# +# To send fleep.io notifications, you will need a webhook for the +# conversation you want to send to. + +# Fleep recipients are specified as the last part of the webhook URL. +# So, for a webhook URL of: https://fleep.io/hook/IJONmBuuSlWlkb_ttqyXJg, the +# recipient name would be: 'IJONmBuuSlWlkb_ttqyXJg'. + +# enable/disable sending fleep notifications +SEND_FLEEP="YES" + +# if a role's recipients are not configured, a notification will not be sent. +# (empty = do not send a notification for unconfigured roles): +DEFAULT_RECIPIENT_FLEEP="" + +# The user name to label the messages with. If this is unset, +# the hostname of the system the notification is for will be used. +FLEEP_SENDER="" + + +#------------------------------------------------------------------------------ # irc notification options # # irc notifications require only the nc utility to be installed. @@ -441,6 +559,94 @@ IRC_REALNAME="" #------------------------------------------------------------------------------ +# syslog notifications +# +# syslog notifications only need you to have a working logger command, which +# should be the case on pretty much any Linux system. + +# enable/disable sending syslog notifications +# NOTE: make sure you have everything else configured the way you want +# it _before_ turning this on. +SEND_SYSLOG="NO" + +# A note on log levels and facilities: +# +# The traditional UNIX syslog mechanism has the concept of both log +# levels and facilities. A log level indicates the relaitve severity of +# the message, while a facility specifies a generic source for the message +# (for example, the `mail` facility is where sendmail and postfix log +# their messages). All major syslog daemons have the ability to filter +# messages based on both log level and facility, and can often also make +# routing decisions for messages based on both factors. +# +# On Linux, the eight log levels in decreasing order of severity are: +# emerg, alert, crit, err, warning, notice, info, debug +# +# By default, warnings will be logged at the warning level, critical +# alerts at the crit level, and clear notifications at the invo level. +# +# And the 19 facilities you can log to are: +# auth, authpriv, cron, daemon, ftp, lpr, mail, news, syslog, user, +# uucp, local0, local1, local2, local3, local4, local5, local6, and local7 +# +# By default, netdata alerts will be logged to the local6 facility. +# +# Depending on your distribution, this means that either all your +# netdata alerts will by default end up in the main system log (usually +# /var/log/messages), or they won't be logged to a file at all. +# Neither of these are likely to be what you actually want, but any +# configuration to change that needs to happen in the syslog daemon +# configuration, not here. + +# This controls which facility is used by defalt for logging. Defaults +# to local6. +SYSLOG_FACILITY='' + +# If a role's recipients are not configured, use the following. +# (empty = do not send a notification for unconfigured roles) +# +# The recipient format for syslog uses the following format: +# [[facility.level][@host[:port]]/]prefix +# +# `prefix` gets appended to the front of all log messages generated for +# that recipient. The prefix is mandatory. +# 'host' and 'port' can be used to specify a remote syslog server to +# send messages to. Leave these out if you want messages to be delivered +# locally. 'host' can be either a hostname or an IP address. +# IPv6 addresses must have square around them. +# 'facility' and 'level' are used to override the default logging facility +# set above and the log level. If one is specified, both must be present. +# +# For example, to send messages with a 'netdata' prefix to a syslog +# daemon listening on port 514 on 'loghost' using the daemon facility and +# notice log level: +# DEFAULT_RECIPIENT_SYSLOG='daemon.notice@loghost:514/netdata' +# +DEFAULT_RECIPIENT_SYSLOG="netdata" + +#------------------------------------------------------------------------------ +# Amazon SNS notifications +# +# This method requires potentially complex manual configuration. See the +# netdata wiki for information on what is needed. + +# enable/disable sending Amazon SNS notifications +SEND_AWSSNS="YES" + +# Specify a template for the Amazon SNS notifications. This supports +# the same set of variables that are usable in the `custom_sender()` +# function in the custom notification configuration below. +# +AWSSNS_MESSAGE_FORMAT="${status} on ${host} at ${date}: ${chart} ${value_string}" + +# If a role's recipients are not configured, use the following. +# (empty = do not send a notification for unconfigured roles) +# +# Recipients for AWS SNS notifications are specified as topic ARN's. +# +DEFAULT_RECIPIENT_AWSSNS="" + +#------------------------------------------------------------------------------ # custom notifications # @@ -535,10 +741,18 @@ role_recipients_kavenegar[sysadmin]="${DEFAULT_RECIPIENT_KAVENEGAR}" role_recipients_pd[sysadmin]="${DEFAULT_RECIPIENT_PD}" +role_recipients_fleep[sysadmin]="${DEFAULT_RECIPIENT_FLEEP}" + role_recipients_irc[sysadmin]="${DEFAULT_RECIPIENT_IRC}" +role_recipients_syslog[sysadmin]="${DEFAULT_RECIPIENT_SYSLOG}" + +role_recipients_awssns[sysadmin]="${DEFAULT_RECIPIENT_AWSSNS}" + role_recipients_custom[sysadmin]="${DEFAULT_RECIPIENT_CUSTOM}" +role_recipients_msteam[sysadmin]="${DEFAULT_RECIPIENT_MSTEAM}" + # ----------------------------------------------------------------------------- # DNS related alarms @@ -568,10 +782,18 @@ role_recipients_kavenegar[domainadmin]="${DEFAULT_RECIPIENT_KAVENEGAR}" role_recipients_pd[domainadmin]="${DEFAULT_RECIPIENT_PD}" +role_recipients_fleep[domainadmin]="${DEFAULT_RECIPIENT_FLEEP}" + role_recipients_irc[domainadmin]="${DEFAULT_RECIPIENT_IRC}" +role_recipients_syslog[domainadmin]="${DEFAULT_RECIPIENT_SYSLOG}" + +role_recipients_awssns[domainadmin]="${DEFAULT_RECIPIENT_AWSSNS}" + role_recipients_custom[domainadmin]="${DEFAULT_RECIPIENT_CUSTOM}" +role_recipients_msteam[domainadmin]="${DEFAULT_RECIPIENT_MSTEAM}" + # ----------------------------------------------------------------------------- # database servers alarms # mysql, redis, memcached, postgres, etc @@ -602,10 +824,18 @@ role_recipients_kavenegar[dba]="${DEFAULT_RECIPIENT_KAVENEGAR}" role_recipients_pd[dba]="${DEFAULT_RECIPIENT_PD}" +role_recipients_fleep[dba]="${DEFAULT_RECIPIENT_FLEEP}" + role_recipients_irc[dba]="${DEFAULT_RECIPIENT_IRC}" +role_recipients_syslog[dba]="${DEFAULT_RECIPIENT_SYSLOG}" + +role_recipients_awssns[dba]="${DEFAULT_RECIPIENT_AWSSNS}" + role_recipients_custom[dba]="${DEFAULT_RECIPIENT_CUSTOM}" +role_recipients_msteam[dba]="${DEFAULT_RECIPIENT_MSTEAM}" + # ----------------------------------------------------------------------------- # web servers alarms # apache, nginx, lighttpd, etc @@ -636,10 +866,18 @@ role_recipients_kavenegar[webmaster]="${DEFAULT_RECIPIENT_KAVENEGAR}" role_recipients_pd[webmaster]="${DEFAULT_RECIPIENT_PD}" +role_recipients_fleep[webmaster]="${DEFAULT_RECIPIENT_FLEEP}" + role_recipients_irc[webmaster]="${DEFAULT_RECIPIENT_IRC}" +role_recipients_syslog[webmaster]="${DEFAULT_RECIPIENT_SYSLOG}" + +role_recipients_awssns[webmaster]="${DEFAULT_RECIPIENT_AWSSNS}" + role_recipients_custom[webmaster]="${DEFAULT_RECIPIENT_CUSTOM}" +role_recipients_msteam[webmaster]="${DEFAULT_RECIPIENT_MSTEAM}" + # ----------------------------------------------------------------------------- # proxy servers alarms # squid, etc @@ -670,10 +908,18 @@ role_recipients_kavenegar[proxyadmin]="${DEFAULT_RECIPIENT_KAVENEGAR}" role_recipients_pd[proxyadmin]="${DEFAULT_RECIPIENT_PD}" +role_recipients_fleep[proxyadmin]="${DEFAULT_RECIPIENT_FLEEP}" + role_recipients_irc[proxyadmin]="${DEFAULT_RECIPIENT_IRC}" +role_recipients_syslog[proxyadmin]="${DEFAULT_RECIPIENT_SYSLOG}" + +role_recipients_awssns[porxyadmin]="${DEFAULT_RECIPIENT_AWSSNS}" + role_recipients_custom[proxyadmin]="${DEFAULT_RECIPIENT_CUSTOM}" +role_recipients_msteam[proxyadmin]="${DEFAULT_RECIPIENT_MSTEAM}" + # ----------------------------------------------------------------------------- # peripheral devices # UPS, photovoltaics, etc @@ -704,5 +950,12 @@ role_recipients_kavenegar[sitemgr]="${DEFAULT_RECIPIENT_KAVENEGAR}" role_recipients_pd[sitemgr]="${DEFAULT_RECIPIENT_PD}" +role_recipients_fleep[sitemgr]="${DEFAULT_RECIPIENT_FLEEP}" + +role_recipients_syslog[sitemgr]="${DEFAULT_RECIPIENT_SYSLOG}" + +role_recipients_awssns[sitemgr]="${DEFAULT_RECIPIENT_AWSSNS}" + role_recipients_custom[sitemgr]="${DEFAULT_RECIPIENT_CUSTOM}" +role_recipients_msteam[sitemgr]="${DEFAULT_RECIPIENT_MSTEAM}" |