-
Bug
-
Resolution: Done
-
Normal
-
Logging 5.8.z, Logging 5.9.z, Logging 6.0.z
-
Incidents & Support
-
1
-
True
-
-
False
-
NEW
-
VERIFIED
-
-
Bug Fix
-
-
-
Logging - Sprint 275
Description of problem:
When Loki Alerts are created for an application namespace, the Firing alert is visible under other application projects as well on dev-console.
AlertingRule is created under my-app namespace.
$ oc get alertingrule my-app-alert -n my-app -o json { "apiVersion": "loki.grafana.com/v1", "kind": "AlertingRule", "metadata": { "creationTimestamp": "2024-09-24T11:59:20Z", "generation": 1, "labels": { "openshift.io/cluster-monitoring": "true" }, "name": "my-app-alert", "namespace": "my-app", "resourceVersion": "135615", "uid": "bb3d6456-e94e-46c2-b56f-5e7cebfb6be8" }, "spec": { "groups": [ { "interval": "1m", "name": "MyApplication", "rules": [ { "alert": "MyAppLogVolumeIsHigh", "annotations": { "description": "My app has high amount of logs.", "summary": "project \"my-app\" log volume is high." }, "expr": "count_over_time({kubernetes_namespace_name=\"my-app\"}[2m]) \u003e 10\n", "for": "5m", "labels": { "project": "my-app", "severity": "info" } } ] } ], "tenantID": "application" } }
No AlertingRule is present under user-app namespace
$ oc get alertingrule -n user-app No resources found in user-app namespace.
Request URL:
https://console-openshift-console.apps.kbhartiaws1.qe.devcluster.openshift.com/api/proxy/plugin/logging-view-plugin/backend/api/logs/v1/application/prometheus/api/v1/rules?kubernetes_namespace_name=user-app
https://console-openshift-console.apps.kbhartiaws1.qe.devcluster.openshift.com/api/proxy/plugin/logging-view-plugin/backend/api/logs/v1/application/prometheus/api/v1/rules?kubernetes_namespace_name=my-app
Both the above URL return the exact same response. Response is attached for the above URL's
Version-Release number of selected component (if applicable):
Logging 5.8.z, Logging 5.9.z, Logging 6.0.0
How reproducible: Always
Steps to Reproduce:
- Deploy CLO and LO
- Create an application (e.g my-app) and create a corresponding Loki log alerting rule for the namespace.
- Create another application namespace (e.g. user-app) but without an alertingrule.
- Check ruler logs
- Migrate to dev-console.
- Verify that the firing alert is being shown under both my-app and user-app namespace/project even though the alert is only defined for my-app namespace.
Actual results:
Alert is visible under other application namespaces unrelated to the AlertingRule
Expected results:
Alert should only be visible on the namespace under which they are created.
Additional info:
Attached Dev console screen. The alert is visible under user-app namespace when response shows the alert is defined for my-app namespace.
- clones
-
LOG-6148 Loki log based alerts for application tenant are not filtered by namespace on dev-console
-
- Closed
-