Andreas
03/06/2023, 1:56 PMAmol Umbark
03/06/2023, 3:40 PMAmol Umbark
03/07/2023, 5:41 AMAmol Umbark
03/07/2023, 7:10 AMSELECT
count() AS value,
toStartOfInterval(timestamp, toIntervalMinute(1)) AS interval,
serviceName,
exceptionMessage,
exceptionType
FROM signoz_traces.distributed_signoz_error_index_v2
WHERE timestamp BETWEEN {{.start_datetime}} AND {{.end_datetime}}
GROUP BY
serviceName,
interval,
exceptionMessage,
exceptionType
LIMIT 100
Use the same conditions in the attached screenshot.
You would see the following kind of webhook message.
{
"status": "firing",
"labels": {
"additionalInfo": "The rule threshold is set to 0.0000, and the observed metric value is 2.",
"alertname": "testexceptions_TEST_ALERT",
"details": "http://<signoz-url>/exceptions",
"exceptionMessage": "HTTPSConnectionPool(host='xxx', port=443): Max retries exceeded with url: /v3/xxxxx (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x10f8970d0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))",
"exceptionType": "ConnectionError",
"ruleId": "testexceptions",
"ruleSource": "http://<sgnoz-url>/alerts/edit?ruleId=testexceptions",
"serviceName": "flaskApp",
"severity": "warning"
},
"startsAt": "2023-03-07T06:52:49.022196837Z",
"endsAt": "2023-03-07T06:56:49.022196837Z",
"fingerprint": "221f269939452105"
},
The messages may be repeated as rules engine same message with "firing" and then "resolved" status. In your case, the status wouldnt be useful. I would recommend just looking at "firing" status. Also use the fingerprint in the message to identify if this is a new record or an older one.
As you can see the exceptionType, exceptionMessage will show up in label section of the message.
Do share your use case, so I can help you further