]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: note scrub errors in health summary
authorSage Weil <sage@inktank.com>
Tue, 15 Jan 2013 02:23:52 +0000 (18:23 -0800)
committerSage Weil <sage@inktank.com>
Wed, 16 Jan 2013 19:21:45 +0000 (11:21 -0800)
Signed-off-by: Sage Weil <sage@inktank.com>
src/mon/PGMonitor.cc

index c679d41546873f3123e705e87c64b6b9d452a36c..5ca4bdeec446090931a7952d65dbea7aa1b2327a 100644 (file)
@@ -1329,6 +1329,15 @@ void PGMonitor::get_health(list<pair<health_status_t,string> >& summary,
   
   check_full_osd_health(summary, detail, pg_map.full_osds, "full", HEALTH_ERR);
   check_full_osd_health(summary, detail, pg_map.nearfull_osds, "near full", HEALTH_WARN);
+
+  if (pg_map.pg_sum.stats.sum.num_scrub_errors) {
+    ostringstream ss;
+    ss << pg_map.pg_sum.stats.sum.num_scrub_errors << " scrub errors";
+    summary.push_back(make_pair(HEALTH_ERR, ss.str()));
+    if (detail) {
+      detail->push_back(make_pair(HEALTH_ERR, ss.str()));
+    }
+  }
 }
 
 void PGMonitor::check_full_osd_health(list<pair<health_status_t,string> >& summary,