Skip to content

Commit

Permalink
chore: Separate json from curl example
Browse files Browse the repository at this point in the history
Separate the sample alertmanager payload into
it's own file which could also be reused for mocking
data in tests
  • Loading branch information
mr-karan committed Jan 16, 2019
1 parent 3d37317 commit d7f70a9
Show file tree
Hide file tree
Showing 2 changed files with 215 additions and 216 deletions.
214 changes: 214 additions & 0 deletions examples/mock_payload.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,214 @@
{
"receiver": "team-awesome-mails",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.3:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.4:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.5:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.6:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.7:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.8:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.9:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.127:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.110:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.95:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.56:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.74:9100",
"job": "node",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
},
{
"status": "firing",
"labels": {
"alertname": "Instance Down",
"instance": "10.1.2.38:9100",
"job": "prometheus",
"severity": "critical"
},
"annotations": {
"summary": "Server is down"
},
"startsAt": "2018-12-26T15:16:59.2253602+05:30",
"endsAt": "0001-01-01T00:00:00Z",
"generatorURL": "http://localhost:5000/prometheus/graph?g0.expr=up+%3D%3D+0\u0026g0.tab=1"
}
],
"groupLabels": {
"alertname": "Instance Down"
},
"commonLabels": {
"alertname": "Instance Down",
"severity": "critical"
},
"commonAnnotations": {
"summary": "Server is down"
},
"externalURL": "http://ip-10-3-1-2:8093",
"version": "4",
"groupKey": "{}:{alertname=\"Instance Down\"}"
}

0 comments on commit d7f70a9

Please sign in to comment.