health_monitor->get_health(f, summary, (detailbl ? &detail : NULL));
- if (f)
- f->open_array_section("summary");
- health_status_t overall = HEALTH_OK;
- if (!summary.empty()) {
- while (!summary.empty()) {
- if (overall > summary.front().first)
- overall = summary.front().first;
- status.push_back(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 (f)
- f->close_section();
-
if (f) {
f->open_object_section("timechecks");
f->dump_unsigned("epoch", get_epoch());
<< ((timecheck_round%2) ? "on-going" : "finished");
}
+ health_status_t overall = HEALTH_OK;
if (!timecheck_skews.empty()) {
list<string> warns;
if (f)
ss << ",";
}
status.push_back(ss.str());
+ 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()) {
+ while (!summary.empty()) {
+ if (overall > summary.front().first)
+ overall = summary.front().first;
+ status.push_back(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 (f)
+ f->close_section();
+
stringstream fss;
fss << overall;
status.push_front(fss.str());