first commit!
diff --git a/cvp_checks/tests/ceph/__pycache__/test_ceph.cpython-27-PYTEST.pyc b/cvp_checks/tests/ceph/__pycache__/test_ceph.cpython-27-PYTEST.pyc
new file mode 100644
index 0000000..c0451ed
--- /dev/null
+++ b/cvp_checks/tests/ceph/__pycache__/test_ceph.cpython-27-PYTEST.pyc
Binary files differ
diff --git a/cvp_checks/tests/ceph/__pycache__/test_ceph_haproxy.cpython-27-PYTEST.pyc b/cvp_checks/tests/ceph/__pycache__/test_ceph_haproxy.cpython-27-PYTEST.pyc
new file mode 100644
index 0000000..71abde3
--- /dev/null
+++ b/cvp_checks/tests/ceph/__pycache__/test_ceph_haproxy.cpython-27-PYTEST.pyc
Binary files differ
diff --git a/cvp_checks/tests/ceph/config.yaml b/cvp_checks/tests/ceph/config.yaml
new file mode 100644
index 0000000..bfc8e70
--- /dev/null
+++ b/cvp_checks/tests/ceph/config.yaml
@@ -0,0 +1,3 @@
+---
+ceph_monitors: ['ceph-003*', 'ceph-004*', 'ceph-005*']
+ceph_osd_probe_node: ['ceph-001*']
diff --git a/cvp_checks/tests/ceph/test_ceph.py b/cvp_checks/tests/ceph/test_ceph.py
new file mode 100644
index 0000000..05a61c2
--- /dev/null
+++ b/cvp_checks/tests/ceph/test_ceph.py
@@ -0,0 +1,11 @@
+from cvp_checks import utils
+
+
+def test_check_ceph_osd(local_salt_client):
+ config = utils.get_configuration(__file__)
+ osd_fail = \
+ local_salt_client.cmd(config["ceph_osd_probe_node"][0], 'cmd.run',
+ ['ceph osd tree | grep down'])
+ assert not osd_fail.values()[0], \
+ "Some osds are in down state or ceph is not found".format(
+ osd_fail.values()[0])
diff --git a/cvp_checks/tests/ceph/test_ceph_haproxy.py b/cvp_checks/tests/ceph/test_ceph_haproxy.py
new file mode 100644
index 0000000..2f2e1e0
--- /dev/null
+++ b/cvp_checks/tests/ceph/test_ceph_haproxy.py
@@ -0,0 +1,21 @@
+from cvp_checks import utils
+
+
+def test_ceph_haproxy(local_salt_client):
+ config = utils.get_configuration(__file__)
+
+ fail = {}
+
+ for monitor in config["ceph_monitors"]:
+ monitor_info = local_salt_client.cmd(monitor, 'cmd.run',
+ ["echo 'show stat' | nc -U "
+ "/var/run/haproxy/admin.sock | "
+ "grep ceph_mon_radosgw_cluster"])
+
+ for name, info in monitor_info.iteritems():
+ if "OPEN" and "UP" in info:
+ continue
+ else:
+ fail[name] = info
+
+ assert not fail, "Failed monitors: {}".format(fail)