NRPE: check_ceph_status raised unknown exception '<class 'KeyError'>'

Bug #1756858 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ceph Monitor Charm
New
Undecided
Unassigned

Bug Description

Looks like there is no key as status_data['health']['summary'] at least with Luminous.

[nagios status]
juju-juju-c9bc68-0-lxd-2-ceph

 UNKNOWN 2018-03-19 11:35:41 0d 3h 9m 29s 4/4 check_ceph_status raised unknown exception '<class 'KeyError'>'

# /usr/local/lib/nagios/plugins/check_ceph_status.py -f /var/lib/nagios/cat-ceph-status.txt --degraded_thresh 1 --misplaced_thresh 10 --recovery_rate 1
check_ceph_status raised unknown exception '<class 'KeyError'>'
============================================================
Traceback (most recent call last):
  File "/usr/local/lib/nagios/plugins/check_ceph_status.py", line 183, in main
    msg = check_ceph_status(args)
  File "/usr/local/lib/nagios/plugins/check_ceph_status.py", line 117, in check_ceph_status
    for status in status_data['health']['summary']:
KeyError: 'summary'
============================================================

# ceph --version
ceph version 12.2.1 (3e7492b9ada8bdc9a5cd0feafd42fbca27f9c38e) luminous (stable)

# ceph status --format json-pretty | head -n 20

{
    "fsid": "e20740ce-2b4c-11e8-af92-00163e532d94",
    "health": {
        "checks": {},
        "status": "HEALTH_OK",
        "overall_status": "HEALTH_WARN"
    },
    "election_epoch": 10,
    "quorum": [
        0,
        1,
        2
    ],
    "quorum_names": [
        "juju-c9bc68-0-lxd-2",
        "juju-c9bc68-1-lxd-2",
        "juju-c9bc68-12-lxd-2"
    ],
    "monmap": {

Tags: cpe-onsite
Revision history for this message
Nobuto Murata (nobuto) wrote :

Looks like https://review.openstack.org/#/c/562133/ tries to address this one as well. So marking it as a duplicate.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.