summaryrefslogtreecommitdiffstats
path: root/health/notifications
diff options
context:
space:
mode:
authorAustin S. Hemmelgarn <austin@netdata.cloud>2020-04-13 08:39:52 -0400
committerAustin S. Hemmelgarn <austin@netdata.cloud>2020-04-13 08:42:22 -0400
commite2874320fc027f7ab51ab3e115d5b1889b8fd747 (patch)
treecd755ef9b8522634c61aed9888239c9b67394157 /health/notifications
parent353780082c0ac8525e5b52aa8a29bbf5b70871e8 (diff)
Revert changes since v1.21 in pereparation for hotfix release.
Diffstat (limited to 'health/notifications')
-rwxr-xr-xhealth/notifications/alarm-notify.sh.in84
-rw-r--r--health/notifications/dynatrace/Makefile.inc12
-rw-r--r--health/notifications/dynatrace/README.md36
-rwxr-xr-xhealth/notifications/health_alarm_notify.conf44
4 files changed, 4 insertions, 172 deletions
diff --git a/health/notifications/alarm-notify.sh.in b/health/notifications/alarm-notify.sh.in
index d580f38e7e..8f0e14a27d 100755
--- a/health/notifications/alarm-notify.sh.in
+++ b/health/notifications/alarm-notify.sh.in
@@ -35,7 +35,6 @@
# - Microsoft Team notification by @tioumen
# - RocketChat notifications by @Hermsi1337 #3777
# - Google Hangouts Chat notifications by @EnzoAkira and @hendrikhofstadt
-# - Dynatrace Event by @illumine
# -----------------------------------------------------------------------------
# testing notifications
@@ -171,7 +170,6 @@ awssns
rocketchat
sms
hangouts
-dynatrace
"
# -----------------------------------------------------------------------------
@@ -368,16 +366,6 @@ IRC_NETWORK=
# hangouts configs
declare -A HANGOUTS_WEBHOOK_URI
-# dynatrace configs
-DYNATRACE_SPACE=
-DYNATRACE_SERVER=
-DYNATRACE_TOKEN=
-DYNATRACE_TAG_VALUE=
-DYNATRACE_ANNOTATION_TYPE=
-DYNATRACE_EVENT=
-SEND_DYNATRACE=
-
-
# load the stock and user configuration files
# these will overwrite the variables above
@@ -515,14 +503,6 @@ filter_recipient_by_criticality() {
#shellcheck disable=SC2153
{ [ -z "${FLEEP_SERVER}" ] || [ -z "${FLEEP_SENDER}" ]; } && SEND_FLEEP="NO"
-# check dynatrace
-{ [ -z "${DYNATRACE_SPACE}" ] ||
- [ -z "${DYNATRACE_SERVER}" ] ||
- [ -z "${DYNATRACE_TOKEN}" ] ||
- [ -z "${DYNATRACE_TAG_VALUE}" ] ||
- [ -z "${DYNATRACE_EVENT}" ]; } && SEND_DYNATRACE="NO"
-
-
if [ "${SEND_PUSHOVER}" = "YES" ] ||
[ "${SEND_SLACK}" = "YES" ] ||
[ "${SEND_ROCKETCHAT}" = "YES" ] ||
@@ -541,8 +521,7 @@ if [ "${SEND_PUSHOVER}" = "YES" ] ||
[ "${SEND_PROWL}" = "YES" ] ||
[ "${SEND_HANGOUTS}" = "YES" ] ||
[ "${SEND_CUSTOM}" = "YES" ] ||
- [ "${SEND_MSTEAM}" = "YES" ] ||
- [ "${SEND_DYNATRACE}" = "YES" ]; then
+ [ "${SEND_MSTEAM}" = "YES" ]; then
# if we need curl, check for the curl command
if [ -z "${curl}" ]; then
curl="$(command -v curl 2>/dev/null)"
@@ -568,7 +547,6 @@ if [ "${SEND_PUSHOVER}" = "YES" ] ||
SEND_PROWL="NO"
SEND_HANGOUTS="NO"
SEND_CUSTOM="NO"
- SEND_DYNATRACE="NO"
fi
fi
@@ -695,9 +673,7 @@ for method in "${SEND_EMAIL}" \
"${SEND_AWSSNS}" \
"${SEND_SYSLOG}" \
"${SEND_SMS}" \
- "${SEND_MSTEAM}" \
- "${SEND_DYNATRACE}"; do
-
+ "${SEND_MSTEAM}"; do
if [ "${method}" == "YES" ]; then
proceed=1
break
@@ -1911,53 +1887,6 @@ EOF
return 1
}
-# -----------------------------------------------------------------------------
-# Dynatrace sender
-send_dynatrace() {
- [ "${SEND_DYNATRACE}" != "YES" ] && return 1
-
- local dynatrace_url="${DYNATRACE_SERVER}/e/${DYNATRACE_SPACE}/api/v1/events"
- local description="NetData Notification for: ${host} ${chart}.${name} is ${status}"
- local payload=""
-
- payload=$(cat <<EOF
-{
- "title": "NetData Alarm from ${host}",
- "source" : "${DYNATRACE_ANNOTATION_TYPE}",
- "description" : "${description}",
- "eventType": "${DYNATRACE_EVENT}",
- "attachRules":{
- "tagRule":[{
- "meTypes":["HOST"],
- "tags":["${DYNATRACE_TAG_VALUE}"]
- }]
- },
- "customProperties":{
- "description": "${description}"
- }
-}
-EOF
-)
-
- # echo ${payload}
-
- httpcode=$(docurl -X POST -H "Authorization: Api-token ${DYNATRACE_TOKEN}" -H "Content-Type: application/json" -d "${payload}" ${dynatrace_url})
- ret=$?
-
-
- if [ ${ret} -eq 0 ]; then
- if [ "${httpcode}" = "200" ]; then
- info "sent ${DYNATRACE_EVENT} to ${DYNATRACE_SERVER}"
- return 0
- else
- warning "Dynatrace ${DYNATRACE_SERVER} responded ${httpcode} notification for: ${host} ${chart}.${name} is ${status} was not sent!"
- return 1
- fi
- else
- error "failed to sent ${DYNATRACE_EVENT} notification for: ${host} ${chart}.${name} is ${status} to ${DYNATRACE_SERVER} with error code ${ret}."
- return 1
- fi
-}
# -----------------------------------------------------------------------------
# prepare the content of the notification
@@ -2463,12 +2392,6 @@ fi
SENT_EMAIL=$?
# -----------------------------------------------------------------------------
-# send the EVENT to Dynatrace
-send_dynatrace "${host}" "${chart}" "${name}" "${status}"
-SENT_DYNATRACE=$?
-
-
-# -----------------------------------------------------------------------------
# let netdata know
for state in "${SENT_EMAIL}" \
"${SENT_PUSHOVER}" \
@@ -2493,8 +2416,7 @@ for state in "${SENT_EMAIL}" \
"${SENT_AWSSNS}" \
"${SENT_SYSLOG}" \
"${SENT_SMS}" \
- "${SENT_MSTEAM}" \
- "${SENT_DYNATRACE}"; do
+ "${SENT_MSTEAM}"; do
if [ "${state}" -eq 0 ]; then
# we sent something
exit 0
diff --git a/health/notifications/dynatrace/Makefile.inc b/health/notifications/dynatrace/Makefile.inc
deleted file mode 100644
index a2ae623fbc..0000000000
--- a/health/notifications/dynatrace/Makefile.inc
+++ /dev/null
@@ -1,12 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-
-# THIS IS NOT A COMPLETE Makefile
-# IT IS INCLUDED BY ITS PARENT'S Makefile.am
-# IT IS REQUIRED TO REFERENCE ALL FILES RELATIVE TO THE PARENT
-
-# install these files
-dist_noinst_DATA += \
- dynatrace/README.md \
- dynatrace/Makefile.inc \
- $(NULL)
-
diff --git a/health/notifications/dynatrace/README.md b/health/notifications/dynatrace/README.md
deleted file mode 100644
index 3532968f05..0000000000
--- a/health/notifications/dynatrace/README.md
+++ /dev/null
@@ -1,36 +0,0 @@
-<!--
----
-title: "Dynatrace"
-custom_edit_url: https://github.com/netdata/netdata/edit/master/health/notifications/dynatrace/README.md
----
--->
-
-# Dynatrace
-
-Dynatrace allows you to receive notifications using their Events REST API.
-
-See [the Dynatrace documentation](https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/environment-api/events/post-event/) about POSTing an event in the Events API for more details.
-
-
-
-You need:
-
-1. 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`
-This is a required parameter.
-2. API Token. Generate a secure access API token that enables access to your Dynatrace monitoring data via the REST-based API.
-Generate a Dynatrace API authentication token. On your Dynatrace server, go to **Settings** --> **Integration** --> **Dynatrace API** --> **Generate token**.
-See [Dynatrace API - Authentication](https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/basics/dynatrace-api-authentication/) for more details.
-This is a required parameter.
-3. API Space. This is the URL part of the page you have access in order to generate the API Token. For example, for my generated API Token the URL is:
-https://monitor.illumineit.com/e/2a93fe0e-4cd5-469a-9d0d-1a064235cfce/#settings/integration/apikeys;gf=all
-In that case, my space is _2a93fe0e-4cd5-469a-9d0d-1a064235cfce_
-This is a required parameter.
-4. Generate a Server Tag. 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.
-This is a required parameter.
-5. Specify the Dynatrace event. This can be one of `CUSTOM_INFO`, `CUSTOM_ANNOTATION`, `CUSTOM_CONFIGURATION`, and `CUSTOM_DEPLOYMENT`.
-The default value is `CUSTOM_INFO`.
-This is a required parameter.
-6. Specify the annotation type. This is the source of the Dynatrace event. Put whatever it fits you, for example,
-_Netdata Alarm_, which is also the default value.
diff --git a/health/notifications/health_alarm_notify.conf b/health/notifications/health_alarm_notify.conf
index 7baffb68b1..5540dfc134 100755
--- a/health/notifications/health_alarm_notify.conf
+++ b/health/notifications/health_alarm_notify.conf
@@ -230,43 +230,6 @@ DEFAULT_RECIPIENT_EMAIL="root"
#EMAIL_PLAINTEXT_ONLY="YES"
#------------------------------------------------------------------------------
-# Dynatrace global notification options
-#------------------------------------------------------------------------------
-# enable/disable sending Dynatrace notifications
-SEND_DYNATRACE="YES"
-
-# The Dynatrace server with protocol prefix (http:// or https://), example https://monitor.illumineit.com
-# Required
-DYNATRACE_SERVER=""
-
-# Generate a Dynatrace API authentication token
-# Read https://www.dynatrace.com/support/help/extend-dynatrace/dynatrace-api/basics/dynatrace-api-authentication/
-# On Dynatrace server goto Settings --> Integration --> Dynatrace API --> Generate token
-# Required
-DYNATRACE_TOKEN=""
-
-# Beware: Space is taken from dynatrace URL from browser when you create the TOKEN
-# Required
-DYNATRACE_SPACE=""
-
-# Generate a Server Tag. On the Dynatrace Server go to Settings --> Tags --> Manually applied tags create the Tag
-# The NetData alarm will be sent as a Dynatrace Event to be correlated with all those hosts tagged with this Tag
-# you created.
-# Required
-DYNATRACE_TAG_VALUE=""
-
-# Change this to what you want
-DYNATRACE_ANNOTATION_TYPE="NetData Alarm"
-
-# This can be CUSTOM_INFO, CUSTOM_ANNOTATION, CUSTOM_CONFIGURATION, CUSTOM_DEPLOYMENT
-# Applying default value
-# Required
-DYNATRACE_EVENT="CUSTOM_INFO"
-
-
-DEFAULT_RECIPIENT_DYNATRACE=""
-
-#------------------------------------------------------------------------------
# hangouts (google hangouts chat) global notification options
# enable/disable sending hangouts notifications
@@ -910,7 +873,6 @@ role_recipients_msteam[sysadmin]="${DEFAULT_RECIPIENT_MSTEAM}"
role_recipients_rocketchat[sysadmin]="${DEFAULT_RECIPIENT_ROCKETCHAT}"
-role_recipients_dynatrace[sysadmin]="${DEFAULT_RECIPIENT_DYNATRACE}"
# -----------------------------------------------------------------------------
# DNS related alarms
@@ -960,7 +922,6 @@ role_recipients_rocketchat[domainadmin]="${DEFAULT_RECIPIENT_ROCKETCHAT}"
role_recipients_sms[domainadmin]="${DEFAULT_RECIPIENT_SMS}"
-role_recipients_dynatrace[domainadmin]="${DEFAULT_RECIPIENT_DYNATRACE}"
# -----------------------------------------------------------------------------
# database servers alarms
# mysql, redis, memcached, postgres, etc
@@ -1011,7 +972,6 @@ role_recipients_rocketchat[dba]="${DEFAULT_RECIPIENT_ROCKETCHAT}"
role_recipients_sms[dba]="${DEFAULT_RECIPIENT_SMS}"
-role_recipients_dynatrace[dba]="${DEFAULT_RECIPIENT_DYNATRACE}"
# -----------------------------------------------------------------------------
# web servers alarms
# apache, nginx, lighttpd, etc
@@ -1062,7 +1022,6 @@ role_recipients_rocketchat[webmaster]="${DEFAULT_RECIPIENT_ROCKETCHAT}"
role_recipients_sms[webmaster]="${DEFAULT_RECIPIENT_SMS}"
-role_recipients_dynatrace[webmaster]="${DEFAULT_RECIPIENT_DYNATRACE}"
# -----------------------------------------------------------------------------
# proxy servers alarms
# squid, etc
@@ -1113,7 +1072,7 @@ role_recipients_rocketchat[proxyadmin]="${DEFAULT_RECIPIENT_ROCKETCHAT}"
role_recipients_sms[proxyadmin]="${DEFAULT_RECIPIENT_SMS}"
-role_recipients_dynatrace[proxyadmin]="${DEFAULT_RECIPIENT_DYNATRACE}"
+
# -----------------------------------------------------------------------------
# peripheral devices
# UPS, photovoltaics, etc
@@ -1162,4 +1121,3 @@ role_recipients_rocketchat[sitemgr]="${DEFAULT_RECIPIENT_ROCKETCHAT}"
role_recipients_sms[sitemgr]="${DEFAULT_RECIPIENT_SMS}"
-role_recipients_dynatrace[sitemgr]="${DEFAULT_RECIPIENT_DYNATRACE}" \ No newline at end of file