0
0
Fork 0
mirror of https://github.com/netdata/netdata.git synced 2025-04-28 22:52:30 +00:00

Remove discontinued Hangouts and StackPulse notification methods ()

This commit is contained in:
Fotis Voutsas 2023-09-26 10:45:47 +03:00 committed by GitHub
parent ad26c3ddfc
commit 72f32b83e9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 1 additions and 422 deletions

View file

@ -180,7 +180,7 @@ navigate to `http://NODE:19999`, replacing `NODE` with the IP address or hostnam
Netdata comes with hundreds of pre-configured alerts, that automatically check your metrics, immediately after they start getting collected.
Netdata can dispatch alert notifications to multiple third party systems, including: `email`, `Alerta`, `AWS SNS`, `Discord`, `Dynatrace`, `flock`, `gotify`, `IRC`, `Matrix`, `MessageBird`, `Microsoft Teams`, `ntfy`, `OPSgenie`, `PagerDuty`, `Prowl`, `PushBullet`, `PushOver`, `RocketChat`, `Slack`, `SMS tools`, `StackPulse`, `Syslog`, `Telegram`, `Twilio`.
Netdata can dispatch alert notifications to multiple third party systems, including: `email`, `Alerta`, `AWS SNS`, `Discord`, `Dynatrace`, `flock`, `gotify`, `IRC`, `Matrix`, `MessageBird`, `Microsoft Teams`, `ntfy`, `OPSgenie`, `PagerDuty`, `Prowl`, `PushBullet`, `PushOver`, `RocketChat`, `Slack`, `SMS tools`, `Syslog`, `Telegram`, `Twilio`.
By default, Netdata will send e-mail notifications, if there is a configured MTA on the system.

View file

@ -83,7 +83,6 @@ notification platform.
- [**Rocket.Chat**](https://github.com/netdata/netdata/blob/master/health/notifications/rocketchat/README.md)
- [**Slack**](https://github.com/netdata/netdata/blob/master/health/notifications/slack/README.md)
- [**SMS Server Tools 3**](https://github.com/netdata/netdata/blob/master/health/notifications/smstools3/README.md)
- [**StackPulse**](https://github.com/netdata/netdata/blob/master/health/notifications/stackpulse/README.md)
- [**Syslog**](https://github.com/netdata/netdata/blob/master/health/notifications/syslog/README.md)
- [**Telegram**](https://github.com/netdata/netdata/blob/master/health/notifications/telegram/README.md)
- [**Twilio**](https://github.com/netdata/netdata/blob/master/health/notifications/twilio/README.md)

View file

@ -32,7 +32,6 @@ include discord/Makefile.inc
include email/Makefile.inc
include flock/Makefile.inc
include gotify/Makefile.inc
include hangouts/Makefile.inc
include irc/Makefile.inc
include kavenegar/Makefile.inc
include messagebird/Makefile.inc
@ -45,7 +44,6 @@ include pushover/Makefile.inc
include rocketchat/Makefile.inc
include slack/Makefile.inc
include smstools3/Makefile.inc
include stackpulse/Makefile.inc
include syslog/Makefile.inc
include telegram/Makefile.inc
include twilio/Makefile.inc

View file

@ -34,9 +34,7 @@
# - syslog messages by @Ferroin
# - Microsoft Team notification by @tioumen
# - RocketChat notifications by @Hermsi1337 #3777
# - Google Hangouts Chat notifications by @EnzoAkira and @hendrikhofstadt
# - Dynatrace Event by @illumine
# - Stackpulse Event by @thiagoftsm
# - Opsgenie by @thiaoftsm #9858
# - Gotify by @coffeegrind123
# - ntfy.sh by @Dim-P
@ -174,7 +172,6 @@ irc
awssns
rocketchat
sms
hangouts
dynatrace
matrix
ntfy
@ -390,10 +387,6 @@ IRC_REALNAME=
IRC_NETWORK=
IRC_PORT=6667
# hangouts configs
declare -A HANGOUTS_WEBHOOK_URI
declare -A HANGOUTS_WEBHOOK_THREAD
# dynatrace configs
DYNATRACE_SPACE=
DYNATRACE_SERVER=
@ -403,9 +396,6 @@ DYNATRACE_ANNOTATION_TYPE=
DYNATRACE_EVENT=
SEND_DYNATRACE=
# stackpulse configs
STACKPULSE_WEBHOOK=
# gotify configs
GOTIFY_APP_URL=
GOTIFY_APP_TOKEN=
@ -635,9 +625,6 @@ filter_recipient_by_criticality() {
# check irc
[ -z "${IRC_NETWORK}" ] && SEND_IRC="NO"
# check hangouts
[ ${#HANGOUTS_WEBHOOK_URI[@]} -eq 0 ] && SEND_HANGOUTS="NO"
# check fleep
#shellcheck disable=SC2153
{ [ -z "${FLEEP_SERVER}" ] || [ -z "${FLEEP_SENDER}" ]; } && SEND_FLEEP="NO"
@ -661,9 +648,6 @@ filter_recipient_by_criticality() {
# check ntfy
[ -z "${DEFAULT_RECIPIENT_NTFY}" ] && SEND_NTFY="NO"
# check stackpulse
[ -z "${STACKPULSE_WEBHOOK}" ] && SEND_STACKPULSE="NO"
# check msteams
[ -z "${MSTEAMS_WEBHOOK_URL}" ] && SEND_MSTEAMS="NO"
@ -692,12 +676,10 @@ if [ "${SEND_PUSHOVER}" = "YES" ] ||
[ "${SEND_KAFKA}" = "YES" ] ||
[ "${SEND_FLEEP}" = "YES" ] ||
[ "${SEND_PROWL}" = "YES" ] ||
[ "${SEND_HANGOUTS}" = "YES" ] ||
[ "${SEND_MATRIX}" = "YES" ] ||
[ "${SEND_CUSTOM}" = "YES" ] ||
[ "${SEND_MSTEAMS}" = "YES" ] ||
[ "${SEND_DYNATRACE}" = "YES" ] ||
[ "${SEND_STACKPULSE}" = "YES" ] ||
[ "${SEND_OPSGENIE}" = "YES" ] ||
[ "${SEND_GOTIFY}" = "YES" ] ||
[ "${SEND_NTFY}" = "YES" ]; then
@ -724,11 +706,9 @@ if [ "${SEND_PUSHOVER}" = "YES" ] ||
SEND_KAFKA="NO"
SEND_FLEEP="NO"
SEND_PROWL="NO"
SEND_HANGOUTS="NO"
SEND_MATRIX="NO"
SEND_CUSTOM="NO"
SEND_DYNATRACE="NO"
SEND_STACKPULSE="NO"
SEND_OPSGENIE="NO"
SEND_GOTIFY="NO"
SEND_NTFY="NO"
@ -873,13 +853,11 @@ for method in "${SEND_EMAIL}" \
"${SEND_MATRIX}" \
"${SEND_CUSTOM}" \
"${SEND_IRC}" \
"${SEND_HANGOUTS}" \
"${SEND_AWSSNS}" \
"${SEND_SYSLOG}" \
"${SEND_SMS}" \
"${SEND_MSTEAMS}" \
"${SEND_DYNATRACE}" \
"${SEND_STACKPULSE}" \
"${SEND_OPSGENIE}" \
"${SEND_GOTIFY}" \
"${SEND_NTFY}" ; do
@ -2122,117 +2100,6 @@ send_sms() {
return 1
}
# -----------------------------------------------------------------------------
# hangouts sender
send_hangouts() {
local rooms="${1}" httpcode sent=0 room color payload webhook thread
[ "${SEND_HANGOUTS}" != "YES" ] && return 1
case "${status}" in
WARNING) color="#ffa700" ;;
CRITICAL) color="#d62d20" ;;
CLEAR) color="#008744" ;;
*) color="#777777" ;;
esac
for room in ${rooms}; do
if [ -z "${HANGOUTS_WEBHOOK_URI[$room]}" ] ; then
info "Can't send Hangouts notification for: ${host} ${chart}.${name} to room ${room}. HANGOUTS_WEBHOOK_URI[$room] not defined"
else
if [ -n "${HANGOUTS_WEBHOOK_THREAD[$room]}" ]; then
thread="\"name\" : \"${HANGOUTS_WEBHOOK_THREAD[$room]}\""
fi
webhook="${HANGOUTS_WEBHOOK_URI[$room]}"
payload="$(
cat <<EOF
{
"cards": [
{
"header": {
"title": "Netdata on ${host}",
"imageUrl": "${images_base_url}/images/banner-icon-144x144.png",
"imageStyle": "IMAGE"
},
"sections": [
{
"header": "<b>${host}</b>",
"widgets": [
{
"keyValue": {
"topLabel": "Status Message",
"content": "<b>${status_message}</b>",
"contentMultiline": "true",
"iconUrl": "${image}",
"onClick": {
"openLink": {
"url": "${goto_url}"
}
}
}
},
{
"keyValue": {
"topLabel": "${chart} | ${family}",
"content": "<font color=${color}>${alarm}</font>",
"contentMultiline": "true"
}
}
]
},
{
"widgets": [
{
"textParagraph": {
"text": "<font color=\"#0057e7\">@ ${date}\n<b>${info}</b></font>"
}
}
]
},
{
"widgets": [
{
"buttons": [
{
"textButton": {
"text": "Go to ${host}",
"onClick": {
"openLink": {
"url": "${goto_url}"
}
}
}
}
]
}
]
}
]
}
],
"thread": {
$thread
}
}
EOF
)"
httpcode=$(docurl -H "Content-Type: application/json" -X POST -d "${payload}" "${webhook}")
if [ "${httpcode}" = "200" ]; then
info "sent hangouts notification for: ${host} ${chart}.${name} is ${status} to '${room}'"
sent=$((sent + 1))
else
error "failed to send hangouts notification for: ${host} ${chart}.${name} is ${status} to '${room}', with HTTP response status code ${httpcode}."
fi
fi
done
[ ${sent} -gt 0 ] && return 0
return 1
}
# -----------------------------------------------------------------------------
# Dynatrace sender
@ -2283,51 +2150,6 @@ EOF
fi
}
# -----------------------------------------------------------------------------
# Stackpulse sender
send_stackpulse() {
local payload httpcode oldv currv
[ "${SEND_STACKPULSE}" != "YES" ] && return 1
# We are sending null when values are nan to avoid errors while JSON message is parsed
[ "${old_value}" != "nan" ] && oldv="${old_value}" || oldv="null"
[ "${value}" != "nan" ] && currv="${value}" || currv="null"
payload=$(cat <<EOF
{
"Node" : "${host}",
"Chart" : "${chart}",
"OldValue" : ${oldv},
"Value" : ${currv},
"Units" : "${units}",
"OldStatus" : "${old_status}",
"Status" : "${status}",
"Alarm" : "${name}",
"Date": ${when},
"Duration": ${duration},
"NonClearDuration": ${non_clear_duration},
"Description" : "${status_message}, ${info}",
"CalcExpression" : "${calc_expression}",
"CalcParamValues" : "${calc_param_values}",
"TotalWarnings" : "${total_warnings}",
"TotalCritical" : "${total_critical}",
"ID" : ${alarm_id}
}
EOF
)
httpcode=$(docurl -X POST -H "Content-Type: application/json" -d "${payload}" ${STACKPULSE_WEBHOOK})
if [ "${httpcode}" = "200" ]; then
info "sent stackpulse notification for: ${host} ${chart}.${name} is ${status}"
else
error "failed to send stackpulse notification for: ${host} ${chart}.${name} is ${status}, with HTTP response status code ${httpcode}."
return 1
fi
return 0
}
# -----------------------------------------------------------------------------
# Opsgenie sender
@ -2631,15 +2453,6 @@ raised_for_html=
send_slack "${SLACK_WEBHOOK_URL}" "${to_slack}"
SENT_SLACK=$?
# -----------------------------------------------------------------------------
# send the hangouts notification
# hangouts aggregates posts from the same room
# so we use "${host} ${status}" as the room, to make them diff
send_hangouts "${to_hangouts}"
SENT_HANGOUTS=$?
# -----------------------------------------------------------------------------
# send the Microsoft Teams notification
@ -3665,11 +3478,6 @@ SENT_EMAIL=$?
send_dynatrace "${host}" "${chart}" "${name}" "${status}"
SENT_DYNATRACE=$?
# -----------------------------------------------------------------------------
# send the EVENT to Stackpulse
send_stackpulse
SENT_STACKPULSE=$?
# -----------------------------------------------------------------------------
# send messages to Opsgenie
send_opsgenie
@ -3691,7 +3499,6 @@ for state in "${SENT_EMAIL}" \
"${SENT_PUSHOVER}" \
"${SENT_TELEGRAM}" \
"${SENT_SLACK}" \
"${SENT_HANGOUTS}" \
"${SENT_ROCKETCHAT}" \
"${SENT_ALERTA}" \
"${SENT_FLOCK}" \
@ -3713,7 +3520,6 @@ for state in "${SENT_EMAIL}" \
"${SENT_SMS}" \
"${SENT_MSTEAMS}" \
"${SENT_DYNATRACE}" \
"${SENT_STACKPULSE}" \
"${SENT_OPSGENIE}" \
"${SENT_GOTIFY}" \
"${SENT_NTFY}"; do

View file

@ -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 += \
hangouts/README.md \
hangouts/Makefile.inc \
$(NULL)

View file

@ -1,59 +0,0 @@
<!--
title: "Google Hangouts agent alert notifications"
description: "Send alerts to Send notifications to Google Hangouts any time an anomaly or performance issue strikes a node in your infrastructure."
sidebar_label: "Google Hangouts"
custom_edit_url: "https://github.com/netdata/netdata/edit/master/health/notifications/hangouts/README.md"
learn_status: "Published"
learn_topic_type: "Tasks"
learn_rel_path: "Integrations/Notify/Agent alert notifications"
learn_autogeneration_metadata: "{'part_of_cloud': False, 'part_of_agent': True}"
-->
# Google Hangouts agent alert notifications
[Google Hangouts](https://hangouts.google.com/) is a cross-platform messaging app developed by Google. You can configure
Netdata to send alert notifications to a Hangouts room in order to stay aware of possible health or performance issues
on your nodes. Here's an example of the notification in action:
![Netdata on Hangouts](https://user-images.githubusercontent.com/1153921/66427166-47de6900-e9c8-11e9-8322-b4b03f084dc1.png)
To receive notifications in Google Hangouts, you need the following in your Hangouts setup:
1. One or more rooms.
2. An **incoming webhook** for each room.
Follow [Google's documentation](https://developers.google.com/hangouts/chat/how-tos/webhooks) to create an incoming
webhook for each room you want to send Netdata notifications to.
Set the webhook URIs and room names in `health_alarm_notify.conf`. To edit it on your system, run
`/etc/netdata/edit-config health_alarm_notify.conf`):
## Threads (optional)
Instead, to receive alerts on different threads, Netdata allows you to concentrate them inside a unique thread when you
set the variable `HANGOUTS_WEBHOOK_THREAD[NAME]`.
```
#------------------------------------------------------------------------------
# hangouts (google hangouts chat) global notification options
# enable/disable sending hangouts notifications
SEND_HANGOUTS="YES"
# On Hangouts, in the room you choose, create an incoming webhook,
# copy the link and paste it below and also identify the room name.
# Without it, netdata cannot send hangouts notifications to that room.
# HANGOUTS_WEBHOOK_URI[ROOM_NAME]="URLforroom1"
HANGOUTS_WEBHOOK_URI[systems]="https://chat.googleapis.com/v1/spaces/AAAAXXXXXXX/..."
HANGOUTS_WEBHOOK_URI[development]="https://chat.googleapis.com/v1/spaces/AAAAYYYYY/..."
# On Hangouts, copy a thread link and change the values for space and thread
# HANGOUTS_WEBHOOK_THREAD[systems]="spaces/AAAAXXXXXXX/threads/XXXXXXXXXXX"
# if a DEFAULT_RECIPIENT_HANGOUTS are not configured,
# notifications wouldn't be send to hangouts rooms.
# DEFAULT_RECIPIENT_HANGOUTS="systems development|critical"
DEFAULT_RECIPIENT_HANGOUTS="sysadmin devops alerts|critical"
```
You can define multiple rooms like this: `sysadmin devops alerts|critical`.
The keywords `sysadmin`, `devops`, and `alerts` are Hangouts rooms.

View file

@ -21,7 +21,6 @@
# - messages to a local or remote syslog daemon
# - message to Microsoft Teams (through webhook)
# - message to Rocket.Chat (through webhook)
# - message to Google Hangouts Chat (through webhook)
# - push notifications to your mobile phone or desktop (ntfy.sh)
#
# The 'to' line given at netdata alarms defines a *role*, so that many
@ -185,7 +184,6 @@ sendsms=""
# kavenegar : "09155555555 09177777777|critical"
# pd : "<pd_service_key_1> <pd_service_key_2>|critical"
# irc : "<irc_channel_1> <irc_channel_2>|critical"
# hangouts : "alarms disasters|critical"
#
# You can append multiple modifiers. In this example, recipient receives
# notifications for critical alarms and following status changes except clear
@ -279,15 +277,6 @@ DYNATRACE_EVENT="CUSTOM_INFO"
DEFAULT_RECIPIENT_DYNATRACE=""
#------------------------------------------------------------------------------
# Stackpulse global notification options
SEND_STACKPULSE="YES"
# Webhook
STACKPULSE_WEBHOOK=""
DEFAULT_RECIPIENT_STACKPULSE=""
#------------------------------------------------------------------------------
# gotify global notification options
SEND_GOTIFY="YES"
@ -308,27 +297,6 @@ OPSGENIE_API_URL=""
DEFAULT_RECIPIENT_OPSGENIE=""
#------------------------------------------------------------------------------
# hangouts (google hangouts chat) global notification options
# enable/disable sending hangouts notifications
SEND_HANGOUTS="YES"
# On Hangouts, in the room you choose, create an incoming webhook,
# copy the link and paste it below and also give it a room name.
# Without it, netdata cannot send hangouts notifications to that room.
# You will then use the same room name in your recipients list. For each URI, you need
# HANGOUTS_WEBHOOK_URI[room_name]="WEBHOOK_URI"
# e.g. to define systems and development rooms/recipients:
# HANGOUTS_WEBHOOK_URI[systems]="URLforroom1"
# HANGOUTS_WEBHOOK_URI[development]="URLforroom2"
# if a DEFAULT_RECIPIENT_HANGOUTS is not configured,
# notifications won't be send to hangouts rooms. For the example above,
# a valid recipients list is the following
# DEFAULT_RECIPIENT_HANGOUTS="systems development|critical"
DEFAULT_RECIPIENT_HANGOUTS=""
#------------------------------------------------------------------------------
# pushover (pushover.net) global notification options
@ -967,8 +935,6 @@ custom_sender() {
# role_recipients_email[sysadmin]="${DEFAULT_RECIPIENT_EMAIL}"
# role_recipients_hangouts[sysadmin]="${DEFAULT_RECIPIENT_HANGOUTS}"
# role_recipients_pushover[sysadmin]="${DEFAULT_RECIPIENT_PUSHOVER}"
# role_recipients_pushbullet[sysadmin]="${DEFAULT_RECIPIENT_PUSHBULLET}"
@ -1015,8 +981,6 @@ custom_sender() {
# role_recipients_matrix[sysadmin]="${DEFAULT_RECIPIENT_MATRIX}"
# role_recipients_stackpulse[sysadmin]="${DEFAULT_RECIPIENT_STACKPULSE}"
# role_recipients_gotify[sysadmin]="${DEFAULT_RECIPIENT_GOTIFY}"
# role_recipients_ntfy[sysadmin]="${DEFAULT_RECIPIENT_NTFY}"
@ -1026,8 +990,6 @@ custom_sender() {
# role_recipients_email[domainadmin]="${DEFAULT_RECIPIENT_EMAIL}"
# role_recipients_hangouts[domainadmin]="${DEFAULT_RECIPIENT_HANGOUTS}"
# role_recipients_pushover[domainadmin]="${DEFAULT_RECIPIENT_PUSHOVER}"
# role_recipients_pushbullet[domainadmin]="${DEFAULT_RECIPIENT_PUSHBULLET}"
@ -1076,8 +1038,6 @@ custom_sender() {
# role_recipients_matrix[domainadmin]="${DEFAULT_RECIPIENT_MATRIX}"
# role_recipients_stackpulse[domainadmin]="${DEFAULT_RECIPIENT_STACKPULSE}"
# role_recipients_gotify[domainadmin]="${DEFAULT_RECIPIENT_GOTIFY}"
# role_recipients_ntfy[domainadmin]="${DEFAULT_RECIPIENT_NTFY}"
@ -1088,8 +1048,6 @@ custom_sender() {
# role_recipients_email[dba]="${DEFAULT_RECIPIENT_EMAIL}"
# role_recipients_hangouts[dba]="${DEFAULT_RECIPIENT_HANGOUTS}"
# role_recipients_pushover[dba]="${DEFAULT_RECIPIENT_PUSHOVER}"
# role_recipients_pushbullet[dba]="${DEFAULT_RECIPIENT_PUSHBULLET}"
@ -1138,8 +1096,6 @@ custom_sender() {
# role_recipients_matrix[dba]="${DEFAULT_RECIPIENT_MATRIX}"
# role_recipients_stackpulse[dba]="${DEFAULT_RECIPIENT_STACKPULSE}"
# role_recipients_gotify[dba]="${DEFAULT_RECIPIENT_GOTIFY}"
# role_recipients_ntfy[dba]="${DEFAULT_RECIPIENT_NTFY}"
@ -1150,8 +1106,6 @@ custom_sender() {
# role_recipients_email[webmaster]="${DEFAULT_RECIPIENT_EMAIL}"
# role_recipients_hangouts[webmaster]="${DEFAULT_RECIPIENT_HANGOUTS}"
# role_recipients_pushover[webmaster]="${DEFAULT_RECIPIENT_PUSHOVER}"
# role_recipients_pushbullet[webmaster]="${DEFAULT_RECIPIENT_PUSHBULLET}"
@ -1200,8 +1154,6 @@ custom_sender() {
# role_recipients_matrix[webmaster]="${DEFAULT_RECIPIENT_MATRIX}"
# role_recipients_stackpulse[webmaster]="${DEFAULT_RECIPIENT_STACKPULSE}"
# role_recipients_gotify[webmaster]="${DEFAULT_RECIPIENT_GOTIFY}"
# role_recipients_ntfy[webmaster]="${DEFAULT_RECIPIENT_NTFY}"
@ -1212,8 +1164,6 @@ custom_sender() {
# role_recipients_email[proxyadmin]="${DEFAULT_RECIPIENT_EMAIL}"
# role_recipients_hangouts[proxyadmin]="${DEFAULT_RECIPIENT_HANGOUTS}"
# role_recipients_pushover[proxyadmin]="${DEFAULT_RECIPIENT_PUSHOVER}"
# role_recipients_pushbullet[proxyadmin]="${DEFAULT_RECIPIENT_PUSHBULLET}"
@ -1262,8 +1212,6 @@ custom_sender() {
# role_recipients_matrix[proxyadmin]="${DEFAULT_RECIPIENT_MATRIX}"
# role_recipients_stackpulse[proxyadmin]="${DEFAULT_RECIPIENT_STACKPULSE}"
# role_recipients_gotify[proxyadmin]="${DEFAULT_RECIPIENT_GOTIFY}"
# role_recipients_ntfy[proxyadmin]="${DEFAULT_RECIPIENT_NTFY}"
@ -1274,8 +1222,6 @@ custom_sender() {
# role_recipients_email[sitemgr]="${DEFAULT_RECIPIENT_EMAIL}"
# role_recipients_hangouts[sitemgr]="${DEFAULT_RECIPIENT_HANGOUTS}"
# role_recipients_pushover[sitemgr]="${DEFAULT_RECIPIENT_PUSHOVER}"
# role_recipients_pushbullet[sitemgr]="${DEFAULT_RECIPIENT_PUSHBULLET}"
@ -1322,8 +1268,6 @@ custom_sender() {
# role_recipients_matrix[sitemgr]="${DEFAULT_RECIPIENT_MATRIX}"
# role_recipients_stackpulse[sitemgr]="${DEFAULT_RECIPIENT_STACKPULSE}"
# role_recipients_gotify[sitemgr]="${DEFAULT_RECIPIENT_GOTIFY}"
# role_recipients_ntfy[sitemgr]="${DEFAULT_RECIPIENT_NTFY}"

View file

@ -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 += \
stackpulse/README.md \
stackpulse/Makefile.inc \
$(NULL)

View file

@ -1,85 +0,0 @@
<!--
title: "StackPulse agent alert notifications"
description: "Send alerts to your StackPulse Netdata integration any time an anomaly or performance issue strikes a node in your infrastructure."
sidebar_label: "StackPulse"
custom_edit_url: "https://github.com/netdata/netdata/edit/master/health/notifications/stackpulse/README.md"
learn_status: "Published"
learn_topic_type: "Tasks"
learn_rel_path: "Integrations/Notify/Agent alert notifications"
learn_autogeneration_metadata: "{'part_of_cloud': False, 'part_of_agent': True}"
-->
# StackPulse agent alert notifications
[StackPulse](https://stackpulse.com/) is a software-as-a-service platform for site reliability engineering.
It helps SREs, DevOps Engineers and Software Developers reduce toil and alert fatigue while improving reliability of
software services by managing, analyzing and automating incident response activities.
Sending Netdata alert notifications to StackPulse allows you to create smart automated response workflows
(StackPulse playbooks) that will help you drive down your MTTD and MTTR by performing any of the following:
- Enriching the incident with data from multiple sources
- Performing triage actions and analyzing their results
- Orchestrating incident management and notification flows
- Performing automatic and semi-automatic remediation actions
- Analyzing incident data and remediation patterns to improve reliability of your services
To send the notification you need:
1. Create a Netdata integration in the `StackPulse Administration Portal`, and copy the `Endpoint` URL.
![Creating a Netdata integration in StackPulse](https://user-images.githubusercontent.com/49162938/93023348-d9455a80-f5dd-11ea-8e05-67d07dce93e4.png)
2. On your node, navigate to `/etc/netdata/` and run the following command:
```sh
$ ./edit-config health_alarm_notify.conf
```
3. Set the `STACKPULSE_WEBHOOK` variable to `Endpoint` URL you copied earlier:
```
SEND_STACKPULSE="YES"
STACKPULSE_WEBHOOK="https://hooks.stackpulse.io/v1/webhooks/YOUR_UNIQUE_ID"
```
4. Now restart Netdata using `sudo systemctl restart netdata`, or the [appropriate
method](https://github.com/netdata/netdata/blob/master/docs/configure/start-stop-restart.md) for your system. When your node creates an alert, you can see the
associated notification on your StackPulse Administration Portal
## React to alerts with playbooks
StackPulse allow users to create `Playbooks` giving additional information about events that happen in specific
scenarios. For example, you could create a Playbook that responds to a "low disk space" alert by compressing and
cleaning up storage partitions with dynamic data.
![image](https://user-images.githubusercontent.com/49162938/93207961-4c201400-f74b-11ea-94d1-42a29d007b62.png)
![The StackPulse Administration Portal with a Netdata alert](https://user-images.githubusercontent.com/49162938/93208199-bfc22100-f74b-11ea-83c4-728be23dcf4d.png)
### Create Playbooks for Netdata alerts
To create a Playbook, you need to access the StackPulse Administration Portal. After the initial setup, you need to
access the **TRIGGER** tab to define the scenarios used to trigger the event. The following variables are available:
- `Hostname`: The host that generated the event.
- `Chart`: The name of the chart.
- `OldValue` : The previous value of the alert.
- `Value`: The current value of the alert.
- `Units` : The units of the value.
- `OldStatus` : The previous status: REMOVED, UNINITIALIZED, UNDEFINED, CLEAR, WARNING, CRITICAL.
- `State`: The current alert status, the acceptable values are the same of `OldStatus`.
- `Alarm` : The name of the alert, as given in Netdata's health.d entries.
- `Date` : The timestamp this event occurred.
- `Duration` : The duration in seconds of the previous alert state.
- `NonClearDuration` : The total duration in seconds this is/was non-clear.
- `Description` : A short description of the alert copied from the alert definition.
- `CalcExpression` : The expression that was evaluated to trigger the alert.
- `CalcParamValues` : The values of the parameters in the expression, at the time of the evaluation.
- `TotalWarnings` : Total number of alerts in WARNING state.
- `TotalCritical` : Total number of alerts in CRITICAL state.
- `ID` : The unique id of the alert that generated this event.
For more details how to create a scenario, take a look at the [StackPulse documentation](https://docs.stackpulse.io).