rcbops / rpc-maas

Ansible playbooks for deploying Rackspace Monitoring-as-a-Service within Openstack Environments
Apache License 2.0
32 stars 68 forks source link

fixes for status output changes in octopus #733

Closed mattkleifgen closed 2 years ago

mattkleifgen commented 2 years ago

In ceph octopus the mon quorum details have been removed from the status output, the mon check simply looks for the local name in the list of mon quorum hosts rather than extract it's rank and check for that rank in the mon quorum list. The rank is no longer available.

The osdmap data has been flattened in the json output as seen below. It was [osdmap][osdmap][attributes], but has been flattened in octopus to [osdmap][attributes].

Ticket https://core.rackspace.com/py/ticket/view.pt?ref_no=211222-05538 contains an example alert without this patch applied.

ceph octopus output: root@1170870-ceph1:/usr/lib/rackspace-monitoring-agent/plugins# ceph status -f json-pretty

{ "fsid": "2bc8eebb-5bad-4988-9319-98ff964d6dde", "health": { "status": "HEALTH_OK", "checks": {}, "mutes": [] }, "election_epoch": 142, "quorum": [ 0, 1, 2 ], "quorum_names": [ "1170870-ceph1", "1170871-ceph2", "1170872-ceph3" ], "quorum_age": 19237, "monmap": { "epoch": 2, "min_mon_release_name": "octopus", "num_mons": 3 }, "osdmap": { "epoch": 20991, "num_osds": 100, "num_up_osds": 100, "osd_up_since": 1640193950, "num_in_osds": 100, "osd_in_since": 1638158073, "num_remapped_pgs": 0 }, ...

ceph nautilus and previous

root@ceph-ads-1:~# ceph status -f json-pretty

{ "fsid": "144c448e-db76-44fd-a5ee-8249f346e231", "health": { "checks": {}, "status": "HEALTH_OK", "overall_status": "HEALTH_WARN" }, "election_epoch": 350, "quorum": [ 0, 1, 2 ], "quorum_names": [ "ceph-ads-1", "ceph-ads-2", "ceph-ads-3" ], "monmap": { "epoch": 3, "fsid": "144c448e-db76-44fd-a5ee-8249f346e231", "modified": "2020-10-19 22:46:12.892533", "created": "2017-04-20 13:51:22.831365", "features": { "persistent": [ "kraken", "luminous", "mimic", "osdmap-prune" ], "optional": [] }, "mons": [ { "rank": 0, "name": "ceph-ads-1", "addr": "10.64.96.14:6789/0", "public_addr": "10.64.96.14:6789/0" }, { "rank": 1, "name": "ceph-ads-2", "addr": "10.64.96.15:6789/0", "public_addr": "10.64.96.15:6789/0" }, { "rank": 2, "name": "ceph-ads-3", "addr": "10.64.96.16:6789/0", "public_addr": "10.64.96.16:6789/0" } ] }, "osdmap": { "osdmap": { "epoch": 346980, "num_osds": 244, "num_up_osds": 244, "num_in_osds": 244, "num_remapped_pgs": 0 } }, ....