2021-11-23 08:30:38 +00:00
|
|
|
## Prometheus Monitoring Mixin for Ceph
|
|
|
|
A set of Grafana dashboards and Prometheus alerts for Ceph.
|
|
|
|
|
|
|
|
All the Grafana dashboards are already generated in the `dashboards_out`
|
2022-02-07 10:53:29 +00:00
|
|
|
directory and alerts in the `prometheus_alerts.yml` file.
|
2021-11-23 08:30:38 +00:00
|
|
|
|
|
|
|
You can use the Grafana dashboards and alerts with Jsonnet like any other
|
2022-08-16 13:38:18 +00:00
|
|
|
prometheus mixin. You can find more resources about mixins in general on
|
2021-11-23 08:30:38 +00:00
|
|
|
[monitoring.mixins.dev](https://monitoring.mixins.dev/).
|
|
|
|
|
|
|
|
### Grafana dashboards for Ceph
|
|
|
|
In `dashboards_out` you can find a collection of
|
|
|
|
[Grafana](https://grafana.com/grafana) dashboards for Ceph Monitoring.
|
|
|
|
|
|
|
|
These dashboards are based on metrics collected
|
|
|
|
from [prometheus](https://prometheus.io/) scraping the [prometheus mgr
|
|
|
|
plugin](http://docs.ceph.com/en/latest/mgr/prometheus/) and the
|
|
|
|
[node_exporter](https://github.com/prometheus/node_exporter).
|
|
|
|
|
|
|
|
#### Requirements
|
|
|
|
|
|
|
|
- [Status Panel](https://grafana.com/plugins/vonage-status-panel) installed on
|
|
|
|
your Grafana instance
|
|
|
|
- [Pie Chart Panel](https://grafana.com/grafana/plugins/grafana-piechart-panel/)
|
|
|
|
installed on your Grafana instance
|
|
|
|
|
|
|
|
|
|
|
|
### Prometheus alerts
|
2022-08-16 13:38:18 +00:00
|
|
|
In `prometheus_alerts.libsonnet` you'll find a set of Prometheus
|
2021-11-23 08:30:38 +00:00
|
|
|
alert rules that should provide a decent set of default alerts for a
|
2022-08-16 13:38:18 +00:00
|
|
|
Ceph cluster. After building them with jsonnet put this file in place according to your Prometheus
|
2021-11-23 08:30:38 +00:00
|
|
|
configuration (wherever the `rules` configuration stanza points).
|
|
|
|
|
2022-08-16 13:38:18 +00:00
|
|
|
### Multi-cluster support
|
|
|
|
Ceph-mixin supports dashboards and alerts across multiple clusters.
|
|
|
|
To enable this feature you need to configure the following in `config.libsonnnet`:
|
|
|
|
|
|
|
|
```
|
|
|
|
showMultiCluster: true,
|
|
|
|
clusterLabel: '<your cluster label>',
|
|
|
|
```
|
|
|
|
|
2021-11-23 08:30:38 +00:00
|
|
|
#### SNMP
|
|
|
|
Ceph provides a MIB (CEPH-PROMETHEUS-ALERT-MIB.txt) to support sending Prometheus
|
|
|
|
alerts through to an SNMP management platform. The translation from Prometheus
|
|
|
|
alert to SNMP trap requires the Prometheus alert to contain an OID that maps to
|
|
|
|
a definition within the MIB. When making changes to the Prometheus alert rules
|
|
|
|
file, developers should include any necessary changes to the MIB.
|
|
|
|
|
|
|
|
### Building from Jsonnet
|
|
|
|
|
2022-01-05 11:06:14 +00:00
|
|
|
- Install [jsonnet](https://jsonnet.org/) (at least v0.18.0)
|
2021-11-23 08:30:38 +00:00
|
|
|
- By installing the package `jsonnet` in most of the distro and
|
|
|
|
`golang-github-google-jsonnet` in fedora
|
|
|
|
- Install [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler)
|
|
|
|
|
|
|
|
To rebuild all the generated files, you can run `tox -egrafonnet-fix`.
|
|
|
|
|
|
|
|
The jsonnet code located in this directory depends on some Jsonnet third party
|
|
|
|
libraries. To update those libraries you can run `jb update` and then update
|
|
|
|
the generated files using `tox -egrafonnet-fix`.
|