CephOsdTreeText - command ceph osd tree
- class insights.parsers.ceph_osd_tree_text.CephOsdTreeText(context, extra_bad_lines=None)[source]
Bases:
CommandParser
,LegacyItemAccess
Class to parse the output of command
ceph osd tree
.The typical content is:
ID CLASS WEIGHT TYPE NAME STATUS REWEIGHT PRI-AFF -1 0.08752 root default -9 0.02917 host ceph1 2 hdd 0.01459 osd.2 up 1.00000 1.00000 5 hdd 0.01459 osd.5 up 1.00000 1.00000 -5 0.02917 host ceph2 1 hdd 0.01459 osd.1 up 1.00000 1.00000 4 hdd 0.01459 osd.4 up 1.00000 1.00000 -3 0.02917 host ceph3 0 hdd 0.01459 osd.0 up 1.00000 1.00000 3 hdd 0.01459 osd.3 up 1.00000 1.00000 -7 0 host ceph_1
Examples
>>> ceph_osd_tree_text['nodes'][0]['id'] '-1' >>> ceph_osd_tree_text['nodes'][0]['name'] 'default' >>> ceph_osd_tree_text['nodes'][0]['type'] 'root' >>> ceph_osd_tree_text['nodes'][3]['type'] 'osd'