@@ -47,6 +47,7 @@ var _ = g.Describe("[Feature:Prometheus][Late] Alerts", func() {
4747 e2e .Failf ("Prometheus could not be located on this cluster, failing prometheus test" )
4848 }
4949 })
50+
5051 g .It ("shouldn't report any alerts in firing state apart from Watchdog and AlertmanagerReceiversNotConfigured" , func () {
5152 if len (os .Getenv ("TEST_UNSUPPORTED_ALLOW_VERSION_SKEW" )) > 0 {
5253 e2e .Skipf ("Test is disabled to allow cluster components to have different versions, and skewed versions trigger multiple other alerts" )
@@ -62,6 +63,7 @@ var _ = g.Describe("[Feature:Prometheus][Late] Alerts", func() {
6263 }
6364 runQueries (tests , oc , ns , execPod .Name , url , bearerToken )
6465 })
66+
6567 g .It ("should have a Watchdog alert in firing state the entire cluster run" , func () {
6668 oc .SetupProject ()
6769 ns := oc .Namespace ()
@@ -76,6 +78,27 @@ var _ = g.Describe("[Feature:Prometheus][Late] Alerts", func() {
7678
7779 e2e .Logf ("Watchdog alert is firing" )
7880 })
81+
82+ g .It ("shouldn't exceed the 500 series limit of total series sent via telemetry from each cluster" , func () {
83+ if ! hasPullSecret (oc .AdminKubeClient (), "cloud.openshift.com" ) {
84+ e2e .Skipf ("Telemetry is disabled" )
85+ }
86+ oc .SetupProject ()
87+ ns := oc .Namespace ()
88+
89+ execPod := exutil .CreateCentosExecPodOrFail (oc .AdminKubeClient (), ns , "execpod" , nil )
90+ defer func () { oc .AdminKubeClient ().CoreV1 ().Pods (ns ).Delete (execPod .Name , metav1 .NewDeleteOptions (1 )) }()
91+
92+ tests := map [string ]bool {
93+ // We want to limit the number of total series sent, the cluster:telemetry_selected_series:count
94+ // rule contains the count of the all the series that are sent via telemetry.
95+ `max_over_time(cluster:telemetry_selected_series:count[2h]) >= 500` : false ,
96+ }
97+ runQueries (tests , oc , ns , execPod .Name , url , bearerToken )
98+
99+ e2e .Logf ("Total number of series sent via telemetry is below the limit" )
100+ })
101+
79102})
80103
81104var _ = g .Describe ("[Feature:Prometheus][Conformance] Prometheus" , func () {
0 commit comments