prometheus / prometheus/alertmanager
I can get the attribute 'updateAt from Alartmanager API api/v2/alerts but no this from webhook
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 8.6k
- Forks
- 2.5k
- Avg merge
- 2d 6h
- Merged PRs (30d)
- 61
Description
question
I can get the attribute 'updateAt from Alartmanager API api/v2/alerts but no this from webhook。
Raw data as below:
json.loads(request.data)
Clould you please share some ideas?
VERSION V0.20.0
json.loads(request.data)
< class 'dict' >: {
'receiver': 'webhook',
'status': 'firing',
'alerts': [{
'status': 'firing',
'labels': {
'Node': 'instance',
'alertname': '节点状态',
'instance': 'localhost:9100',
'job': 'node-export',
'severity': 'Critical'
},
'annotations': {
'description': '当前服务器可能已经宕机,请及时排查问题',
'summary': '服务器故障',
'value': '0'
},
'startsAt': '2019-12-17T11:56:20.873303345Z',
'endsAt': '0001-01-01T00:00:00Z',
'generatorURL': 'http://prometheus:9090/graph?g0.expr=up%7Bjob%3D%22node-export%22%7D+%3D%3D+0&g0.tab=1',
'fingerprint': '24eccb8d84d71e24'
}],
'groupLabels': {},
'commonLabels': {
'Node': 'instance',
'alertname': '节点状态',
'instance': 'localhost:9100',
'job': 'node-export',
'severity': 'Critical'
},
'commonAnnotations': {
'description': '当前服务器可能已经宕机,请及时排查问题',
'summary': '服务器故障',
'value': '0'
},
'externalURL': 'http://alertmanager:9093',
'version': '4',
'groupKey': '{}:{}'
}
GET http://localhost:9093/api/v2/alerts
"annotations":{
"description": "当前服务器可能已经宕机,请及时排查问题",
"summary": "服务器故障",
"value": "0"
},
"endsAt": "2019-12-17T12:03:05.873Z",
"fingerprint": "24eccb8d84d71e24",
"receivers":[
{
"name": "webhook"
}
],
"startsAt": "2019-12-17T11:56:20.873Z",
"status":{
"inhibitedBy":[],
"silencedBy":[],
"state": "active"
},
"updatedAt": "2019-12-17T12:00:05.875Z",
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No source file, test, or entry point is named. Start by comparing the Alertmanager v2 alert response with the webhook payload and the webhook/API documentation; done means establishing whether updatedAt is intentionally absent or defining a documented, tested behavior for it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- api, observability-sre
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100