ceph / ceph-nagios-plugins

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

check_rgw errors #67

Closed DerDanilo closed 3 years ago

DerDanilo commented 3 years ago

1st Problem: There is no support for the --keyfile switch. All other check support it. Please add the keyfile switch.

2nd Problem:

When running the check with simple options, if fails while trying to fetch mon config:

./check_ceph_rgw --id nagios -c /etc/ceph/ceph.conf
RGW ERROR:  :: failed to fetch mon config (--no-mon-config to skip)

The option doesn't seem to be supported by the script though:

 ./check_ceph_rgw --id nagios --no-mon-config
usage: check_ceph_rgw [-h] [-d] [-B] [-e EXE] [-c CONF] [-i ID] [-n NAME] [-V]
check_ceph_rgw: error: unrecognized arguments: --no-mon-config

What to do to check RGW Gateway status?

valerytschopp commented 3 years ago

You can use the check_ceph_rgw_api instead. You should define a radosgw user nagios with the capability buckets=read, and use its access and secret keys to query the admin API.

Nagios user:

# create nagios user in radosgw
radosgw-admin user create --uid nagios --display_name "Nagios checker" --email nagios@example.com
# set the capability
radosgw-admin caps add --uid nagios --caps "buckets=read" 
# get the access_key and secret_key
radosgw-admin user info --uid nagios