From 09f2af28b5a146835ab23722e8b01046759bfa64 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Thu, 22 Dec 2022 10:46:14 +0100 Subject: [PATCH] HowtoCeph: Ajouter notes pour monitoring --- HowtoCeph.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/HowtoCeph.md b/HowtoCeph.md index 14f0bf0c..fc9a866a 100644 --- a/HowtoCeph.md +++ b/HowtoCeph.md @@ -883,6 +883,45 @@ Pour vérifier si le quota est bien défini : […] ~~~ +## _Monitoring_ + +Un ensemble de [_plugins_ Nagios pour Ceph](https://github.com/ceph/ceph-nagios-plugins) sont fournis par Ceph sur Github. + +Tous les _checks_ sont utilisables _out of the box_ dès qu’on a créé un utilisateur dédié au _monitoring_. + +~~~ +# ceph auth get-or-create client.nagios mon 'allow r' | sudo -u nagios tee /etc/ceph/ceph.client.nagios.keyring +# chgrp nagios /etc/ceph/ceph.client.nagios.keyring +# chmod g+r /etc/ceph/ceph.client.nagios.keyring +~~~ + +Deux _checks_ ont besoin d’ajustements pour fonctionner correctement : `check_ceph_rgw` et `check_ceph_rgw_api`. + +### `check_ceph_rgw` + +Le dépôt Github des _plugins_ Nagios pour Ceph indique de créer un utilisateur Ceph avec seulement les droits d’écriture pour les moniteurs. Le _check_ ne fonctionnera pas avec ces permissions. Le _check_ retournera une erreur de ce genre : + +~~~ +RGW ERROR: :: 2022-01-31 12:34:56.789012 1234567890ab 0 failed reading realm info: ret -1 (1) Operation not permitted +couldn't init storage provider +~~~ + +Pour contourner le problème, il faut ajouter `rx` pour les OSD : + +~~~ +# ceph auth caps client.nagios mon 'allow r' osd 'allow rx' +~~~ + +Aussi, ce _check_, contrairement aux autres, ne permet pas de spécifier le chemin du fichier `.keyring`, il faut donc donc le placer fichier ici : `/etc/ceph/ceph.client.nagios.keyring`. + +### `check_ceph_rgw_api` + +~~~ +# radosgw-admin user create --uid=nagios --display-name='Monitoring user' +# radosgw-admin caps add --uid=nagios --caps="buckets=read" +# sudo -u nagios /usr/local/lib/nagios/plugins/check_ceph_rgw_api -H -a -s +~~~ + ## Clients ### MinIO Client