]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: show full status in ceph health
authorJosh Durgin <josh.durgin@dreamhost.com>
Fri, 3 Feb 2012 02:52:16 +0000 (18:52 -0800)
committerSage Weil <sage@newdream.net>
Fri, 3 Feb 2012 18:35:50 +0000 (10:35 -0800)
HEALTH_WARN when nearfull, HEALTH_ERROR when full.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
Signed-off-by: Sage Weil <sage@newdream.net>
src/mon/PGMonitor.cc

index 624f935363f18de5d0b47fa62283d970d85176b1..2af59255c0f2c9de6063d1641d9bee4f4dc9c5d8 100644 (file)
@@ -1150,5 +1150,18 @@ enum health_status_t PGMonitor::get_health(std::ostream &ss) const
     ss << rss.str();
   }
 
+  if (pg_map.nearfull_osds.size() > 0) {
+    if (ret != HEALTH_OK)
+      ss << ", ";
+    ss << pg_map.nearfull_osds.size() << " near full osd(s)";
+    ret = HEALTH_WARN;
+  }
+  if (pg_map.full_osds.size() > 0) {
+    if (ret != HEALTH_OK)
+      ss << ", ";
+    ss << pg_map.full_osds.size() << " full osd(s)";
+    ret = HEALTH_ERR;
+  }
+
   return ret;
 }