Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
NetData
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Ansible
Roles
NetData
Commits
73493bdd
Commit
73493bdd
authored
8 years ago
by
jurgenhaas
Browse files
Options
Downloads
Patches
Plain Diff
Add Slack/Mattermost notifications for netdata
parent
a70494eb
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/health_alarm_notify.conf
+49
-11
49 additions, 11 deletions
templates/health_alarm_notify.conf
with
49 additions
and
11 deletions
templates/health_alarm_notify.conf
+
49
−
11
View file @
73493bdd
# Configuration for alarms recipients
# netdata alarms have been categorized to allow different roles to receive
# alarms related to their work.
# Configuration for alarm notifications
#
# this configuration is used by: alarm-notify.sh
# changes take effect immendiately (the next alarm will use them).
#
# alarm-notify.sh can send:
# - e-mails,
# - push notifications to your mobile phone,
# - messages to your slack team
#
# the recipient given in netdata alarms defines a role, so that different
# people can be notified for each role.
#
# This file defines the addresses for each role.
# This file is a BASH script itself.
###############################################################################
...
...
@@ -11,10 +18,12 @@
# The full path to the sendmail command.
# If empty, the system $PATH will be searched for it.
# If not found, email notifications will be disabled.
sendmail
=
""
# The full path of the curl command.
# If empty, the system $PATH will be searched for it.
# If not found, pushover and slack notifications will be disabled.
curl
=
""
...
...
@@ -22,13 +31,13 @@ curl=""
# sending emails
# note: multiple recipients can be given like this:
# "admin1@example.com
,
admin2@example.com
,
..."
# "admin1@example.com admin2@example.com ..."
# note it needs a comma!
# enable/disable sending emails
SEND_EMAIL
=
"YES"
# if a role recipient is not configured, an email will be send to
# if a role recipient is not configured, an email will be send to
:
DEFAULT_RECIPIENT_EMAIL
=
"root"
...
...
@@ -36,21 +45,41 @@ DEFAULT_RECIPIENT_EMAIL="root"
# sending pushover notifications (pushover.net)
# note: multiple recipients can be given like this:
# "USERTOKEN1 USERTOKEN2
USERTOKEN3
..."
# "USERTOKEN1 USERTOKEN2 ..."
# enable/disable sending pushover notifications
SEND_PUSHOVER
=
"YES"
# Login to pushover.
com
to get your pushover app token
# Login to pushover.
net
to get your pushover app token
# You need only one for all your netdata servers.
# Without it, netdata cannot send pushover notifications.
PUSHOVER_APP_TOKEN
=
"{{ netdata_pushover_app_token|default('') }}"
# if a role recipient
is
not configured, a notification will be send to
# this pushover user token
# if a role
's
recipient
s are
not configured, a notification will be send to
# this pushover user token
:
DEFAULT_RECIPIENT_PUSHOVER
=
"{{ netdata_pushover_user_token|default('') }}"
###############################################################################
# sending slack notifications
# note: multiple recipients can be given like this:
# "CHANNEL1 CHANNEL2 ..."
# enable/disable sending pushover notifications
SEND_SLACK
=
"YES"
# Login to slack.com and create an incoming webhook.
# You need only one for all your netdata servers.
# Without it, netdata cannot send slack notifications.
# Get yours from: https://api.slack.com/incoming-webhooks
SLACK_WEBHOOK_URL
=
"{{ netdata_slack_webhook|default('') }}"
# if a role's recipients are not configured, a notification will be send to
# this slack channel:
DEFAULT_RECIPIENT_SLACK
=
"{{ netdata_slack_channel|default('') }}"
###############################################################################
# RECIPIENTS PER ROLE
...
...
@@ -62,6 +91,8 @@ role_recipients_email[sysadmin]="${DEFAULT_RECIPIENT_EMAIL}"
role_recipients_pushover
[
sysadmin
]=
"${DEFAULT_RECIPIENT_PUSHOVER}"
role_recipients_slack
[
sysadmin
]=
"${DEFAULT_RECIPIENT_SLACK}"
# -----------------------------------------------------------------------------
# DNS related alarms
...
...
@@ -70,6 +101,8 @@ role_recipients_email[domainadmin]="${DEFAULT_RECIPIENT_EMAIL}"
role_recipients_pushover
[
domainadmin
]=
"${DEFAULT_RECIPIENT_PUSHOVER}"
role_recipients_slack
[
domainadmin
]=
"${DEFAULT_RECIPIENT_SLACK}"
# -----------------------------------------------------------------------------
# database servers alarms
...
...
@@ -79,6 +112,8 @@ role_recipients_email[dba]="${DEFAULT_RECIPIENT_EMAIL}"
role_recipients_pushover
[
dba
]=
"${DEFAULT_RECIPIENT_PUSHOVER}"
role_recipients_slack
[
dba
]=
"${DEFAULT_RECIPIENT_SLACK}"
# -----------------------------------------------------------------------------
# web servers alarms
...
...
@@ -88,6 +123,8 @@ role_recipients_email[webmaster]="${DEFAULT_RECIPIENT_EMAIL}"
role_recipients_pushover
[
webmaster
]=
"${DEFAULT_RECIPIENT_PUSHOVER}"
role_recipients_slack
[
webmaster
]=
"${DEFAULT_RECIPIENT_SLACK}"
# -----------------------------------------------------------------------------
# proxy servers alarms
...
...
@@ -97,3 +134,4 @@ role_recipients_email[proxyadmin]="${DEFAULT_RECIPIENT_EMAIL}"
role_recipients_pushover
[
proxyadmin
]=
"${DEFAULT_RECIPIENT_PUSHOVER}"
role_recipients_slack
[
proxyadmin
]=
"${DEFAULT_RECIPIENT_SLACK}"
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment