diff --git a/plugins/ceph/ceph_osd b/plugins/ceph/ceph_osd index 9d208b53..f8feaf62 100755 --- a/plugins/ceph/ceph_osd +++ b/plugins/ceph/ceph_osd @@ -44,6 +44,6 @@ if [ "$1" = "config" ]; then exit 0 fi -echo "osds.value $(ceph -s | grep osdmap | awk '{ print $3 }')" -echo "up.value $(ceph -s | grep osdmap | awk '{ print $5 }')" -echo "in.value $(ceph -s | grep osdmap | awk '{ print $7 }')" +echo "osds.value $(ceph -s --format=json | jq '.osdmap.osdmap.num_osds')" +echo "up.value $(ceph -s --format=json | jq '.osdmap.osdmap.num_up_osds')" +echo "in.value $(ceph -s --format=json | jq '.osdmap.osdmap.num_in_osds')"