mirror of
https://github.com/EZ-Api/ez-api.git
synced 2026-01-13 17:47:51 +00:00
feat(api): add internal alerts reporting endpoint with deduplication
Add ReportAlerts endpoint for Data Plane to report alerts to Control Plane with fingerprint-based deduplication using a 5-minute cooldown period. Changes: - Add POST /internal/alerts/report endpoint with validation - Add Fingerprint field to Alert model for deduplication - Extend GetAPIKeyStatsSummary with optional time range filtering using since/until query parameters to query from log records
This commit is contained in:
@@ -300,6 +300,7 @@ func main() {
|
||||
{
|
||||
internalGroup.POST("/stats/flush", internalHandler.FlushStats)
|
||||
internalGroup.POST("/apikey-stats/flush", internalHandler.FlushAPIKeyStats)
|
||||
internalGroup.POST("/alerts/report", internalHandler.ReportAlerts)
|
||||
internalGroup.GET("/metrics", gin.WrapH(expvar.Handler()))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user