khrpcek / check_ceph

Icinga ceph plugin
6 stars 7 forks source link

error connecting to cluster #2

Open dynamicat opened 5 years ago

dynamicat commented 5 years ago

Hi there, I get this error, can you help?

[errno 22] error connecting to the cluster Traceback (most recent call last): File "/usr/lib/nagios/plugins/check_ceph.py", line 199, in <module> checkHealth(args) File "/usr/lib/nagios/plugins/check_ceph.py", line 23, in checkHealth ceph_health_json=subprocess.check_output(["ceph --id {0} -c {1} -k {2} --format json health".format(args.id, args.conf, args.keyring)], shell=True) File "/usr/lib/python2.7/subprocess.py", line 219, in check_output raise CalledProcessError(retcode, cmd, output=output) subprocess.CalledProcessError: Command '['ceph --id icinga -c /etc/ceph/ceph02/ceph.conf -k /etc/ceph/ceph02/client.icinga2.keyring --format json health']' returned non-zero exit status 1

khrpcek commented 5 years ago

It can't connect to your ceph cluster. It could be something in your conf or keyring. What happens when you run ceph --id icinga -c /etc/ceph/ceph02/ceph.conf -k /etc/ceph/ceph02/client.icinga2.keyring --format json health at your bash prompt? The icinga2 process runs as the icinga user. Does the icinga user have read permissions to ceph.conf and client.icinga2.keyring?