master
md 133 lines 5.52 KB
Rendered Raw
1 <!--startmeta
2 custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/health/notifications/dynatrace/README.md"
3 meta_yaml: "https://github.com/netdata/netdata/edit/master/src/health/notifications/dynatrace/metadata.yaml"
4 sidebar_label: "Dynatrace"
5 learn_status: "Published"
6 learn_rel_path: "Alerts & Notifications/Notifications/Agent Dispatched Notifications"
7 keywords: ['Dynatrace']
8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NOTIFICATION'S metadata.yaml FILE"
9 endmeta-->
10
11 # Dynatrace
12
13
14 <img src="https://netdata.cloud/img/dynatrace.svg" width="150"/>
15
16
17 Dynatrace allows you to receive notifications using their Events REST API. See the [Dynatrace documentation](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/events-v2/post-event) about POSTing an event in the Events API for more details.
18 You can send notifications to Dynatrace using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more.
19
20
21 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
22
23 ## Setup
24
25
26 ### Prerequisites
27
28 ####
29
30 - A Dynatrace Server. You can use the same on all your Netdata servers but make sure the server is network visible from your Netdata hosts. The Dynatrace server should be with protocol prefixed (http:// or https://), for example: https://monitor.example.com.
31 - An API Token. Generate a secure access API token that enables access to your Dynatrace monitoring data via the REST-based API. See [Dynatrace API - Authentication](https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/basics/dynatrace-api-authentication/) for more details.
32 - An API Space. This is the URL part of the page you have access in order to generate the API Token. For example, the URL for a generated API token might look like: https://monitor.illumineit.com/e/2a93fe0e-4cd5-469a-9d0d-1a064235cfce/#settings/integration/apikeys;gf=all In that case, the Space is 2a93fe0e-4cd5-469a-9d0d-1a064235cfce.
33 - A Server Tag. To generate one on your Dynatrace Server, go to Settings --> Tags --> Manually applied tags and create the Tag. The Netdata alarm is sent as a Dynatrace Event to be correlated with all those hosts tagged with this Tag you have created.
34 - Terminal access to the Agent you wish to configure
35
36
37
38 ### Configuration
39
40 #### Options
41
42 The following options can be defined for this notification
43
44 <details open><summary>Config Options</summary>
45
46
47
48 | Option | Description | Default | Required |
49 |:-----|:------------|:--------|:---------:|
50 | SEND_DYNATRACE | Set `SEND_DYNATRACE` to YES | YES | yes |
51 | DYNATRACE_SERVER | Set `DYNATRACE_SERVER` to the Dynatrace server with the protocol prefix, for example `https://monitor.example.com`. | | yes |
52 | DYNATRACE_TOKEN | Set `DYNATRACE_TOKEN` to your Dynatrace API authentication token | | yes |
53 | [DYNATRACE_SPACE](#option-dynatrace-space) | Set `DYNATRACE_SPACE` to the API Space, it is the URL part of the page you have access in order to generate the API Token. | | yes |
54 | DYNATRACE_TAG_VALUE | Set `DYNATRACE_TAG_VALUE` to your Dynatrace Server Tag. | | yes |
55 | DYNATRACE_ANNOTATION_TYPE | `DYNATRACE_ANNOTATION_TYPE` can be left to its default value Netdata Alarm, but you can change it to better fit your needs. | Netdata Alarm | no |
56 | [DYNATRACE_EVENT](#option-dynatrace-event) | Set `DYNATRACE_EVENT` to the Dynatrace eventType you want. | Netdata Alarm | no |
57
58 <a id="option-dynatrace-space"></a>
59 ##### DYNATRACE_SPACE
60
61 For example, the URL for a generated API token might look like: https://monitor.illumineit.com/e/2a93fe0e-4cd5-469a-9d0d-1a064235cfce/#settings/integration/apikeys;gf=all In that case, the Space is 2a93fe0e-4cd5-469a-9d0d-1a064235cfce.
62
63
64 <a id="option-dynatrace-event"></a>
65 ##### DYNATRACE_EVENT
66
67 `AVAILABILITY_EVENT`, `CUSTOM_ALERT`, `CUSTOM_ANNOTATION`, `CUSTOM_CONFIGURATION`, `CUSTOM_DEPLOYMENT`, `CUSTOM_INFO`, `ERROR_EVENT`,
68 `MARKED_FOR_TERMINATION`, `PERFORMANCE_EVENT`, `RESOURCE_CONTENTION_EVENT`.
69 You can read more [here](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/events-v2/post-event#request-body-objects).
70
71
72
73 </details>
74
75
76
77 #### via File
78
79 The configuration file name for this integration is `health_alarm_notify.conf`.
80
81
82 You can edit the configuration file using the [`edit-config`](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#edit-configuration-files) script from the
83 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).
84
85 ```bash
86 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
87 sudo ./edit-config health_alarm_notify.conf
88 ```
89
90 ##### Examples
91
92 ###### Basic Configuration
93
94
95
96 ```yaml
97 #------------------------------------------------------------------------------
98 # Dynatrace global notification options
99
100 SEND_DYNATRACE="YES"
101 DYNATRACE_SERVER="https://monitor.example.com"
102 DYNATRACE_TOKEN="XXXXXXX"
103 DYNATRACE_SPACE="2a93fe0e-4cd5-469a-9d0d-1a064235cfce"
104 DYNATRACE_TAG_VALUE="SERVERTAG"
105 DYNATRACE_ANNOTATION_TYPE="Netdata Alert"
106 DYNATRACE_EVENT="AVAILABILITY_EVENT"
107
108 ```
109
110
111 ## Troubleshooting
112
113 ### Test Notification
114
115 You can run the following command by hand, to test alerts configuration:
116
117 ```bash
118 # become user netdata
119 sudo su -s /bin/bash netdata
120
121 # enable debugging info on the console
122 export NETDATA_ALARM_NOTIFY_DEBUG=1
123
124 # send test alarms to sysadmin
125 /usr/libexec/netdata/plugins.d/alarm-notify.sh test
126
127 # send test alarms to any role
128 /usr/libexec/netdata/plugins.d/alarm-notify.sh test "ROLE"
129 ```
130
131 Note that this will test _all_ alert mechanisms for the selected role.
132
133