health_monitor->get_health(f, summary, (detailbl ? &detail : NULL));
- if (f)
- f->open_array_section("summary");
- stringstream ss;
- health_status_t overall = HEALTH_OK;
- if (!summary.empty()) {
- ss << ' ';
- while (!summary.empty()) {
- if (overall > summary.front().first)
- overall = summary.front().first;
- ss << summary.front().second;
- if (f) {
- f->open_object_section("item");
- f->dump_stream("severity") << summary.front().first;
- f->dump_string("summary", summary.front().second);
- f->close_section();
- }
- summary.pop_front();
- if (!summary.empty())
- ss << "; ";
- }
- }
- if (f)
- f->close_section();
-
if (f) {
f->open_object_section("timechecks");
f->dump_int("epoch", get_epoch());
<< ((timecheck_round%2) ? "on-going" : "finished");
}
+ stringstream ss;
+ health_status_t overall = HEALTH_OK;
if (!timecheck_skews.empty()) {
list<string> warns;
if (f)
if (!warns.empty())
ss << ",";
}
+ summary.push_back(make_pair(HEALTH_WARN, "Monitor clock skew detected "));
}
if (f)
f->close_section();
if (f)
f->close_section();
+ if (f)
+ f->open_array_section("summary");
+ if (!summary.empty()) {
+ ss << ' ';
+ while (!summary.empty()) {
+ if (overall > summary.front().first)
+ overall = summary.front().first;
+ ss << summary.front().second;
+ if (f) {
+ f->open_object_section("item");
+ f->dump_stream("severity") << summary.front().first;
+ f->dump_string("summary", summary.front().second);
+ f->close_section();
+ }
+ summary.pop_front();
+ if (!summary.empty())
+ ss << "; ";
+ }
+ }
+ if (f)
+ f->close_section();
+
stringstream fss;
fss << overall;
status = fss.str() + ss.str();