summaryrefslogtreecommitdiffstats
path: root/conf.d
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <ahferroin7@gmail.com>2018-07-13 11:22:44 -0400
committerAustin S. Hemmelgarn <ahferroin7@gmail.com>2018-07-13 11:22:44 -0400
commita9b4db28b849e4ad10b9c68e0f723d326d30d5bd (patch)
treed4918fef23acfcf4451d2401b0d23ed8a18478a2 /conf.d
parent546ab2539b57a6079a50b6730f945a34254f234c (diff)
Add Amazon SNS notification support.
The Simple Notification Service (SNS) is a reasonably simple message broker service provided by Amazon as part of it's AWS offerings. SNS utilizes the concept of 'topics' (similar to Netdata's concept of 'roles' for notifications) to control message routing. Any given topic may have any number of subscribers of any of the following types: * Email addresses. * Phone numbers for SMS. * HTTP or HTTPS web hooks. * AWS Lambda endpoints. * AWS SQS endpoints. * Mobile applications (via various native push notification services). Topics are rpersented by Amazon Resource Names (ARN), which are a special type of URI. Unfortunately, properly signing requests to AWS endpoints is a serious pain in the arse, so we pretty much have to use the CLI interface. Because of the inflexibility of this tool, setup is somewhat painful. THis uses topic ARN's directly as recipients. SNS does not support delivery to multiple topics in bulk, so a separate call is required for each topic ARN. Users are provided with the ability to customize the message format used for the notifications.
Diffstat (limited to 'conf.d')
-rwxr-xr-xconf.d/health_alarm_notify.conf42
1 files changed, 41 insertions, 1 deletions
diff --git a/conf.d/health_alarm_notify.conf b/conf.d/health_alarm_notify.conf
index 890b189930..9e72aac4dc 100755
--- a/conf.d/health_alarm_notify.conf
+++ b/conf.d/health_alarm_notify.conf
@@ -14,6 +14,7 @@
# - 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)
@@ -85,6 +86,11 @@ nc=""
# 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
#
@@ -619,6 +625,28 @@ SYSLOG_FACILITY=''
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
#
@@ -719,6 +747,8 @@ 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}"
@@ -758,6 +788,8 @@ 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}"
@@ -798,6 +830,8 @@ 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}"
@@ -838,6 +872,8 @@ 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}"
@@ -878,6 +914,8 @@ 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}"
@@ -916,6 +954,8 @@ 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}" \ No newline at end of file
+role_recipients_msteam[sitemgr]="${DEFAULT_RECIPIENT_MSTEAM}"