rewrite check-ceph in ruby