Mimic (13.x) is even more interesting in that it has both variables, but overall_status shows HEALTH_WARN even when status = HEALTH_OK. This may be a holdover in the mon state database.
Mimic health output when ceph status shows health_ok:
I think either we need to find out the minor subversion of ceph that contains the update to status, or change the charm to check for existence of status as an element of the health dictionary, and use it, otherwise fall back to overall_status.
This appeared on my cloud I was upgrading today.
It appears that the xenial-pike version of luminous still uses health. overall_ status.
# ceph status -f json-pretty
{
"overall_ status" : "HEALTH_OK",
"fsid": "mysecret",
"health": {
"summary": [],
"detail": []
},
*snip*
# ceph version 5f5121a76d62884 29f35e4e77b) luminous (stable) 0ubuntu0. 17.10.1~ cloud0 0ubuntu0. 17.10.1~ cloud0 0ubuntu0. 17.10.1~ cloud0 500 ubuntu- cloud.archive. canonical. com/ubuntu xenial- updates/ pike/main amd64 Packages dpkg/status 2.11-0ubuntu0. 16.04.1 500 archive. ubuntu. com/ubuntu xenial-updates/main amd64 Packages 1.2-0ubuntu1 500 archive. ubuntu. com/ubuntu xenial/main amd64 Packages
ceph version 12.2.4 (52085d5249a80c
# apt-cache policy ceph-common
ceph-common:
Installed: 12.2.4-
Candidate: 12.2.4-
Version table:
*** 12.2.4-
500 http://
100 /var/lib/
10.
500 http://
10.
500 http://
$ sudo /usr/local/ lib/nagios/ plugins/ check_ceph_ status. py -f /var/lib/ nagios/ cat-ceph- status. txt
WARNING:
Mimic (13.x) is even more interesting in that it has both variables, but overall_status shows HEALTH_WARN even when status = HEALTH_OK. This may be a holdover in the mon state database.
Mimic health output when ceph status shows health_ok:
"health": {
"overall_ status" : "HEALTH_WARN"
"checks": {},
"status": "HEALTH_OK",
},
I think either we need to find out the minor subversion of ceph that contains the update to status, or change the charm to check for existence of status as an element of the health dictionary, and use it, otherwise fall back to overall_status.