-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #242 from stackrox/mc/network-policy-violation-alert
ROX-23558: Add Network Policy alert
- Loading branch information
Showing
2 changed files
with
81 additions
and
0 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
59 changes: 59 additions & 0 deletions
59
resources/prometheus/unit_tests/ClusterAuditNetworkPolicyViolations.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
rule_files: | ||
- /tmp/prometheus-rules-test.yaml | ||
|
||
evaluation_interval: 1m | ||
|
||
tests: | ||
- interval: 1m | ||
input_series: | ||
- series: network_policy_denials_sample_count{namespace="rhacs-cloudwatch"} | ||
values: "15x1" | ||
alert_rule_test: | ||
- eval_time: 70s | ||
alertname: ClusterAuditNetworkPolicyViolations | ||
exp_alerts: | ||
- exp_labels: | ||
alertname: ClusterAuditNetworkPolicyViolations | ||
namespace: rhacs-cloudwatch | ||
severity: info | ||
exp_annotations: | ||
summary: "Network Policy Violations occuring on cluster." | ||
description: | | ||
A cluster node logged at least 15 Network Policy ACL denial(s) per minute. | ||
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-cloud-service/runbooks/-/blob/master/sops/dp-044-network-policy-violation.md" | ||
|
||
- interval: 1m | ||
input_series: | ||
- series: network_policy_denials_sample_count{namespace="rhacs-cloudwatch"} | ||
values: "1x10" | ||
alert_rule_test: | ||
- eval_time: 610s | ||
alertname: ClusterAuditNetworkPolicyViolations | ||
exp_alerts: | ||
- exp_labels: | ||
alertname: ClusterAuditNetworkPolicyViolations | ||
namespace: rhacs-cloudwatch | ||
severity: info | ||
exp_annotations: | ||
summary: "Network Policy Violations occuring on cluster." | ||
description: | | ||
A cluster node logged Network Policy ACL denial(s) for 10 minutes. | ||
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-cloud-service/runbooks/-/blob/master/sops/dp-044-network-policy-violation.md" | ||
|
||
- interval: 1m | ||
input_series: | ||
- series: network_policy_denials_sample_count{namespace="rhacs-cloudwatch"} | ||
values: "1x9 0" | ||
alert_rule_test: | ||
- eval_time: 10m | ||
alertname: ClusterAuditNetworkPolicyViolations | ||
exp_alerts: [] | ||
|
||
- interval: 1m | ||
input_series: | ||
- series: network_policy_denials_sample_count{namespace="rhacs-cloudwatch"} | ||
values: "14x1" | ||
alert_rule_test: | ||
- eval_time: 70s | ||
alertname: ClusterAuditNetworkPolicyViolations | ||
exp_alerts: [] |