Generate dashboards and alert rules for helm charts through openebs-mixin.
openebs-mixin
Consists of all the dashboards and alert rules for openebs.
openebs monitoring using jsonnet
openebs monitoring using jsonnet which has an external dependency of kube-Prometheus. It uses openebs-mixin for dashboards and alert rules.
Directory structure:
openebs/monitoring/jsonnet
├── addons # openebs-monitoring addon
│ ├── dashboard-cm.libsonnet # dashboard configmap to include openebs-* dashboard json files from openebs-mixin
│ ├── podMonitors.libsonnet # podMonitor to be created for different cas types
│ ├── prometheusRules.libsonnet # create prometheusRule object which includes alert rules defined in openebs-mixin
│ └── serviceMonitors.libsonnet # serviceMonitor to be created for different cas types
├── buildscripts # scripts and code required to build the project
│ ├── build.sh # script to generate manifests
│ ├── go.mod
│ ├── go.sum
│ └── tools.go
├── config.libsonnet # configuration to be used for openebs monitoing
├── jsonnetfile.json # direct dependencies
├── jsonnetfile.lock.json # all dependencies with exact version
├── lib # contains code that is used in different places
│ └── utils.libsonnet # code which is used to create openebs-monitoring addons
├── main.jsonnet # entrypoint of code
├── Makefile
├── manifests # generated yamls
│ ├── openebs-addons # openebs-monitoring addons yaml
│ │ ├── openebs-*.yaml
│ ├── setup # kube-prometheus crds, rbac and prometheus-operator yaml
│ │ ├── ...
│ ├── ... # kube-prometheus components yaml
└── openebs-mixin # openebs-mixin for dashboards and alert rules
├── build.sh
├── config.libsonnet # configuration that is used while writing dashboards and alert rules
├── dashboards
│ ├── cstor-overview.json
│ ├── cstor-pool.json
│ ├── cstor-volume.json
│ ├── cstor-volume-replica.json
│ ├── dashboards.libsonnet # to import all the dashboard json
│ ├── jiva-volume.json
│ └── localpv-workload.json
├── jsonnetfile.json # direct dependencies
├── lib
│ ├── dashboards.jsonnet
│ └── rules.jsonnet
├── Makefile
├── mixin.libsonnet # openebs-mixin that imports all the dashboards and alert rules
└── rules # contains alert rules for different cas types
├── cstor-pool-rules.libsonnet
├── cstor-rules.libsonnet
├── cstor-volume-rules.libsonnet
├── jiva-rules.libsonnet
├── jiva-volume-rules.libsonnet
├── rules.libsonnet
└── volume-rules.libsonnet
Note:
Refer to this document for more insight into openebs-mixin and openebs-monitoring using jsonnet:
Signed-off-by: Sahil Raja sahilraja242@gmail.com
Reviewer Notes
Please ignore the changes in monitoring/jsonnet/manifests/ directory. These are the files generated through the help of jsonnet and gojsontoyaml.
Please ignore the changes in monitoring/deploy/charts/openebs-monitoring/dashboards and monitoring/deploy/charts/openebs-monitoring/rules as these are generated using jsonnet. Commit: 6ef162eba591f54ebc5442232a64aaa84390e9b0
All the dashboards json present in monitoring/jsonnet/openebs-mixin/dashboards are same as that of dashboards.
Alert rules defined in monitoring/jsonnet/openebs-mixin/rules/ are taken from rules
What this PR does?
openebs-mixin
openebs monitoring using jsonnet
Directory structure:
Note:
Refer to this document for more insight into openebs-mixin and openebs-monitoring using jsonnet: