@@ -8,6 +8,8 @@ You can use the Grafana dashboards and alerts with Jsonnet like any other
88prometheus mixin. You can find more resources about mixins in general on
99[ monitoring.mixins.dev] ( https://monitoring.mixins.dev/ ) .
1010
11+ -------
12+
1113### Grafana dashboards for Ceph
1214In ` dashboards_out ` you can find a collection of
1315[ Grafana] ( https://grafana.com/grafana ) dashboards for Ceph Monitoring.
@@ -18,25 +20,20 @@ plugin](http://docs.ceph.com/en/latest/mgr/prometheus/) and the
1820[ node_exporter (0.17.0)] ( https://github.com/prometheus/node_exporter ) .
1921
2022
21- ##### Recommended versions:
22- -grafana 8.3.5
23- -grafana-piechart-panel 1.6.2
24- -grafana-status-panel 1.0.11
25-
26- #### Requirements
27-
28- - [ Status Panel] ( https://grafana.com/plugins/vonage-status-panel ) installed on
29- your Grafana instance
30- - [ Pie Chart Panel] ( https://grafana.com/grafana/plugins/grafana-piechart-panel/ )
31- installed on your Grafana instance
32-
33-
3423### Prometheus alerts
3524In ` prometheus_alerts.libsonnet ` you'll find a set of Prometheus
3625alert rules that should provide a decent set of default alerts for a
3726Ceph cluster. After building them with jsonnet put this file in place according to your Prometheus
3827configuration (wherever the ` rules ` configuration stanza points).
3928
29+
30+ ### SNMP
31+ Ceph provides a MIB (CEPH-PROMETHEUS-ALERT-MIB.txt) to support sending
32+ Prometheus alerts to an SNMP management platform. The translation from
33+ Prometheus alert to SNMP trap requires the Prometheus alert to contain an OID
34+ that maps to a definition within the MIB. When making changes to the Prometheus
35+ alert rules file, developers should include any necessary changes to the MIB.
36+
4037### Multi-cluster support
4138Ceph-mixin supports dashboards and alerts across multiple clusters.
4239To enable this feature you need to configure the following in ` config.libsonnnet ` :
@@ -45,38 +42,56 @@ To enable this feature you need to configure the following in `config.libsonnnet
4542showMultiCluster: true,
4643clusterLabel: '<your cluster label>',
4744```
45+ ----------------
4846
49- ##### Recommended versions:
50- -prometheus v2.33.4
47+ ### Building from Jsonnet
5148
52- #### SNMP
53- Ceph provides a MIB (CEPH-PROMETHEUS-ALERT-MIB.txt) to support sending
54- Prometheus alerts to an SNMP management platform. The translation from
55- Prometheus alert to SNMP trap requires the Prometheus alert to contain an OID
56- that maps to a definition within the MIB. When making changes to the Prometheus
57- alert rules file, developers should include any necessary changes to the MIB.
49+ #### Method 1: System Packages (Recommended for most users)
5850
51+ ``` bash
52+ sudo dnf install jsonnet jsonnet-bundler # RHEL/Fedora
53+ sudo apt-get install jsonnet jsonnet-bundler # Ubuntu/Debian
5954
60- ##### Recommended:
61- -alertmanager 0.16.2
55+ # Install dependencies
56+ jb install
6257
63- ### Building from Jsonnet
58+ # Generate all dashboards and alerts
59+ make generate
60+
61+ # Run tests
62+ make test
63+ ```
6464
65- - Install [ jsonnet] ( https://jsonnet.org/ ) (at least v0.18.0)
66- - By installing the package ` jsonnet ` in most of the distro and
67- ` golang-github-google-jsonnet ` in fedora
68- - Install [ jsonnet-bundler] ( https://github.com/jsonnet-bundler/jsonnet-bundler )
65+ #### Method 2: Local Build (For CI/CD or no root access)
6966
70- To rebuild all the generated files, you can run ` tox -egrafonnet-fix ` .
67+ ``` bash
68+ ./jsonnet-bundler-build.sh
7169
72- The jsonnet code located in this directory depends on some Jsonnet third party
73- libraries. To update those libraries you can run ` jb update ` and then update
74- the generated files using ` tox -egrafonnet-fix ` .
70+ # Install dependencies using local jb
71+ ./jb install
7572
76- ### Building alerts from ` prometheus_alerts.libsonnet `
73+ # Generate all dashboards and alerts
74+ make generate
7775
78- To rebuild the ` prometheus_alerts.yml ` file from the corresponding libsonnet,
79- you can run ` tox -ealerts-fix ` .
76+ # Run tests
77+ make test
78+ ```
79+
80+ ### Ceph Mixin Development Commands
8081
82+ ``` bash
83+ make all # Format, generate, lint, and test
84+ make fmt # Format Jsonnet files
85+ make generate # Regenerate JSON dashboards and alerts from templates
86+ make lint # Run linters
87+ make test # Run all tests
88+ make vendor # Install dependencies
89+ make help # List all available commands
90+ ```
8191
82- ##### Any upgrade or downgrade to different major versions of the recommended tools mentioned above is not supported.
92+ ### Supported Versions
93+ * jsonnet: v0.18.0+
94+ * jsonnet-builder: 0.4.0+
95+ * grafonnet-lib: always uses latest ` master ` branch
96+ * alertmanager: 0.16.2+
97+ * prometheus: v2.33.4+
0 commit comments