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

Update kubernetes-mixin digest to 3cb7958 #4

Merged
merged 2 commits into from
Sep 24, 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
8 changes: 4 additions & 4 deletions docs/azure/dashboards/k8s-resources-workloads-namespace.json
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"requests.cpu|cpu\"})",
"legendFormat": "quota - requests"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"limits.cpu\"})",
"legendFormat": "quota - limits"
}
],
Expand Down Expand Up @@ -412,15 +412,15 @@
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"requests.memory|memory\"})",
"legendFormat": "quota - requests"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.memory\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"limits.memory\"})",
"legendFormat": "quota - limits"
}
],
Expand Down
14 changes: 7 additions & 7 deletions docs/azure/prometheusAlerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
"rules": [
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate1h) > (14.40 * 0.01000) and sum(apiserver_request:burnrate5m) > (14.40 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate1h) > (14.40 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate5m) > (14.40 * 0.01000)",
"for": "2m",
"labels": {
"long": "1h",
Expand All @@ -442,7 +442,7 @@
},
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate6h) > (6.00 * 0.01000) and sum(apiserver_request:burnrate30m) > (6.00 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate6h) > (6.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate30m) > (6.00 * 0.01000)",
"for": "15m",
"labels": {
"long": "6h",
Expand All @@ -457,7 +457,7 @@
},
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate1d) > (3.00 * 0.01000) and sum(apiserver_request:burnrate2h) > (3.00 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate1d) > (3.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate2h) > (3.00 * 0.01000)",
"for": "1h",
"labels": {
"long": "1d",
Expand All @@ -472,7 +472,7 @@
},
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate3d) > (1.00 * 0.01000) and sum(apiserver_request:burnrate6h) > (1.00 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate3d) > (1.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate6h) > (1.00 * 0.01000)",
"for": "3h",
"labels": {
"long": "3d",
Expand All @@ -492,7 +492,7 @@
"rules": [
{
"alert": "KubeClientCertificateExpiration",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 604800",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 604800",
"for": "5m",
"labels": {
"severity": "warning"
Expand All @@ -505,7 +505,7 @@
},
{
"alert": "KubeClientCertificateExpiration",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 86400",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 86400",
"for": "5m",
"labels": {
"severity": "critical"
Expand Down Expand Up @@ -556,7 +556,7 @@
},
{
"alert": "KubeAPITerminatedRequests",
"expr": "sum(rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m])) / (sum(rate(apiserver_request_total{job=\"kube-apiserver\"}[10m])) + sum(rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m]))) > 0.20",
"expr": "sum by(cluster) (rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m])) / (sum by(cluster) (rate(apiserver_request_total{job=\"kube-apiserver\"}[10m])) + sum by(cluster) (rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m]))) > 0.20",
"for": "5m",
"labels": {
"severity": "warning"
Expand Down
14 changes: 7 additions & 7 deletions docs/azure/prometheusAlerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ groups:
rules:
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate1h) > (14.40 * 0.01000) and sum(apiserver_request:burnrate5m) > (14.40 * 0.01000)
sum by(cluster) (apiserver_request:burnrate1h) > (14.40 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate5m) > (14.40 * 0.01000)
for: 2m
labels:
long: 1h
Expand All @@ -332,7 +332,7 @@ groups:
summary: The API server is burning too much error budget.
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate6h) > (6.00 * 0.01000) and sum(apiserver_request:burnrate30m) > (6.00 * 0.01000)
sum by(cluster) (apiserver_request:burnrate6h) > (6.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate30m) > (6.00 * 0.01000)
for: 15m
labels:
long: 6h
Expand All @@ -344,7 +344,7 @@ groups:
summary: The API server is burning too much error budget.
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate1d) > (3.00 * 0.01000) and sum(apiserver_request:burnrate2h) > (3.00 * 0.01000)
sum by(cluster) (apiserver_request:burnrate1d) > (3.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate2h) > (3.00 * 0.01000)
for: 1h
labels:
long: 1d
Expand All @@ -356,7 +356,7 @@ groups:
summary: The API server is burning too much error budget.
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate3d) > (1.00 * 0.01000) and sum(apiserver_request:burnrate6h) > (1.00 * 0.01000)
sum by(cluster) (apiserver_request:burnrate3d) > (1.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate6h) > (1.00 * 0.01000)
for: 3h
labels:
long: 3d
Expand All @@ -370,7 +370,7 @@ groups:
rules:
- alert: "KubeClientCertificateExpiration"
expr: |-
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 604800
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 604800
for: 5m
labels:
severity: warning
Expand All @@ -380,7 +380,7 @@ groups:
summary: Client certificate is about to expire.
- alert: "KubeClientCertificateExpiration"
expr: |-
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 86400
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 86400
for: 5m
labels:
severity: critical
Expand Down Expand Up @@ -419,7 +419,7 @@ groups:
summary: Target disappeared from Prometheus target discovery.
- alert: "KubeAPITerminatedRequests"
expr: |-
sum(rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m])) / (sum(rate(apiserver_request_total{job="kube-apiserver"}[10m])) + sum(rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m]))) > 0.20
sum by(cluster) (rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m])) / (sum by(cluster) (rate(apiserver_request_total{job="kube-apiserver"}[10m])) + sum by(cluster) (rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m]))) > 0.20
for: 5m
labels:
severity: warning
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.cpu\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"requests.cpu|cpu\"})",
"legendFormat": "quota - requests"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.cpu\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"limits.cpu\"})",
"legendFormat": "quota - limits"
}
],
Expand Down Expand Up @@ -412,15 +412,15 @@
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"requests.memory\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"requests.memory|memory\"})",
"legendFormat": "quota - requests"
},
{
"datasource": {
"type": "prometheus",
"uid": "${datasource}"
},
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=\"limits.memory\"})",
"expr": "scalar(kube_resourcequota{cluster=\"$cluster\", namespace=\"$namespace\", type=\"hard\",resource=~\"limits.memory\"})",
"legendFormat": "quota - limits"
}
],
Expand Down
14 changes: 7 additions & 7 deletions docs/default/prometheusAlerts.json
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@
"rules": [
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate1h) > (14.40 * 0.01000) and sum(apiserver_request:burnrate5m) > (14.40 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate1h) > (14.40 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate5m) > (14.40 * 0.01000)",
"for": "2m",
"labels": {
"long": "1h",
Expand All @@ -442,7 +442,7 @@
},
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate6h) > (6.00 * 0.01000) and sum(apiserver_request:burnrate30m) > (6.00 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate6h) > (6.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate30m) > (6.00 * 0.01000)",
"for": "15m",
"labels": {
"long": "6h",
Expand All @@ -457,7 +457,7 @@
},
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate1d) > (3.00 * 0.01000) and sum(apiserver_request:burnrate2h) > (3.00 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate1d) > (3.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate2h) > (3.00 * 0.01000)",
"for": "1h",
"labels": {
"long": "1d",
Expand All @@ -472,7 +472,7 @@
},
{
"alert": "KubeAPIErrorBudgetBurn",
"expr": "sum(apiserver_request:burnrate3d) > (1.00 * 0.01000) and sum(apiserver_request:burnrate6h) > (1.00 * 0.01000)",
"expr": "sum by(cluster) (apiserver_request:burnrate3d) > (1.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate6h) > (1.00 * 0.01000)",
"for": "3h",
"labels": {
"long": "3d",
Expand All @@ -492,7 +492,7 @@
"rules": [
{
"alert": "KubeClientCertificateExpiration",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 604800",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 604800",
"for": "5m",
"labels": {
"severity": "warning"
Expand All @@ -505,7 +505,7 @@
},
{
"alert": "KubeClientCertificateExpiration",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 86400",
"expr": "apiserver_client_certificate_expiration_seconds_count{job=\"kube-apiserver\"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job=\"kube-apiserver\"}[5m]))) < 86400",
"for": "5m",
"labels": {
"severity": "critical"
Expand Down Expand Up @@ -556,7 +556,7 @@
},
{
"alert": "KubeAPITerminatedRequests",
"expr": "sum(rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m])) / (sum(rate(apiserver_request_total{job=\"kube-apiserver\"}[10m])) + sum(rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m]))) > 0.20",
"expr": "sum by(cluster) (rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m])) / (sum by(cluster) (rate(apiserver_request_total{job=\"kube-apiserver\"}[10m])) + sum by(cluster) (rate(apiserver_request_terminations_total{job=\"kube-apiserver\"}[10m]))) > 0.20",
"for": "5m",
"labels": {
"severity": "warning"
Expand Down
14 changes: 7 additions & 7 deletions docs/default/prometheusAlerts.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ groups:
rules:
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate1h) > (14.40 * 0.01000) and sum(apiserver_request:burnrate5m) > (14.40 * 0.01000)
sum by(cluster) (apiserver_request:burnrate1h) > (14.40 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate5m) > (14.40 * 0.01000)
for: 2m
labels:
long: 1h
Expand All @@ -332,7 +332,7 @@ groups:
summary: The API server is burning too much error budget.
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate6h) > (6.00 * 0.01000) and sum(apiserver_request:burnrate30m) > (6.00 * 0.01000)
sum by(cluster) (apiserver_request:burnrate6h) > (6.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate30m) > (6.00 * 0.01000)
for: 15m
labels:
long: 6h
Expand All @@ -344,7 +344,7 @@ groups:
summary: The API server is burning too much error budget.
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate1d) > (3.00 * 0.01000) and sum(apiserver_request:burnrate2h) > (3.00 * 0.01000)
sum by(cluster) (apiserver_request:burnrate1d) > (3.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate2h) > (3.00 * 0.01000)
for: 1h
labels:
long: 1d
Expand All @@ -356,7 +356,7 @@ groups:
summary: The API server is burning too much error budget.
- alert: "KubeAPIErrorBudgetBurn"
expr: |-
sum(apiserver_request:burnrate3d) > (1.00 * 0.01000) and sum(apiserver_request:burnrate6h) > (1.00 * 0.01000)
sum by(cluster) (apiserver_request:burnrate3d) > (1.00 * 0.01000) and on(cluster) sum by(cluster) (apiserver_request:burnrate6h) > (1.00 * 0.01000)
for: 3h
labels:
long: 3d
Expand All @@ -370,7 +370,7 @@ groups:
rules:
- alert: "KubeClientCertificateExpiration"
expr: |-
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 604800
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 604800
for: 5m
labels:
severity: warning
Expand All @@ -380,7 +380,7 @@ groups:
summary: Client certificate is about to expire.
- alert: "KubeClientCertificateExpiration"
expr: |-
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(job) histogram_quantile(0.01, sum by (job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 86400
apiserver_client_certificate_expiration_seconds_count{job="kube-apiserver"} > 0 and on(cluster, job) histogram_quantile(0.01, sum by (cluster, job, le) (rate(apiserver_client_certificate_expiration_seconds_bucket{job="kube-apiserver"}[5m]))) < 86400
for: 5m
labels:
severity: critical
Expand Down Expand Up @@ -419,7 +419,7 @@ groups:
summary: Target disappeared from Prometheus target discovery.
- alert: "KubeAPITerminatedRequests"
expr: |-
sum(rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m])) / (sum(rate(apiserver_request_total{job="kube-apiserver"}[10m])) + sum(rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m]))) > 0.20
sum by(cluster) (rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m])) / (sum by(cluster) (rate(apiserver_request_total{job="kube-apiserver"}[10m])) + sum by(cluster) (rate(apiserver_request_terminations_total{job="kube-apiserver"}[10m]))) > 0.20
for: 5m
labels:
severity: warning
Expand Down
Loading
Loading