Skip to content
Open
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
7 changes: 1 addition & 6 deletions jsonnet/telemeter/client/kubernetes.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -253,12 +253,7 @@ local securePort = 8443;
},
{
expr: |||
sum by (namespace) (
rate(federate_requests_failed_total{job="telemeter-client"}[15m])
) /
sum by (namespace) (
rate(federate_requests_total{job="telemeter-client"}[15m])
) > 0.2
sum by(client, status_code) (rate(metricsclient_http_requests_total{status_code!~"200"}[15m])) > 0
Copy link
Contributor

Choose a reason for hiding this comment

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

(suggestion) we need to preserve the namespace label. Let's also evaluate the rate of failed requests.

Suggested change
sum by(client, status_code) (rate(metricsclient_http_requests_total{status_code!~"200"}[15m])) > 0
sum by(client, status_code,namespace) (rate(metricsclient_http_requests_total{status_code!~"2..",job="telemeter-client"}[15m]))
/
on(client, namespace) group_left() sum by(client, namespace) (rate(metricsclient_http_requests_total{job="telemeter-client"}[15m])) > 0.2

|||,
labels: {
severity: 'warning',
Expand Down
7 changes: 1 addition & 6 deletions manifests/client/prometheusRule.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,7 @@ spec:
If the telemeter client fails to authenticate with the telemeter service, make sure that the global pull secret is up to date, see https://docs.openshift.com/container-platform/latest/openshift_images/managing_images/using-image-pull-secrets.html#images-update-global-pull-secret_using-image-pull-secrets for more details.
summary: Telemeter client fails to send metrics
expr: |
sum by (namespace) (
rate(federate_requests_failed_total{job="telemeter-client"}[15m])
) /
sum by (namespace) (
rate(federate_requests_total{job="telemeter-client"}[15m])
) > 0.2
sum by(client, status_code) (rate(metricsclient_http_requests_total{status_code!~"200"}[15m])) > 0
for: 1h
labels:
severity: warning