-
Notifications
You must be signed in to change notification settings - Fork 360
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
policyfiltermetrics: add error and warning labels
At the moment, there is no way to tell from Prometheus if an operation of updating the policy was successful or not. There can be two main scenarios apart from success: - an operation is successful but with a warning - an operation is unsuccessful - error. This patch aims to address both cases by adding two labels to the "policyfilter_metrics_total" metric: error and warning. In this change, the "warning" label will be added only for cases when the container name is not found in the OCI hook. The error label will be added to cases when adding a new container to the pod, adding a pod, updating a pod, or deleting a pod fails. Besides, this patch adds a missing return statement for the case when adding a container to pod from OCI hook fails and we inform the user that we are aborting the hook. Fixes: #1879 Signed-off-by: Oleh Neichev <[email protected]>
- Loading branch information
Showing
3 changed files
with
103 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters