Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions test/extended/prometheus/prometheus.go
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Copy link
Contributor

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?

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need the alertstate filter here? I'd rather have:

`count_over_time(ALERTS{alertname!~"Watchdog|AlertmanagerReceiversNotConfigured|KubeAPILatencyHigh"}[2h])`: false

for "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")
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.