-
Notifications
You must be signed in to change notification settings - Fork 4.8k
test/extended/prometheus: Add test for no alerts in pending state #25112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,20 @@ var _ = g.Describe("[sig-instrumentation][Late] Alerts", func() { | |
| e2e.Logf("Watchdog alert is firing") | ||
| }) | ||
|
|
||
| g.It("should not have any alerts in pending state the entire cluster run", func() { | ||
| oc.SetupProject() | ||
| ns := oc.Namespace() | ||
| execPod := exutil.CreateCentosExecPodOrFail(oc.AdminKubeClient(), ns, "execpod", nil) | ||
| defer func() { | ||
| oc.AdminKubeClient().CoreV1().Pods(ns).Delete(context.Background(), execPod.Name, *metav1.NewDeleteOptions(1)) | ||
| }() | ||
|
|
||
| tests := map[string]bool{ | ||
| `count_over_time(ALERTS{alertname!~"Watchdog|AlertmanagerReceiversNotConfigured|KubeAPILatencyHigh", alertstate="pending"}[2h])`: false, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we even need the `count_over_time(ALERTS{alertname!~"Watchdog|AlertmanagerReceiversNotConfigured|KubeAPILatencyHigh"}[2h])`: falsefor "there are no surprising alerts in any state over the entire cluster run", to ensure we don't have something like a pending alert that slips through the firing test and then starts firing and slips through a pending-specific test. |
||
| } | ||
| helper.RunQueries(tests, oc, ns, execPod.Name, url, bearerToken) | ||
| }) | ||
|
|
||
| g.It("shouldn't exceed the 500 series limit of total series sent via telemetry from each cluster", func() { | ||
| if !hasPullSecret(oc.AdminKubeClient(), "cloud.openshift.com") { | ||
| e2eskipper.Skipf("Telemetry is disabled") | ||
|
|
||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move it closer https://github.com/openshift/origin/blob/master/test/extended/prometheus/prometheus.go#L54 as those tests are very similar and need almost the same exclusion list?