-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalertd.sample.json
51 lines (47 loc) · 1.48 KB
/
alertd.sample.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
{
"#": "keys starting with # are comments",
"data_sources": [
{
"type": "graphite",
"url": "https://USER:PASSWORD@host/path/"
},
{
"type": "graphite",
"#": "The name is optional and defaults to type.",
"name": "graphite2",
"url": "https://USER:PASSWORD@host/path/"
}
],
"notification_channels": [
{
"name": "mailto",
"#": "The following environment variables are available NAME, SUBJECT, MESSAGE, DATA_SOURCE, QUERY, THRESHOLD, SERIE, and VALUE.",
"#": "RECIPIENT is configured per subscription",
"#": "MESSAGE is also piped via stdin",
"command": "mail -s \"$SUBJECT\" \"$RECIPIENT\""
},
{
"name": "slack",
"command": "curl -fsS --header 'Content-type: application/json' --data \"{\\\"text\\\": \\\"$MESSAGE\\\"}\" \"$RECIPIENT\""
}
],
"#": "The subject and message templates.",
"#": "All variables except for SUBJECT, MESSAGE, and RECIPIENT are available.",
"subject_template": "$NAME check failed for $SERIE",
"message_template": "$SUBJECT: value $VALUE > threshold $THRESHOLD.\n$DATA_SOURCE: $QUERY\n",
"#": "stdout_stderr with level info is default",
"#logger": {
"destination": "stdout_stderr",
},
"#logger": {
"destination": "file",
"path": "alertd.log",
"#": "level can be diagnostic, info, warn, error, critical, or fatal",
"level": "diagnostic",
},
"#logger": {
"destination": "syslog",
"facility": "user",
"level": "warn"
}
}