Skip to content

feat: Allow alerts to be filtered by given domain

Can Eldem requested to merge filter-by-monitoring-tool into master

What does this MR do?

We would like existing grapql end point to serve two different domains. MR adds a field called :domain and filter that according to different domain that are diverging. (For now divergence is only in UI).

  • One UI will show alerts that are only coming from K8 agent
  • Other UI will show all alerts with

For Threat management domain we will have following query

{
  ...
  domain: 'threat_management'
  ..
}

This will filter alerts that threat_management is going to be working on. For other alerts we will use

{
  ...
  domain: 'operations'
  .... 
}

Related issues

Database Query

SELECT "alert_management_alerts".* FROM "alert_management_alerts" WHERE "alert_management_alerts"."domain" = 0

#replica prod db
 Planning Time: 36.828 ms
 Execution Time: 458.889 ms

https://explain.depesz.com/s/phqy

SELECT "alert_management_alerts".* FROM "alert_management_alerts" WHERE "alert_management_alerts"."domain" = 1

#replica prod db
Planning Time: 0.103 ms
Execution Time: 1.875 ms

https://explain.depesz.com/s/tEbk

Conformity

Edited by Peter Leitzen

Merge request reports

Loading