def check_ceph_health():

    try:
        res = subprocess.check_output(["ceph", "health"],
                                      stderr=subprocess.STDOUT)
        exit_code, message = interpret_output_health(res)
        sys.stdout.write(message)
        sys.exit(exit_code)
    except subprocess.CalledProcessError as e:
        sys.stdout.write('CEPH UNKNOWN: %s\n' % e.output)
        sys.exit(3)
    except OSError:
        sys.stdout.write('CEPH UNKNOWN: unable to launch ceph health\n')
        sys.exit(3)
Program entry point.
dataset/ETHPy150Open openstack/monitoring-for-openstack/oschecks/ceph.py/check_ceph_health