master
md 127 lines 3.9 KB
Rendered Raw
1 <!--startmeta
2 custom_edit_url: "https://github.com/netdata/netdata/edit/master/src/health/notifications/pushover/README.md"
3 meta_yaml: "https://github.com/netdata/netdata/edit/master/src/health/notifications/pushover/metadata.yaml"
4 sidebar_label: "PushOver"
5 learn_status: "Published"
6 learn_rel_path: "Alerts & Notifications/Notifications/Agent Dispatched Notifications"
7 keywords: ['PushOver']
8 message: "DO NOT EDIT THIS FILE DIRECTLY, IT IS GENERATED BY THE NOTIFICATION'S metadata.yaml FILE"
9 endmeta-->
10
11 # PushOver
12
13
14 <img src="https://netdata.cloud/img/pushover.png" width="150"/>
15
16
17 Send notification to Pushover using Netdata's Agent alert notification feature, which supports dozens of endpoints, user roles, and more.
18 - Netdata will send warning messages with priority 0 and critical messages with priority 1.
19 - Pushover allows you to select do-not-disturb hours. The way this is configured, critical notifications will ring and vibrate your phone, even during the do-not-disturb-hours.
20 - All other notifications will be delivered silently.
21
22
23 <img src="https://img.shields.io/badge/maintained%20by-Netdata-%2300ab44" />
24
25 ## Setup
26
27
28 ### Prerequisites
29
30 ####
31
32 - An Application token. You can use the same on all your Netdata servers.
33 - A User token for each user you are going to send notifications to. This is the actual recipient of the notification.
34 - Access to the terminal where Netdata Agent is running
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_PUSHOVER | Set `SEND_PUSHOVER` to YES | YES | yes |
51 | PUSHOVER_WEBHOOK_URL | set `PUSHOVER_WEBHOOK_URL` to your Pushover Application token. | | yes |
52 | [DEFAULT_RECIPIENT_PUSHOVER](#option-default-recipient-pushover) | Set `DEFAULT_RECIPIENT_PUSHOVER` the Pushover User token you want the alert notifications to be sent to. You can define multiple User tokens like this: `USERTOKEN1` `USERTOKEN2`. | | yes |
53
54 <a id="option-default-recipient-pushover"></a>
55 ##### DEFAULT_RECIPIENT_PUSHOVER
56
57 All roles will default to this variable if left unconfigured.
58
59 The `DEFAULT_RECIPIENT_PUSHOVER` can be edited in the following entries at the bottom of the same file:
60 ```text
61 role_recipients_pushover[sysadmin]="USERTOKEN1"
62 role_recipients_pushover[domainadmin]="USERTOKEN2"
63 role_recipients_pushover[dba]="USERTOKEN3 USERTOKEN4"
64 role_recipients_pushover[webmaster]="USERTOKEN5"
65 role_recipients_pushover[proxyadmin]="USERTOKEN6"
66 role_recipients_pushover[sitemgr]="USERTOKEN7"
67 ```
68
69
70
71 </details>
72
73
74
75 #### via File
76
77 The configuration file name for this integration is `health_alarm_notify.conf`.
78
79
80 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
81 Netdata [config directory](https://github.com/netdata/netdata/blob/master/docs/netdata-agent/configuration/README.md#locate-your-config-directory).
82
83 ```bash
84 cd /etc/netdata 2>/dev/null || cd /opt/netdata/etc/netdata
85 sudo ./edit-config health_alarm_notify.conf
86 ```
87
88 ##### Examples
89
90 ###### Basic Configuration
91
92
93
94 ```yaml
95 #------------------------------------------------------------------------------
96 # pushover (pushover.net) global notification options
97
98 SEND_PUSHOVER="YES"
99 PUSHOVER_APP_TOKEN="XXXXXXXXX"
100 DEFAULT_RECIPIENT_PUSHOVER="USERTOKEN"
101
102 ```
103
104
105 ## Troubleshooting
106
107 ### Test Notification
108
109 You can run the following command by hand, to test alerts configuration:
110
111 ```bash
112 # become user netdata
113 sudo su -s /bin/bash netdata
114
115 # enable debugging info on the console
116 export NETDATA_ALARM_NOTIFY_DEBUG=1
117
118 # send test alarms to sysadmin
119 /usr/libexec/netdata/plugins.d/alarm-notify.sh test
120
121 # send test alarms to any role
122 /usr/libexec/netdata/plugins.d/alarm-notify.sh test "ROLE"
123 ```
124
125 Note that this will test _all_ alert mechanisms for the selected role.
126
127