HowtoCeph: Déplacer section monitoring
This commit is contained in:
parent
51cb33689c
commit
31bc33f239
80
HowtoCeph.md
80
HowtoCeph.md
|
@ -883,46 +883,6 @@ 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' | 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`
|
||||
|
||||
~~~
|
||||
# apt install python-awsauth
|
||||
# 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 <url> -a <access_key> -s <secret_key>
|
||||
~~~
|
||||
|
||||
## Clients
|
||||
|
||||
### MinIO Client
|
||||
|
@ -966,6 +926,46 @@ Pour supprimer un _bucket_ :
|
|||
mc rb <alias>/<bucket>
|
||||
```
|
||||
|
||||
# _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' | 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`
|
||||
|
||||
~~~
|
||||
# apt install python-awsauth
|
||||
# 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 <url> -a <access_key> -s <secret_key>
|
||||
~~~
|
||||
|
||||
# Troubleshooting
|
||||
|
||||
## Impossible d'ajouter un RBD à une VM
|
||||
|
|
Loading…
Reference in a new issue