mirror of
https://github.com/prymitive/karma
synced 2026-05-05 03:16:51 +00:00
chore(mock): add mock files for 0.15.0 & 0.15.1
This commit is contained in:
2
Makefile
2
Makefile
@@ -2,7 +2,7 @@ NAME := unsee
|
||||
VERSION := $(shell git describe --tags --always --dirty='-dev')
|
||||
|
||||
# Alertmanager instance used when running locally, points to mock data
|
||||
MOCK_PATH := $(CURDIR)/internal/mock/0.14.0
|
||||
MOCK_PATH := $(CURDIR)/internal/mock/0.15.1
|
||||
ALERTMANAGER_URI := "file://$(MOCK_PATH)"
|
||||
# Listen port when running locally
|
||||
PORT := 8080
|
||||
|
||||
0
internal/mock/0.15.0/.ok
Normal file
0
internal/mock/0.15.0/.ok
Normal file
765
internal/mock/0.15.0/api/v1/alerts/groups
Normal file
765
internal/mock/0.15.0/api/v1/alerts/groups
Normal file
@@ -0,0 +1,765 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Less than 10% disk space is free",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "f87343c11c74a3f4",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Free_Disk_Space_Too_Low\"}",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"help": "Example help annotation",
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "54c2f185e49cfccb",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web1",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"3ad97217-8100-46fa-bef1-b79efdb62304"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5cb0dd95e7f3d9c0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"HTTP_Probe_Failed\"}",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d0aee2649e71388b",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server1",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "3bdb8b68bdce2ae0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "24e4121619386f95",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server3",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d9067fcc9686d942",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server4",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5f1306dab6671183",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "0967807e4073b606",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server6",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"042ea2db-c625-4210-86e5-51116414f290"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "44497481566cd3c7",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server7",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"042ea2db-c625-4210-86e5-51116414f290",
|
||||
"6d79cc47-7881-406f-97f2-3384dd95db40"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "af9d8f2f0ccb3970",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server8",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"042ea2db-c625-4210-86e5-51116414f290"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Memory usage exceeding threshold",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "7d0b114ebf24f857",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Memory_Usage_Too_High\"}",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Less than 10% disk space is free",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "f87343c11c74a3f4",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Free_Disk_Space_Too_Low\", cluster=\"staging\"}",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low",
|
||||
"cluster": "staging"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"help": "Example help annotation",
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "54c2f185e49cfccb",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web1",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"3ad97217-8100-46fa-bef1-b79efdb62304"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5cb0dd95e7f3d9c0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"HTTP_Probe_Failed\", cluster=\"dev\"}",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "44497481566cd3c7",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server7",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"042ea2db-c625-4210-86e5-51116414f290",
|
||||
"6d79cc47-7881-406f-97f2-3384dd95db40"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "af9d8f2f0ccb3970",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server8",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"042ea2db-c625-4210-86e5-51116414f290"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "0967807e4073b606",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server6",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"042ea2db-c625-4210-86e5-51116414f290"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"cluster",
|
||||
"service",
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\", cluster=\"dev\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "3bdb8b68bdce2ae0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d0aee2649e71388b",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server1",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"cluster",
|
||||
"service",
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\", cluster=\"prod\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "24e4121619386f95",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server3",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d9067fcc9686d942",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server4",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5f1306dab6671183",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\", cluster=\"staging\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Memory usage exceeding threshold",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "7d0b114ebf24f857",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:05:37.2739239Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Memory_Usage_Too_High\", cluster=\"prod\"}",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High",
|
||||
"cluster": "prod"
|
||||
}
|
||||
}
|
||||
],
|
||||
"status": "success"
|
||||
}
|
||||
64
internal/mock/0.15.0/api/v1/silences
Normal file
64
internal/mock/0.15.0/api/v1/silences
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"comment": "Silenced server7",
|
||||
"createdBy": "john@example.com",
|
||||
"endsAt": "2063-01-01T00:00:00Z",
|
||||
"id": "6d79cc47-7881-406f-97f2-3384dd95db40",
|
||||
"matchers": [
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "instance",
|
||||
"value": "server7"
|
||||
}
|
||||
],
|
||||
"startsAt": "2018-07-19T21:05:37.2703994Z",
|
||||
"status": {
|
||||
"state": "active"
|
||||
},
|
||||
"updatedAt": "2018-07-19T21:05:37.2704157Z"
|
||||
},
|
||||
{
|
||||
"comment": "Silenced instance",
|
||||
"createdBy": "john@example.com",
|
||||
"endsAt": "2063-01-01T00:00:00Z",
|
||||
"id": "3ad97217-8100-46fa-bef1-b79efdb62304",
|
||||
"matchers": [
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "instance",
|
||||
"value": "web1"
|
||||
}
|
||||
],
|
||||
"startsAt": "2018-07-19T21:05:37.2641482Z",
|
||||
"status": {
|
||||
"state": "active"
|
||||
},
|
||||
"updatedAt": "2018-07-19T21:05:37.2641609Z"
|
||||
},
|
||||
{
|
||||
"comment": "Silenced Host_Down alerts in the dev cluster",
|
||||
"createdBy": "john@example.com",
|
||||
"endsAt": "2063-01-01T00:00:00Z",
|
||||
"id": "042ea2db-c625-4210-86e5-51116414f290",
|
||||
"matchers": [
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "alertname",
|
||||
"value": "Host_Down"
|
||||
},
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "cluster",
|
||||
"value": "dev"
|
||||
}
|
||||
],
|
||||
"startsAt": "2018-07-19T21:05:37.2673937Z",
|
||||
"status": {
|
||||
"state": "active"
|
||||
},
|
||||
"updatedAt": "2018-07-19T21:05:37.2674058Z"
|
||||
}
|
||||
],
|
||||
"status": "success"
|
||||
}
|
||||
110
internal/mock/0.15.0/api/v1/status
Normal file
110
internal/mock/0.15.0/api/v1/status
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"data": {
|
||||
"clusterStatus": {
|
||||
"name": "01CJT5S3PV6798FHGNW52B90NE",
|
||||
"peers": [
|
||||
{
|
||||
"address": "172.17.0.2:9094",
|
||||
"name": "01CJT5S3PV6798FHGNW52B90NE"
|
||||
}
|
||||
],
|
||||
"status": "ready"
|
||||
},
|
||||
"configJSON": {
|
||||
"global": {
|
||||
"hipchat_api_url": "https://api.hipchat.com/",
|
||||
"http_config": {
|
||||
"BasicAuth": null,
|
||||
"BearerToken": "",
|
||||
"BearerTokenFile": "",
|
||||
"ProxyURL": {},
|
||||
"TLSConfig": {
|
||||
"CAFile": "",
|
||||
"CertFile": "",
|
||||
"InsecureSkipVerify": false,
|
||||
"KeyFile": "",
|
||||
"ServerName": ""
|
||||
}
|
||||
},
|
||||
"opsgenie_api_url": "https://api.opsgenie.com/",
|
||||
"pagerduty_url": "https://events.pagerduty.com/v2/enqueue",
|
||||
"resolve_timeout": 300000000000,
|
||||
"smtp_hello": "localhost",
|
||||
"smtp_require_tls": true,
|
||||
"victorops_api_url": "https://alert.victorops.com/integrations/generic/20131114/alert/",
|
||||
"wechat_api_url": "https://qyapi.weixin.qq.com/cgi-bin/"
|
||||
},
|
||||
"inhibit_rules": [
|
||||
{
|
||||
"equal": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"source_match": {
|
||||
"severity": "critical"
|
||||
},
|
||||
"target_match": {
|
||||
"severity": "warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"receivers": [
|
||||
{
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"name": "by-cluster-service"
|
||||
},
|
||||
{
|
||||
"name": "by-name"
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"group_by": [
|
||||
"alertname"
|
||||
],
|
||||
"group_interval": 35000000000,
|
||||
"group_wait": 15000000000,
|
||||
"receiver": "default",
|
||||
"repeat_interval": 3596400000000000,
|
||||
"routes": [
|
||||
{
|
||||
"continue": true,
|
||||
"group_by": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"match_re": {
|
||||
"alertname": "^(?:.*)$"
|
||||
},
|
||||
"receiver": "by-cluster-service"
|
||||
},
|
||||
{
|
||||
"continue": true,
|
||||
"group_by": [
|
||||
"alertname"
|
||||
],
|
||||
"match_re": {
|
||||
"alertname": "^(?:.*)$"
|
||||
},
|
||||
"receiver": "by-name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"templates": null
|
||||
},
|
||||
"configYAML": "global:\n resolve_timeout: 5m\n http_config: {}\n smtp_hello: localhost\n smtp_require_tls: true\n pagerduty_url: https://events.pagerduty.com/v2/enqueue\n hipchat_api_url: https://api.hipchat.com/\n opsgenie_api_url: https://api.opsgenie.com/\n wechat_api_url: https://qyapi.weixin.qq.com/cgi-bin/\n victorops_api_url: https://alert.victorops.com/integrations/generic/20131114/alert/\nroute:\n receiver: default\n group_by:\n - alertname\n routes:\n - receiver: by-cluster-service\n group_by:\n - alertname\n - cluster\n - service\n match_re:\n alertname: ^(?:.*)$\n continue: true\n - receiver: by-name\n group_by:\n - alertname\n match_re:\n alertname: ^(?:.*)$\n continue: true\n group_wait: 15s\n group_interval: 35s\n repeat_interval: 999h\ninhibit_rules:\n- source_match:\n severity: critical\n target_match:\n severity: warning\n equal:\n - alertname\n - cluster\n - service\nreceivers:\n- name: default\n- name: by-cluster-service\n- name: by-name\ntemplates: []\n",
|
||||
"uptime": "2018-07-19T21:05:22.1422179Z",
|
||||
"versionInfo": {
|
||||
"branch": "HEAD",
|
||||
"buildDate": "20180622-11:58:41",
|
||||
"buildUser": "root@bec9939eb862",
|
||||
"goVersion": "go1.10.3",
|
||||
"revision": "462c969d85cf1a473587754d55e4a3c4a2abc63c",
|
||||
"version": "0.15.0"
|
||||
}
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
0
internal/mock/0.15.1/.ok
Normal file
0
internal/mock/0.15.1/.ok
Normal file
765
internal/mock/0.15.1/api/v1/alerts/groups
Normal file
765
internal/mock/0.15.1/api/v1/alerts/groups
Normal file
@@ -0,0 +1,765 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Less than 10% disk space is free",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "f87343c11c74a3f4",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Free_Disk_Space_Too_Low\"}",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"help": "Example help annotation",
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "54c2f185e49cfccb",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web1",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"d1487fc4-bff7-4ad8-9f80-99ce2b3a73a1"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5cb0dd95e7f3d9c0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"HTTP_Probe_Failed\"}",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "24e4121619386f95",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server3",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d9067fcc9686d942",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server4",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5f1306dab6671183",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "0967807e4073b606",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server6",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"9ba82d53-825c-4d92-9c03-570368be09d9"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "44497481566cd3c7",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server7",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"9ba82d53-825c-4d92-9c03-570368be09d9",
|
||||
"03fca656-dc3b-4cb5-adda-9a1893af90ac"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "af9d8f2f0ccb3970",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server8",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"9ba82d53-825c-4d92-9c03-570368be09d9"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d0aee2649e71388b",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server1",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "3bdb8b68bdce2ae0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Memory usage exceeding threshold",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "7d0b114ebf24f857",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-name",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Memory_Usage_Too_High\"}",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Less than 10% disk space is free",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "f87343c11c74a3f4",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"cluster",
|
||||
"service",
|
||||
"alertname"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Free_Disk_Space_Too_Low\", cluster=\"staging\"}",
|
||||
"labels": {
|
||||
"alertname": "Free_Disk_Space_Too_Low",
|
||||
"cluster": "staging"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"help": "Example help annotation",
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "54c2f185e49cfccb",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web1",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"d1487fc4-bff7-4ad8-9f80-99ce2b3a73a1"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5cb0dd95e7f3d9c0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev",
|
||||
"instance": "web2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"HTTP_Probe_Failed\", cluster=\"dev\"}",
|
||||
"labels": {
|
||||
"alertname": "HTTP_Probe_Failed",
|
||||
"cluster": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "0967807e4073b606",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server6",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"9ba82d53-825c-4d92-9c03-570368be09d9"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "44497481566cd3c7",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server7",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"9ba82d53-825c-4d92-9c03-570368be09d9",
|
||||
"03fca656-dc3b-4cb5-adda-9a1893af90ac"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "af9d8f2f0ccb3970",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev",
|
||||
"instance": "server8",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": null,
|
||||
"silencedBy": [
|
||||
"9ba82d53-825c-4d92-9c03-570368be09d9"
|
||||
],
|
||||
"state": "suppressed"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\", cluster=\"dev\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "dev"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary",
|
||||
"url": "http://localhost/example.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d0aee2649e71388b",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server1",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "3bdb8b68bdce2ae0",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\", cluster=\"prod\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "prod"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "24e4121619386f95",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server3",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "d9067fcc9686d942",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server4",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
},
|
||||
{
|
||||
"annotations": {
|
||||
"summary": "Example summary"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "5f1306dab6671183",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging",
|
||||
"instance": "server5",
|
||||
"job": "node_ping"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Host_Down\", cluster=\"staging\"}",
|
||||
"labels": {
|
||||
"alertname": "Host_Down",
|
||||
"cluster": "staging"
|
||||
}
|
||||
},
|
||||
{
|
||||
"blocks": [
|
||||
{
|
||||
"alerts": [
|
||||
{
|
||||
"annotations": {
|
||||
"alert": "Memory usage exceeding threshold",
|
||||
"dashboard": "http://localhost/dashboard.html"
|
||||
},
|
||||
"endsAt": "0001-01-01T00:00:00Z",
|
||||
"fingerprint": "7d0b114ebf24f857",
|
||||
"generatorURL": "localhost/prometheus",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High",
|
||||
"cluster": "prod",
|
||||
"instance": "server2",
|
||||
"job": "node_exporter"
|
||||
},
|
||||
"receivers": null,
|
||||
"startsAt": "2018-07-19T21:06:46.9659343Z",
|
||||
"status": {
|
||||
"inhibitedBy": [],
|
||||
"silencedBy": [],
|
||||
"state": "active"
|
||||
}
|
||||
}
|
||||
],
|
||||
"routeOpts": {
|
||||
"groupBy": [
|
||||
"service",
|
||||
"alertname",
|
||||
"cluster"
|
||||
],
|
||||
"groupInterval": 35000000000,
|
||||
"groupWait": 15000000000,
|
||||
"receiver": "by-cluster-service",
|
||||
"repeatInterval": 3596400000000000
|
||||
}
|
||||
}
|
||||
],
|
||||
"groupKey": "{}/{alertname=~\"^(?:.*)$\"}:{alertname=\"Memory_Usage_Too_High\", cluster=\"prod\"}",
|
||||
"labels": {
|
||||
"alertname": "Memory_Usage_Too_High",
|
||||
"cluster": "prod"
|
||||
}
|
||||
}
|
||||
],
|
||||
"status": "success"
|
||||
}
|
||||
64
internal/mock/0.15.1/api/v1/silences
Normal file
64
internal/mock/0.15.1/api/v1/silences
Normal file
@@ -0,0 +1,64 @@
|
||||
{
|
||||
"data": [
|
||||
{
|
||||
"comment": "Silenced instance",
|
||||
"createdBy": "john@example.com",
|
||||
"endsAt": "2063-01-01T00:00:00Z",
|
||||
"id": "d1487fc4-bff7-4ad8-9f80-99ce2b3a73a1",
|
||||
"matchers": [
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "instance",
|
||||
"value": "web1"
|
||||
}
|
||||
],
|
||||
"startsAt": "2018-07-19T21:06:46.9561055Z",
|
||||
"status": {
|
||||
"state": "active"
|
||||
},
|
||||
"updatedAt": "2018-07-19T21:06:46.9561819Z"
|
||||
},
|
||||
{
|
||||
"comment": "Silenced Host_Down alerts in the dev cluster",
|
||||
"createdBy": "john@example.com",
|
||||
"endsAt": "2063-01-01T00:00:00Z",
|
||||
"id": "9ba82d53-825c-4d92-9c03-570368be09d9",
|
||||
"matchers": [
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "alertname",
|
||||
"value": "Host_Down"
|
||||
},
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "cluster",
|
||||
"value": "dev"
|
||||
}
|
||||
],
|
||||
"startsAt": "2018-07-19T21:06:46.9594753Z",
|
||||
"status": {
|
||||
"state": "active"
|
||||
},
|
||||
"updatedAt": "2018-07-19T21:06:46.9594876Z"
|
||||
},
|
||||
{
|
||||
"comment": "Silenced server7",
|
||||
"createdBy": "john@example.com",
|
||||
"endsAt": "2063-01-01T00:00:00Z",
|
||||
"id": "03fca656-dc3b-4cb5-adda-9a1893af90ac",
|
||||
"matchers": [
|
||||
{
|
||||
"isRegex": false,
|
||||
"name": "instance",
|
||||
"value": "server7"
|
||||
}
|
||||
],
|
||||
"startsAt": "2018-07-19T21:06:46.9624246Z",
|
||||
"status": {
|
||||
"state": "active"
|
||||
},
|
||||
"updatedAt": "2018-07-19T21:06:46.9624375Z"
|
||||
}
|
||||
],
|
||||
"status": "success"
|
||||
}
|
||||
110
internal/mock/0.15.1/api/v1/status
Normal file
110
internal/mock/0.15.1/api/v1/status
Normal file
@@ -0,0 +1,110 @@
|
||||
{
|
||||
"data": {
|
||||
"clusterStatus": {
|
||||
"name": "01CJT5V7RNNYAYDW8Z3VVT4EPP",
|
||||
"peers": [
|
||||
{
|
||||
"address": "172.17.0.2:9094",
|
||||
"name": "01CJT5V7RNNYAYDW8Z3VVT4EPP"
|
||||
}
|
||||
],
|
||||
"status": "ready"
|
||||
},
|
||||
"configJSON": {
|
||||
"global": {
|
||||
"hipchat_api_url": "https://api.hipchat.com/",
|
||||
"http_config": {
|
||||
"BasicAuth": null,
|
||||
"BearerToken": "",
|
||||
"BearerTokenFile": "",
|
||||
"ProxyURL": {},
|
||||
"TLSConfig": {
|
||||
"CAFile": "",
|
||||
"CertFile": "",
|
||||
"InsecureSkipVerify": false,
|
||||
"KeyFile": "",
|
||||
"ServerName": ""
|
||||
}
|
||||
},
|
||||
"opsgenie_api_url": "https://api.opsgenie.com/",
|
||||
"pagerduty_url": "https://events.pagerduty.com/v2/enqueue",
|
||||
"resolve_timeout": 300000000000,
|
||||
"smtp_hello": "localhost",
|
||||
"smtp_require_tls": true,
|
||||
"victorops_api_url": "https://alert.victorops.com/integrations/generic/20131114/alert/",
|
||||
"wechat_api_url": "https://qyapi.weixin.qq.com/cgi-bin/"
|
||||
},
|
||||
"inhibit_rules": [
|
||||
{
|
||||
"equal": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"source_match": {
|
||||
"severity": "critical"
|
||||
},
|
||||
"target_match": {
|
||||
"severity": "warning"
|
||||
}
|
||||
}
|
||||
],
|
||||
"receivers": [
|
||||
{
|
||||
"name": "default"
|
||||
},
|
||||
{
|
||||
"name": "by-cluster-service"
|
||||
},
|
||||
{
|
||||
"name": "by-name"
|
||||
}
|
||||
],
|
||||
"route": {
|
||||
"group_by": [
|
||||
"alertname"
|
||||
],
|
||||
"group_interval": 35000000000,
|
||||
"group_wait": 15000000000,
|
||||
"receiver": "default",
|
||||
"repeat_interval": 3596400000000000,
|
||||
"routes": [
|
||||
{
|
||||
"continue": true,
|
||||
"group_by": [
|
||||
"alertname",
|
||||
"cluster",
|
||||
"service"
|
||||
],
|
||||
"match_re": {
|
||||
"alertname": "^(?:.*)$"
|
||||
},
|
||||
"receiver": "by-cluster-service"
|
||||
},
|
||||
{
|
||||
"continue": true,
|
||||
"group_by": [
|
||||
"alertname"
|
||||
],
|
||||
"match_re": {
|
||||
"alertname": "^(?:.*)$"
|
||||
},
|
||||
"receiver": "by-name"
|
||||
}
|
||||
]
|
||||
},
|
||||
"templates": null
|
||||
},
|
||||
"configYAML": "global:\n resolve_timeout: 5m\n http_config: {}\n smtp_hello: localhost\n smtp_require_tls: true\n pagerduty_url: https://events.pagerduty.com/v2/enqueue\n hipchat_api_url: https://api.hipchat.com/\n opsgenie_api_url: https://api.opsgenie.com/\n wechat_api_url: https://qyapi.weixin.qq.com/cgi-bin/\n victorops_api_url: https://alert.victorops.com/integrations/generic/20131114/alert/\nroute:\n receiver: default\n group_by:\n - alertname\n routes:\n - receiver: by-cluster-service\n group_by:\n - alertname\n - cluster\n - service\n match_re:\n alertname: ^(?:.*)$\n continue: true\n - receiver: by-name\n group_by:\n - alertname\n match_re:\n alertname: ^(?:.*)$\n continue: true\n group_wait: 15s\n group_interval: 35s\n repeat_interval: 999h\ninhibit_rules:\n- source_match:\n severity: critical\n target_match:\n severity: warning\n equal:\n - alertname\n - cluster\n - service\nreceivers:\n- name: default\n- name: by-cluster-service\n- name: by-name\ntemplates: []\n",
|
||||
"uptime": "2018-07-19T21:06:31.8325528Z",
|
||||
"versionInfo": {
|
||||
"branch": "HEAD",
|
||||
"buildDate": "20180712-18:25:27",
|
||||
"buildUser": "root@efde7f9485ae",
|
||||
"goVersion": "go1.10.3",
|
||||
"revision": "8397de1830f154535a31150f9262da0072d8725d",
|
||||
"version": "0.15.1"
|
||||
}
|
||||
},
|
||||
"status": "success"
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
DOCKER_NAME := alertmanager-unsee-mock
|
||||
DOCKER_IMAGE := prom/alertmanager
|
||||
DOCKER_ARGS := --name $(DOCKER_NAME) --rm -d -p 9093:9093 -v $(CURDIR)/alertmanager.yml:/etc/alertmanager/config.yml
|
||||
DOCKER_ARGS := --name $(DOCKER_NAME) --rm -d -p 9093:9093 \
|
||||
-v $(CURDIR)/alertmanager.yml:/etc/alertmanager/config.yml \
|
||||
-v $(CURDIR)/alertmanager.yml:/etc/alertmanager/alertmanager.yml
|
||||
|
||||
# list of Alertmanager versions to generate mock files for
|
||||
VERSIONS := 0.4.0 0.4.1 0.4.2 0.5.0 0.5.1 0.6.0 0.6.2 0.7.0 0.7.1 0.8.0 0.9.0 0.9.1 0.10.0 0.11.0 0.12.0 0.13.0 0.14.0 0.15.0 0.15.1
|
||||
|
||||
Reference in New Issue
Block a user