-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
4.14.z
-
No
-
False
-
Description of problem:
Alertmanager sends invalid GeneratorURL for user defined alerts. URL is invailid because it points to thanos-query route which is not accessible.
A similar issue was already fixed for platform alerts in OCPBUGS-17650; also a duplicate of this issue was posted in OCPBUGS-13583 .
Version-Release number of selected component (if applicable):
v4.14.24
Steps to Reproduce:
During the customer's test with port-forward of the Alertmanager pod to 9093 and checking if it redirects to the console route:
1. $ oc -n openshift-monitoring port-forward pod/alertmanager-main-0 9093
2. Browser open http://localhost:9093/ (it redirects to http://localhost:9093/#/alerts),
3. Click the "Source" link of ThanosUrlTestAlert alert, which will go to https://thanos-querier-openshift-monitoring.apps.cluster.example.com/api/graph?g0.expr=thanos_compact_halted%7Bnamespace%3D%22thanos-shared%22%7D+%3D%3D+0&g0.tab=1
4. "404: Page Not Found“
Actual results:
Alert: ThanosUrlTestAlert (user define alert) SourceUrl: https://thanos-querier-openshift-monitoring.apps.cluster.example.com/api/graph?g0.expr=thanos_compact_halted%7Bnamespace%3D%22thanos-shared%22%7D+%3D%3D+0&g0.tab=1
Expected results:
Epecting that GeneratorURL is valid and points to Console UI where users can review the alert.
Additional info:
High user impact because users can't easily see alert details when working from 3rd party systems.
a)
Alert: Watchdog (system alert that is in openshift-* or kube-* or other system namespace)
SourceUrl: https://console-openshift-console.apps.cluster.example.com/monitoring/graph?g0.expr=vector%281%29&g0.tab=1
Result: works as expected
b)
Alert: ThanosUrlTestAlert (user define alert)
SourceUrl: https://thanos-querier-openshift-monitoring.apps.cluster.example.com/api/graph?g0.expr=thanos_compact_halted%7Bnamespace%3D%22thanos-shared%22%7D+%3D%3D+0&g0.tab=1
Result: doesn't work, points to Thanos Querier route which is not accessible.
From this, it should be clear that the issue is only with user-defined alerts.