# prometheus --version
prometheus, version 2.10.0 (branch: HEAD, revision: d20e84d0fb64aff2f62a977adc8cfb656da4e286)
build user: root@a49185acd9b0
build date: 20190525-12:28:13
go version: go1.12.5
# alertmanager --version
alertmanager, version 0.17.0 (branch: HEAD, revision: c7551cd75c414dc81df027f691e2eb21d4fd85b2)
build user: root@932a86a52b76
build date: 20190503-09:10:07
go version: go1.12.4instance:
- host1
- host2
- host3
alert_type:
- basic services:
- nginx
- db
- squidresolve_timeout: 2mgroup_wait: 10s
group_interval: 1m
restart_interval: 5msend_resolved: true10:29 killed nginx
10:30 prometheus: notices nginx
10:32 nginx: pending -> firing
10:33 alert pushed to slack [why 1m instead of 10s?]
10:39 alert repeated to slack [why 6m instead of 5m?]
10:45 alert repeated to slack [why 6m instead of 5m?]
10:45 killed squid
10:46 prometheus: notices squid
10:48 squid: pending -> firing
10:49 new_alert pushed to slack (because of added new entry: squid to group)
10:50 started nginx and squid
10:50 prometheus: notices nginx and squid
10:50 resolved event sent to slack [expected at 10:52, because of resolve_timeout: 2m, why did I get the resolve right away?]11:26 killed nginx
11:26 prometheus: notices nginx
11:28 nginx: pending -> firing
11:29 alert pushed to webhook [why 1m? group_wait is 10s]
11:30 alert repeated to webhook [why 1m? repeat_interval is 5m]
11:31 alert repeated to webhook [why 1m? repeat_interval is 5m]
11:31 killed squid
11:32 alert repeated to webhook11:32 prometheus: notices squid
11:33 alert repeated to webhook
11:34 alert repeated to webhook
11:34 squid: pending -> firing
11:35 new_alert pushed to webhook (because of added new entry: squid to group)
11:35 started nginx and squid
11:36 prometheus: notices nginx and squid
11:36 new_alert repeated to webhook
11:45 sooooooo wheres the fucking resolved notification?scrape_interval: 60s
evaluation_interval: 60sfor: 2mgroup_wait: 10s
group_interval: 1m
restart_interval: 5m09:10: http killed
09:12 `curl -s http://localhost:9093/api/v1/alerts | jq .` :
{
"labels": {
"alert": "http",
"instance": "host1",
"severity": "warning",
},
"startsAt": "2019-06-21T09:12:20.867457637Z",
"endsAt": "2019-06-21T09:15:20.867457637Z",
"status": {
"state": "active",
"silencedBy": [],
"inhibitedBy": []
},
"receivers": [
"API"
],
"fingerprint": "dfd5398a6c326632"
},
09:15: `curl -s http://localhost:9093/api/v1/alerts | jq .` :
{
"labels": {
"alert": "http",
"instance": "host1",
"severity": "warning",
},
"startsAt": "2019-06-21T09:12:20.867457637Z",
"endsAt": "2019-06-21T09:17:20.867457637Z",
"status": {
"state": "active",
"silencedBy": [],
"inhibitedBy": []
},
"receivers": [
"API"
],
"fingerprint": "dfd5398a6c326632"
},
09:16: http started # tail -f /var/log/syslog | grep host1
Jun 21 11:12:31 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][active]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:12:31.006808898Z"}
Jun 21 11:13:31 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][active]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:13:31.007241701Z"}
Jun 21 11:14:31 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][active]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:14:31.008633924Z"}
Jun 21 11:15:31 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][active]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:15:31.009031847Z"}
Jun 21 11:16:31 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:16:31.009444342Z"}
Jun 21 11:18:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:18:20.999826613Z"}
Jun 21 11:20:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:20:20.998772723Z"}
Jun 21 11:22:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:22:21.008138495Z"}
Jun 21 11:24:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:24:21.003222682Z"}
Jun 21 11:26:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:26:20.99797136Z"}
Jun 21 11:28:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:28:21.003219098Z"}
Jun 21 11:30:21 prom1 alertmanager[46160]: {"aggrGroup":"{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}","alerts":"[HTTP Down[dfd5398][resolved]]","caller":"dispatch.go:430","component":"dispatcher","level":"debug","msg":"flushing","ts":"2019-06-21T09:30:20.998402894Z"}{
"receiver": "API",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"annotations": {
"summary": "HTTP is down"
},
"startsAt": "2019-06-21T09:12:20.867457637Z",
"endsAt": "0001-01-01T00:00:00Z"
}
],
"groupLabels": {
"alert": "http",
"instance": "host1"
},
"commonLabels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"commonAnnotations": {
"summary": "HTTP is down"
},
"version": "4",
"groupKey": "{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}"
}
127.0.0.1 - - [21/Jun/2019 09:13:31] "POST / HTTP/1.1" 200 -
{
"receiver": "API",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"annotations": {
"summary": "HTTP is down"
},
"startsAt": "2019-06-21T09:12:20.867457637Z",
"endsAt": "0001-01-01T00:00:00Z"
}
],
"groupLabels": {
"alert": "http",
"instance": "host1"
},
"commonLabels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"commonAnnotations": {
"summary": "HTTP is down"
},
"version": "4",
"groupKey": "{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}"
}
127.0.0.1 - - [21/Jun/2019 09:14:31] "POST / HTTP/1.1" 200 -
{
"receiver": "API",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"annotations": {
"summary": "HTTP is down"
},
"startsAt": "2019-06-21T09:12:20.867457637Z",
"endsAt": "0001-01-01T00:00:00Z"
}
],
"groupLabels": {
"alert": "http",
"instance": "host1"
},
"commonLabels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"commonAnnotations": {
"summary": "HTTP is down"
},
"version": "4",
"groupKey": "{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}"
}
127.0.0.1 - - [21/Jun/2019 09:15:31] "POST / HTTP/1.1" 200 -
{
"receiver": "API",
"status": "firing",
"alerts": [
{
"status": "firing",
"labels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"annotations": {
"summary": "HTTP is down"
},
"startsAt": "2019-06-21T09:12:20.867457637Z",
"endsAt": "0001-01-01T00:00:00Z"
}
],
"groupLabels": {
"alert": "http",
"instance": "host1"
},
"commonLabels": {
"alert": "http",
"alertname": "HTTP Down",
"instance": "host1",
"severity": "warning"
},
"commonAnnotations": {
"summary": "HTTP is down"
},
"version": "4",
"groupKey": "{}/{instance=~\"^(?:host1)$\"}:{alert=\"http\", instance=\"host1\"}"
}
127.0.0.1 - - [21/Jun/2019 09:16:31] "POST / HTTP/1.1" 200 -11:16:31.002369 IP 127.0.0.1.38005 > 127.0.0.1.40414: Flags [P.], seq 1:18, ack 1237, win 1365, options [nop,nop,TS val 757657828 ecr 757657828], length 17
0x0000: 0000 0304 0006 0000 0000 0000 0000 0800 ................
0x0010: 4500 0045 3e1b 4000 4006 fe95 7f00 0001 E..E>.@.@.......
0x0020: 7f00 0001 9475 9dde 9f35 885b 1057 bdbc .....u...5.[.W..
0x0030: 8018 0555 fe39 0000 0101 080a 2d28 f0e4 ...U.9......-(..
0x0040: 2d28 f0e4 4854 5450 2f31 2e30 2032 3030 -(..HTTP/1.0.200
0x0050: 204f 4b0d 0a .OK..