Skip to content

Commit

Permalink
fix: update status to check for 2xx and any other 200 http code with …
Browse files Browse the repository at this point in the history
…regex
  • Loading branch information
shreddedbacon committed May 30, 2024
1 parent f4e9a82 commit b3fe4a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/idler/service-kubernetes.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func (h *Idler) KubernetesServiceIdler(ctx context.Context, opLog logr.Logger, n
defer cancel()
// get the number of requests to any ingress in the exported namespace by status code
promQuery := fmt.Sprintf(
`round(sum(increase(nginx_ingress_controller_requests{exported_namespace="%s",status="200"}[%s])) by (status))`,
`round(sum(increase(nginx_ingress_controller_requests{exported_namespace="%s",status=~"2[0-9x]{2}"}[%s])) by (status))`,
namespace.ObjectMeta.Name,
prometheusInternalCheck,
)
Expand Down

0 comments on commit b3fe4a1

Please sign in to comment.