Dynatrace allows you to receive notifications using their Events REST API. See the Dynatrace documentation about POSTing an event in the Events API for more details. You can send notifications to Dynatrace using Netdata’s Agent alert notification feature, which supports dozens of endpoints, user roles, and more.
The configuration file name for this integration is health_alarm_notify.conf
.
You can edit the configuration file using the edit-config
script from the
Netdata config directory.
cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
sudo ./edit-config health_alarm_notify.conf
The following options can be defined for this notification
Name | Description | Default | Required |
---|---|---|---|
SEND_DYNATRACE | Set SEND_DYNATRACE to YES |
YES | yes |
DYNATRACE_SERVER | Set DYNATRACE_SERVER to the Dynatrace server with the protocol prefix, for example https://monitor.example.com . |
yes | |
DYNATRACE_TOKEN | Set DYNATRACE_TOKEN to your Dynatrace API authentication token |
yes | |
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 | |
DYNATRACE_TAG_VALUE | Set DYNATRACE_TAG_VALUE to your Dynatrace Server Tag. |
yes | |
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 |
DYNATRACE_EVENT | Set DYNATRACE_EVENT to the Dynatrace eventType you want. |
Netdata Alarm | no |
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.
AVAILABILITY_EVENT
, CUSTOM_ALERT
, CUSTOM_ANNOTATION
, CUSTOM_CONFIGURATION
, CUSTOM_DEPLOYMENT
, CUSTOM_INFO
, ERROR_EVENT
,
MARKED_FOR_TERMINATION
, PERFORMANCE_EVENT
, RESOURCE_CONTENTION_EVENT
.
You can read more here.
#------------------------------------------------------------------------------
# Dynatrace global notification options
SEND_DYNATRACE="YES"
DYNATRACE_SERVER="https://monitor.example.com"
DYNATRACE_TOKEN="XXXXXXX"
DYNATRACE_SPACE="2a93fe0e-4cd5-469a-9d0d-1a064235cfce"
DYNATRACE_TAG_VALUE="SERVERTAG"
DYNATRACE_ANNOTATION_TYPE="Netdata Alert"
DYNATRACE_EVENT="AVAILABILITY_EVENT"
You can run the following command by hand, to test alerts configuration:
# become user netdata
sudo su -s /bin/bash netdata
# enable debugging info on the console
export NETDATA_ALARM_NOTIFY_DEBUG=1
# send test alarms to sysadmin
/usr/libexec/netdata/plugins.d/alarm-notify.sh test
# send test alarms to any role
/usr/libexec/netdata/plugins.d/alarm-notify.sh test "ROLE"
Note that this will test all alert mechanisms for the selected role.
Want a personalised demo of Netdata for your use case?