Skip to content

Commit

Permalink
Merge pull request #119 from openebs/alert_changes
Browse files Browse the repository at this point in the history
chore(alerting): changes on rules and alert config
  • Loading branch information
abhilashshetty04 authored Sep 18, 2024
2 parents ac1fc45 + 846ea29 commit eff5254
Show file tree
Hide file tree
Showing 14 changed files with 33 additions and 9 deletions.
6 changes: 3 additions & 3 deletions deploy/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ keywords:
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 3.0.0
version: 4.0.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 3.0.0
appVersion: 4.0.0

dependencies:
- name: kube-prometheus-stack
version: "58.0.*"
version: "61.0.*"
repository: https://prometheus-community.github.io/helm-charts
condition: kube-prometheus-stack.install
- name: node-problem-detector
Expand Down
6 changes: 6 additions & 0 deletions deploy/charts/rules/lvmLocalPV/lvmlocalpv-rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@
"expr": "lvm_vg_missing_pv_count > 0",
"for": "5m",
"labels": {
"engine": "localpv-lvm",
"product": "openebs",
"severity": "critical"
}
},
Expand All @@ -28,6 +30,8 @@
"expr": "((lvm_vg_total_size_bytes - lvm_vg_free_size_bytes)/lvm_vg_total_size_bytes)*100 > 90",
"for": "5m",
"labels": {
"engine": "localpv-lvm",
"product": "openebs",
"severity": "critical"
}
},
Expand All @@ -42,6 +46,8 @@
"expr": "lvm_lv_used_percent{segtype=\"thin-pool\"} > 90",
"for": "5m",
"labels": {
"engine": "localpv-lvm",
"product": "openebs",
"severity": "critical"
}
}
Expand Down
2 changes: 2 additions & 0 deletions deploy/charts/templates/podmonitors.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }}
{{- range $monitoringAddon, $fields := .Values.openebsMonitoringAddon }}
{{- if (and (hasKey $fields "enabled") ($fields.enabled)) }}
{{- if (hasKey $fields "podMonitor") }}
Expand Down Expand Up @@ -27,3 +28,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/charts/templates/prometheusRules.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }}
{{- $alertRules := dict -}}
{{- range $monitoringAddon,$fields := .Values.openebsMonitoringAddon }}
{{- if (and (hasKey $fields "enabled") ($fields.enabled)) }}
Expand Down Expand Up @@ -28,3 +29,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 2 additions & 0 deletions deploy/charts/templates/servicemonitors.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{{ if (.Capabilities.APIVersions.Has "monitoring.coreos.com/v1") }}
{{- range $monitoringAddon, $fields := .Values.openebsMonitoringAddon }}
{{- if (and (hasKey $fields "enabled") ($fields.enabled)) }}
{{- if (hasKey $fields "serviceMonitor") }}
Expand Down Expand Up @@ -27,3 +28,4 @@ spec:
{{- end }}
{{- end }}
{{- end }}
{{- end }}
12 changes: 9 additions & 3 deletions deploy/charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,12 @@ kube-prometheus-stack:
group_interval: 5m
repeat_interval: 4h
receiver: "null"
## This route specifically groups openebs alerts.
routes:
- matchers:
- product="openebs"
receiver: "null"
## Add receivers as required. Ref: https://prometheus.io/docs/alerting/latest/configuration/#receiver-integration-settings
receivers:
- name: "null"
templates:
Expand Down Expand Up @@ -271,11 +277,11 @@ openebsMonitoringAddon:
any: true

npd:
enabled: true
enabled: false
dashboards:
enabled: true
enabled: false
alertRules:
enabled: true
enabled: false

volume:
enabled: true
Expand Down
6 changes: 3 additions & 3 deletions jsonnet/openebs-mixin/dashboards/dashboards.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ function(param) {
grafanaDashboards+:: {
[if dashboard._config.dashboards.lvmLocalPV then 'lvmlocalpv-pool.json']: import './openebs/lvmlocalpv-pool.json',
[if dashboard._config.dashboards.zfsLocalPV then 'zfslocalpv.json']: import './openebs/zfslocalpv.json',
[if dashboard._config.dashboards.mayastor then 'diskpool.json']: import './mayastor/diskpool.json',
[if dashboard._config.dashboards.mayastor then 'volume.json']: import './mayastor/volume.json',
[if dashboard._config.dashboards.mayastor then 'volume-replica.json']: import './mayastor/volume-replica.json',
[if dashboard._config.dashboards.mayastor then 'mayastor-diskpool.json']: import './mayastor/mayastor-diskpool.json',
[if dashboard._config.dashboards.mayastor then 'mayastor-volume.json']: import './mayastor/mayastor-volume.json',
[if dashboard._config.dashboards.mayastor then 'mayastor-volume-replica.json']: import './mayastor/mayastor-volume-replica.json',
[if dashboard._config.dashboards.npd then 'npd-node-volume-problem.json']: import './npd/npd-node-volume-problem.json',
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ function(param) {
'for': '5m',
labels: {
severity: 'critical',
product: 'openebs',
engine: 'localpv-lvm',
},
},
{
Expand All @@ -33,6 +35,8 @@ function(param) {
'for': '5m',
labels: {
severity: 'critical',
product: 'openebs',
engine: 'localpv-lvm',
},
},
{
Expand All @@ -47,6 +51,8 @@ function(param) {
'for': '5m',
labels: {
severity: 'critical',
product: 'openebs',
engine: 'localpv-lvm',
},
},
],
Expand Down

0 comments on commit eff5254

Please sign in to comment.