]> git.proxmox.com Git - ceph.git/blob - ceph/monitoring/ceph-mixin/README.md
4b8b43035f2eb1d0fd4c2ba314476b884c45818c
[ceph.git] / ceph / monitoring / ceph-mixin / README.md
1 ## Prometheus Monitoring Mixin for Ceph
2 A set of Grafana dashboards and Prometheus alerts for Ceph.
3
4 All the Grafana dashboards are already generated in the `dashboards_out`
5 directory and alerts in the `prometheus_alerts.yml` file.
6
7 You can use the Grafana dashboards and alerts with Jsonnet like any other
8 prometheus mixin. You can find more resources about mixins in general on
9 [monitoring.mixins.dev](https://monitoring.mixins.dev/).
10
11 ### Grafana dashboards for Ceph
12 In `dashboards_out` you can find a collection of
13 [Grafana](https://grafana.com/grafana) dashboards for Ceph Monitoring.
14
15 These dashboards are based on metrics collected
16 from [prometheus](https://prometheus.io/) scraping the [prometheus mgr
17 plugin](http://docs.ceph.com/en/latest/mgr/prometheus/) and the
18 [node_exporter](https://github.com/prometheus/node_exporter).
19
20 #### Requirements
21
22 - [Status Panel](https://grafana.com/plugins/vonage-status-panel) installed on
23 your Grafana instance
24 - [Pie Chart Panel](https://grafana.com/grafana/plugins/grafana-piechart-panel/)
25 installed on your Grafana instance
26
27
28 ### Prometheus alerts
29 In `prometheus_alerts.libsonnet` you'll find a set of Prometheus
30 alert rules that should provide a decent set of default alerts for a
31 Ceph cluster. After building them with jsonnet put this file in place according to your Prometheus
32 configuration (wherever the `rules` configuration stanza points).
33
34 ### Multi-cluster support
35 Ceph-mixin supports dashboards and alerts across multiple clusters.
36 To enable this feature you need to configure the following in `config.libsonnnet`:
37
38 ```
39 showMultiCluster: true,
40 clusterLabel: '<your cluster label>',
41 ```
42
43 #### SNMP
44 Ceph provides a MIB (CEPH-PROMETHEUS-ALERT-MIB.txt) to support sending Prometheus
45 alerts through to an SNMP management platform. The translation from Prometheus
46 alert to SNMP trap requires the Prometheus alert to contain an OID that maps to
47 a definition within the MIB. When making changes to the Prometheus alert rules
48 file, developers should include any necessary changes to the MIB.
49
50 ### Building from Jsonnet
51
52 - Install [jsonnet](https://jsonnet.org/) (at least v0.18.0)
53 - By installing the package `jsonnet` in most of the distro and
54 `golang-github-google-jsonnet` in fedora
55 - Install [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler)
56
57 To rebuild all the generated files, you can run `tox -egrafonnet-fix`.
58
59 The jsonnet code located in this directory depends on some Jsonnet third party
60 libraries. To update those libraries you can run `jb update` and then update
61 the generated files using `tox -egrafonnet-fix`.