File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
stackhpc_cloud_tests/monitoring Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -55,5 +55,21 @@ def test_prometheus_alerts_inactive(prom):
55
55
response = response .json ()
56
56
assert "status" in response
57
57
assert response ["status" ] == "success"
58
- alerts = response ["data" ]["alerts" ]
59
- assert not alerts
58
+ assert "data" in response
59
+ alerts = response ["data" ]["alerts" ] or []
60
+ # (MaxN) Allow for, and filter out, alerts we'd expect to see in an AIO environment.
61
+ # TODO - find a way of configuring this for SCT runs in other environments.
62
+ alerts_to_ignore = [
63
+ # We know our volumes are small.
64
+ "StorageFillingUp" ,
65
+ # This is probably due to storage space..
66
+ "ElasticsearchClusterYellow" ,
67
+ # ..or because we're running in a single instance and it wants to be clustered across multiple nodes.
68
+ "ElasticsearchUnassignedShards" ,
69
+ # It's a small AIO!
70
+ "LowMemory" ,
71
+ # It's only one node and expects three, see https://github.com/stackhpc/stackhpc-kayobe-config/pull/1579
72
+ "RabbitMQNodeDown"
73
+ ]
74
+ alerts = [ alert for alert in alerts if alert ["labels" ]["alertname" ] not in alerts_to_ignore ]
75
+ assert len (alerts ) == 0
You can’t perform that action at this time.
0 commit comments