Skip to content

Commit 469ea61

Browse files
committed
Add scripts used in examples
1 parent da4ab61 commit 469ea61

File tree

2 files changed

+56
-0
lines changed

2 files changed

+56
-0
lines changed

scripts/1-create-an-alert.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
curl -v -XPOST http://localhost:8080/alert \
3+
-H 'Authorization: Key demo-key' \
4+
-H 'Content-type: application/json' \
5+
-d '{
6+
"attributes": {
7+
"region": "EU"
8+
},
9+
"correlate": [
10+
"HttpServerError",
11+
"HttpServerOK"
12+
],
13+
"environment": "Production",
14+
"event": "HttpServerError",
15+
"group": "Web",
16+
"origin": "curl",
17+
"resource": "web01",
18+
"service": [
19+
"example.com"
20+
],
21+
"severity": "major",
22+
"tags": [
23+
"dc1"
24+
],
25+
"text": "Site is down.",
26+
"type": "exceptionAlert",
27+
"value": "Bad Gateway (501)"
28+
}'

scripts/2-create-an-alert.sh

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
2+
curl -v -XPOST http://localhost:8080/alert \
3+
-H 'Authorization: Key demo-key' \
4+
-H 'Content-type: application/json' \
5+
-d '{
6+
"attributes": {
7+
"region": "US"
8+
},
9+
"correlate": [
10+
"HttpServerError",
11+
"HttpServerOK"
12+
],
13+
"environment": "Production",
14+
"event": "HttpServerError",
15+
"group": "Web",
16+
"origin": "curl",
17+
"resource": "web02",
18+
"service": [
19+
"example.com"
20+
],
21+
"severity": "critical",
22+
"tags": [
23+
"dc2"
24+
],
25+
"text": "Site is down.",
26+
"type": "exceptionAlert",
27+
"value": "Internal Server Error (500)"
28+
}'

0 commit comments

Comments
 (0)