ceph/monitoring/ceph-mixin
Rishabh Dave a6f5efb620 monitoring: mention PyYAML only once in requirements
Following error occurs while running "sudo install-deps.sh" -
ERROR: Double requirement given: PyYAML==6.0 (from -r requirements-lint.txt (line 5)) (already in pyyaml (from -r requirements-alerts.txt (line 1)), name='PyYAML')

PyYAML is mentioned twice as a requirement. It is mentioned once in both
the following files -
monitoring/ceph-mixin/requirements-lint.txt
monitoring/ceph-mixin/requirements-alerts.txt

These requirements were added in commits
44d3e4c264506154373ffaeb13d6c924c580e6b5 and
4750ac0d7766a8a089adf073415af0ac0d3f81d9.

Fixes: https://tracker.ceph.com/issues/54185
Signed-off-by: Rishabh Dave <ridave@redhat.com>
2022-02-08 11:19:15 +05:30
..
dashboards
dashboards_out
tests_alerts cephadm: change shared_folder directory for prometheus and grafana 2022-02-07 16:34:37 +05:30
tests_dashboards
.gitignore
.pylintrc
alerts.libsonnet cephadm: change shared_folder directory for prometheus and grafana 2022-02-07 16:34:37 +05:30
CMakeLists.txt monitoring: build jsonnet/jb only for testing 2022-02-03 13:08:37 +01:00
config.libsonnet
dashboards.jsonnet
jsonnet-build.sh monitoring: build jsonnet/jb only for testing 2022-02-03 13:08:37 +01:00
jsonnet-bundler-build.sh monitoring: build jsonnet/jb only for testing 2022-02-03 13:08:37 +01:00
jsonnetfile.json
jsonnetfile.lock.json
lint-jsonnet.sh
Makefile
mixin.libsonnet
prometheus_alerts.yml cephadm: change shared_folder directory for prometheus and grafana 2022-02-07 16:34:37 +05:30
README.md cephadm: change shared_folder directory for prometheus and grafana 2022-02-07 16:34:37 +05:30
requirements-alerts.txt monitoring: mention PyYAML only once in requirements 2022-02-08 11:19:15 +05:30
requirements-grafonnet.txt
requirements-lint.txt
test-jsonnet.sh
tox.ini cephadm: change shared_folder directory for prometheus and grafana 2022-02-07 16:34:37 +05:30

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 directory and alerts in the prometheus_alerts.yml file.

You can use the Grafana dashboards and alerts with Jsonnet like any other prometheus mixin. You can find more ressources about mixins in general on monitoring.mixins.dev.

Grafana dashboards for Ceph

In dashboards_out you can find a collection of Grafana dashboards for Ceph Monitoring.

These dashboards are based on metrics collected from prometheus scraping the prometheus mgr plugin and the node_exporter.

Requirements

Prometheus alerts

In prometheus_alerts.yml you'll find a set of Prometheus alert rules that should provide a decent set of default alerts for a Ceph cluster. Just put this file in a place according to your Prometheus configuration (wherever the rules configuration stanza points).

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

  • Install jsonnet (at least v0.18.0)
    • By installing the package jsonnet in most of the distro and golang-github-google-jsonnet in fedora
  • Install 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.