master
yaml 99 lines 5.54 KB
Raw
1 # yamllint disable rule:line-length
2 ---
3 - id: 'notify-awssns'
4 meta:
5 name: 'AWS SNS'
6 link: 'https://aws.amazon.com/sns/'
7 categories:
8 - notify.agent
9 icon_filename: 'aws.svg'
10 keywords:
11 - AWS SNS
12 overview:
13 notification_description: |
14 As part of its AWS suite, Amazon provides a notification broker service called 'Simple Notification Service' (SNS). Amazon SNS works similarly to Netdata's own notification system, allowing to dispatch a single notification to multiple subscribers of different types. Among other things, SNS supports sending notifications to:
15 - Email addresses
16 - Mobile Phones via SMS
17 - HTTP or HTTPS web hooks
18 - AWS Lambda functions
19 - AWS SQS queues
20 - Mobile applications via push notifications
21 You can send notifications through Amazon SNS using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more.
22 notification_limitations: |
23 - While Amazon SNS supports sending differently formatted messages for different delivery methods, Netdata does not currently support this functionality.
24 - For email notification support, we recommend using Netdata's email notifications, as it has the following benefits:
25 - In most cases, it requires less configuration.
26 - Netdata's emails are nicely pre-formatted and support features like threading, which requires a lot of manual effort in SNS.
27 - It is less resource intensive and more cost-efficient than SNS.
28 setup:
29 prerequisites:
30 list:
31 - title: ''
32 description: |
33 - The [Amazon Web Services CLI tools](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html) (awscli).
34 - An actual home directory for the user you run Netdata as, instead of just using `/` as a home directory. The setup depends on the distribution, but `/var/lib/netdata` is the recommended directory. If you are using Netdata as a dedicated user, the permissions will already be correct.
35 - An Amazon SNS topic to send notifications to with one or more subscribers. The Getting Started section of the Amazon SNS documentation covers the basics of how to set this up. Make note of the Topic ARN when you create the topic.
36 - While not mandatory, it is highly recommended to create a dedicated IAM user on your account for Netdata to send notifications. This user needs to have programmatic access, and should only allow access to SNS. For an additional layer of security, you can create one for each system or group of systems.
37 - Terminal access to the Agent you wish to configure.
38 configuration:
39 file:
40 name: 'health_alarm_notify.conf'
41 options:
42 description: 'The following options can be defined for this notification'
43 folding:
44 title: 'Config Options'
45 enabled: true
46 list:
47 - name: 'aws path'
48 default_value: ''
49 description: "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."
50 required: true
51 - name: 'SEND_AWSNS'
52 default_value: 'YES'
53 description: "Set `SEND_AWSNS` to YES"
54 required: true
55 - name: 'AWSSNS_MESSAGE_FORMAT'
56 default_value: '${status} on ${host} at ${date}: ${chart} ${value_string}'
57 description: "Set `AWSSNS_MESSAGE_FORMAT` to the string that you want the alert to be sent into."
58 required: true
59 detailed_description: |
60 For the complete list of supported notification variables, see the [Alert Notification Variables](../../REFERENCE.md#alert-notification-variables) section in the Health Reference.
61
62 - name: 'DEFAULT_RECIPIENT_AWSSNS'
63 default_value: ''
64 description: "Set `DEFAULT_RECIPIENT_AWSSNS` to the Topic ARN you noted down upon creating the Topic."
65 required: true
66 detailed_description: |
67 All roles will default to this variable if left unconfigured.
68
69 You can have different recipient Topics per **role**, by editing `DEFAULT_RECIPIENT_AWSSNS` with the Topic ARN you want, in the following entries at the bottom of the same file:
70
71 ```text
72 role_recipients_awssns[sysadmin]="arn:aws:sns:us-east-2:123456789012:Systems"
73 role_recipients_awssns[domainadmin]="arn:aws:sns:us-east-2:123456789012:Domains"
74 role_recipients_awssns[dba]="arn:aws:sns:us-east-2:123456789012:Databases"
75 role_recipients_awssns[webmaster]="arn:aws:sns:us-east-2:123456789012:Development"
76 role_recipients_awssns[proxyadmin]="arn:aws:sns:us-east-2:123456789012:Proxy"
77 role_recipients_awssns[sitemgr]="arn:aws:sns:us-east-2:123456789012:Sites"
78 ```
79 examples:
80 folding:
81 enabled: true
82 title: ''
83 list:
84 - name: 'Basic Configuration'
85 folding:
86 enabled: false
87 description: 'An example working configuration would be:'
88 config: |
89 ```text
90 #------------------------------------------------------------------------------
91 # Amazon SNS notifications
92
93 SEND_AWSSNS="YES"
94 AWSSNS_MESSAGE_FORMAT="${status} on ${host} at ${date}: ${chart} ${value_string}"
95 DEFAULT_RECIPIENT_AWSSNS="arn:aws:sns:us-east-2:123456789012:MyTopic"
96 ```
97 troubleshooting:
98 problems:
99 list: []