ceph / ceph-nagios-plugins

Nagios plugins for Ceph
Apache License 2.0
81 stars 80 forks source link

MGR ERROR: keyring file '/etc/nagios/client.nagios.keyring' doesn't exist #48

Closed kaptenkrille closed 5 years ago

kaptenkrille commented 5 years ago

Hey!

I got some error I can't figure out, proably something easy but here goes:

When I run the command locally all works: sudo -u nrpe /usr/lib64/nagios/plugins/check_ceph_mgr -i nagios -k /etc/ceph/client.nagios.keyring -c /etc/ceph/ceph.conf MGR OK: active: mgr1, standbys: mgr2

However on the nagios I get the error "MGR ERROR: keyring file '/etc/nagios/client.nagios.keyring' doesn't exist"

/usr/local/nagios/libexec/check_nrpe -H mgr1 -c check_ceph_mgr MGR ERROR: keyring file '/etc/nagios/client.nagios.keyring' doesn't exist

sgsax commented 5 years ago

Came across this myself today. Check permissions on the keyring file. It needs to be readable by the nagios/nrpe user on the host being checked. I did this by setting the gid to nrpe and the mode to 640 on the file.