1
0
Fork 0
mirror of https://github.com/munin-monitoring/contrib.git synced 2025-07-31 13:23:42 +00:00

Cater for newer OS dependencies - python and ceph updates

system default python is now usually python3 - better make our code
compliant with it

`ceph` CLI itself has some slightly different usage and outputs

jq used instead of cut in a few places, because was easier to work out
what the original commands were intending to grab, now that those
outputs have moved location.  Yes, jq is a new dependency for some of
the plugins, but it was already implicitly depended upon in ceph_osd
plugin
This commit is contained in:
Tim Connors 2023-10-16 22:51:27 +11:00
parent 9c17efc39b
commit 5b1300aebf
3 changed files with 25 additions and 22 deletions

View file

@ -50,6 +50,6 @@ fi
CEPH_STATUS=$(ceph -s --format=json)
echo "osds.value $(echo "$CEPH_STATUS" | jq '.osdmap.osdmap.num_osds')"
echo "up.value $(echo "$CEPH_STATUS" | jq '.osdmap.osdmap.num_up_osds')"
echo "in.value $(echo "$CEPH_STATUS" | jq '.osdmap.osdmap.num_in_osds')"
echo "osds.value $(echo "$CEPH_STATUS" | jq '.osdmap.num_osds')"
echo "up.value $(echo "$CEPH_STATUS" | jq '.osdmap.num_up_osds')"
echo "in.value $(echo "$CEPH_STATUS" | jq '.osdmap.num_in_osds')"