This is an automated email from the ASF dual-hosted git repository. astefanutti pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/master by this push: new 80afc24 [fix] Add bigger flexibility to alerts tests 80afc24 is described below commit 80afc24b1f9fd7557a26a7ea2f9a030dc354f605 Author: Lukas Lowinger <llowi...@redhat.com> AuthorDate: Thu Feb 11 13:14:12 2021 +0100 [fix] Add bigger flexibility to alerts tests --- e2e/yaks/openshift/monitoring/alerting.feature | 2 +- .../openshift/monitoring/resources/operator-prometheus-rule.yaml | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/e2e/yaks/openshift/monitoring/alerting.feature b/e2e/yaks/openshift/monitoring/alerting.feature index 7b66a7f..80b9239 100644 --- a/e2e/yaks/openshift/monitoring/alerting.feature +++ b/e2e/yaks/openshift/monitoring/alerting.feature @@ -12,5 +12,5 @@ Feature: Alerts from Camel-K are propagated to Openshift Prometheus Given HTTP request header Authorization is "Bearer ${openshift.token}" When send GET /api/v1/rules Then verify HTTP response expressions - | $..rules[?(@.labels.namespace == '${YAKS_NAMESPACE}' && @.state == 'pending')].name | CamelKBuildFailure | + | $..rules[?(@.labels.namespace == '${YAKS_NAMESPACE}' && @.state == 'firing')].name | CamelKBuildFailure | And receive HTTP 200 \ No newline at end of file diff --git a/e2e/yaks/openshift/monitoring/resources/operator-prometheus-rule.yaml b/e2e/yaks/openshift/monitoring/resources/operator-prometheus-rule.yaml index 2e00f68..6bb3585 100644 --- a/e2e/yaks/openshift/monitoring/resources/operator-prometheus-rule.yaml +++ b/e2e/yaks/openshift/monitoring/resources/operator-prometheus-rule.yaml @@ -87,12 +87,12 @@ spec: for {{ $labels.job }} have their duration above 5m. - alert: CamelKBuildFailure expr: | - sum(rate(camel_k_build_duration_seconds_count{result="Failed"}[5m])) by (job) + sum(rate(camel_k_build_duration_seconds_count{result="Failed"}[20m])) by (job) / - sum(rate(camel_k_build_duration_seconds_count[5m])) by (job) + sum(rate(camel_k_build_duration_seconds_count[20m])) by (job) * 100 > 1 - for: 10m + for: 1m labels: severity: warning annotations: