Skip to content
Snippets Groups Projects
Verified Commit 35f6b142 authored by Varac's avatar Varac
Browse files

Use cluster.local URL to query prometheus

parent e0515f4d
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,8 @@ def test_prometheus_alerts(host):
print("Starting prometheus test...")
prometheus_ip = host.check_output(
'dig +short '
'monitoring-prometheus-oper-prometheus.oas.svc.cluster.local '
'@10.43.0.10')
url = 'http://{0}:9090/api/v1/alerts'.format(prometheus_ip)
url = 'http://monitoring-prometheus-oper-prometheus.oas.svc.cluster.local:9090/api/v1/alerts'
alert_json = json.loads(host.check_output('curl ' + url))
status = alert_json["status"]
alerts = alert_json["data"]["alerts"]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment