Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync: stage to production #247

Merged
merged 7 commits into from
Jun 18, 2024
Merged
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions resources/grafana/sources/rhacs-central-slo.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"enable": true,
"iconColor": "purple",
"expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1",
"expr": "count (count by (git_version) (label_replace(count_over_time(kubernetes_build_info{job!~\"kube-dns|coredns\"}[${__interval}]), \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1",
"name": "Kubernetes Upgrade",
"textFormat": "Kubernetes Upgrade"
},
Expand All @@ -37,7 +37,7 @@
},
"enable": true,
"iconColor": "red",
"expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1",
"expr": "count (count by (gitVersion) (count_over_time (openshift_apiserver_build_info[${__interval}]))) > 1",
"name": "OpenShift Upgrade",
"textFormat": "OpenShift Upgrade"
}
Expand Down
4 changes: 2 additions & 2 deletions resources/grafana/sources/rhacs-cluster-overview.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"enable": true,
"iconColor": "purple",
"expr": "count (count by (git_version) (label_replace(kubernetes_build_info{job!~\"kube-dns|coredns\"}, \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1",
"expr": "count (count by (git_version) (label_replace(count_over_time(kubernetes_build_info{job!~\"kube-dns|coredns\"}[${__interval}]), \"git_version\", \"$1\", \"git_version\", \"(v[0-9]*.[0-9]*).*\"))) > 1",
"name": "Kubernetes Upgrade",
"textFormat": "Kubernetes Upgrade"
},
Expand All @@ -37,7 +37,7 @@
},
"enable": true,
"iconColor": "red",
"expr": "count (count by (gitVersion) (openshift_apiserver_build_info)) > 1",
"expr": "count (count by (gitVersion) (count_over_time (openshift_apiserver_build_info[${__interval}]))) > 1",
"name": "OpenShift Upgrade",
"textFormat": "OpenShift Upgrade"
}
Expand Down
32 changes: 32 additions & 0 deletions resources/prometheus/prometheus-rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -756,3 +756,35 @@ cluster autoscaler. Limits can be adjusted by modifying the cluster autoscaler c
the cluster autoscaler. This is calculated by summing the memory capacity for all nodes in the cluster and comparing that number against the maximum memory bytes value set
for the cluster autoscaler. Limits can be adjusted by modifying the cluster autoscaler configuration."
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-cloud-service/runbooks/-/blob/master/sops/dp-042-modify-cluster-autoscaler.md"
- alert: ClusterAuditSELinuxViolations
expr: |
selinux_denials_sample_count > 0
labels:
severity: info
annotations:
summary: "SELinux Violations occuring on cluster."
description: |
A cluster node logged {{ $value }} SELinux AVC denial(s) per minute to the audit log.
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-cloud-service/runbooks/-/blob/master/sops/dp-043-selinux-violation.md"
- alert: ClusterAuditNetworkPolicyViolations
expr: |
network_policy_denials_sample_count > 0
for: 10m
labels:
severity: info
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"
- alert: ClusterAuditNetworkPolicyViolations
expr: |
network_policy_denials_sample_count >= 15
for: 1m
labels:
severity: info
annotations:
summary: "Network Policy Violations occuring on cluster."
description: |
A cluster node logged at least {{ $value }} 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"
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: []
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
rule_files:
- /tmp/prometheus-rules-test.yaml

evaluation_interval: 1m

tests:
- interval: 1m
input_series:
- series: selinux_denials_sample_count{namespace="rhacs-cloudwatch"}
values: "1x5"
alert_rule_test:
- eval_time: 70s
alertname: ClusterAuditSELinuxViolations
exp_alerts:
- exp_labels:
alertname: ClusterAuditSELinuxViolations
namespace: rhacs-cloudwatch
severity: info
exp_annotations:
summary: "SELinux Violations occuring on cluster."
description: |
A cluster node logged 1 SELinux AVC denial(s) per minute to the audit log.
sop_url: "https://gitlab.cee.redhat.com/stackrox/acs-cloud-service/runbooks/-/blob/master/sops/dp-043-selinux-violation.md"