a 'timechecks' section describing the time sync status. This
information is now available via the 'ceph time-sync-status'
command.
+
+* Certain extra fields in the 'ceph health' structured output that
+ used to appear if the mons were low on disk space (which duplicated
+ the information in the normal health warning messages) are now gone.
* @{
*/
void init() override { }
- void get_health(Formatter *f,
- list<pair<health_status_t,string> >& summary,
+ void get_health(list<pair<health_status_t,string> >& summary,
list<pair<health_status_t,string> > *detail) override { }
bool service_dispatch(MonOpRequestRef op) override;
}
void DataHealthService::get_health(
- Formatter *f,
list<pair<health_status_t,string> >& summary,
list<pair<health_status_t,string> > *detail)
{
dout(10) << __func__ << dendl;
- if (f) {
- f->open_object_section("data_health");
- f->open_array_section("mons");
- }
-
for (map<entity_inst_t,DataStats>::iterator it = stats.begin();
it != stats.end(); ++it) {
string mon_name = mon->monmap->get_name(it->first.addr);
if (detail)
detail->push_back(make_pair(health_status, ss.str()));
}
-
- if (f) {
- f->open_object_section("mon");
- f->dump_string("name", mon_name.c_str());
- // leave this unenclosed by an object section to avoid breaking backward-compatibility
- stats.dump(f);
- f->dump_stream("health") << health_status;
- if (health_status != HEALTH_OK)
- f->dump_string("health_detail", health_detail);
- f->close_section();
- }
- }
-
- if (f) {
- f->close_section(); // mons
- f->close_section(); // data_health
}
}
start_tick();
}
- void get_health(Formatter *f,
- list<pair<health_status_t,string> >& summary,
- list<pair<health_status_t,string> > *detail) override;
+ void get_health(
+ list<pair<health_status_t,string> >& summary,
+ list<pair<health_status_t,string> > *detail) override;
int get_type() override {
return HealthService::SERVICE_HEALTH_DATA;
services.clear();
}
-void HealthMonitor::get_health(Formatter *f,
- list<pair<health_status_t,string> >& summary,
- list<pair<health_status_t,string> > *detail)
+void HealthMonitor::get_health(
+ list<pair<health_status_t,string> >& summary,
+ list<pair<health_status_t,string> > *detail)
{
- if (f) {
- f->open_object_section("health");
- f->open_array_section("health_services");
- }
-
for (map<int,HealthService*>::iterator it = services.begin();
it != services.end();
++it) {
- it->second->get_health(f, summary, detail);
- }
-
- if (f) {
- f->close_section(); // health_services
- f->close_section(); // health
+ it->second->get_health(summary, detail);
}
}
* @{
*/
void init() override;
- void get_health(Formatter *f,
- list<pair<health_status_t,string> >& summary,
+ void get_health(list<pair<health_status_t,string> >& summary,
list<pair<health_status_t,string> > *detail) override;
bool service_dispatch(MonOpRequestRef op) override;
s->get_health(summary, detailbl ? &detail : NULL, cct);
}
- health_monitor->get_health(f, summary, (detailbl ? &detail : NULL));
+ health_monitor->get_health(summary, (detailbl ? &detail : NULL));
health_status_t overall = HEALTH_OK;
if (!timecheck_skews.empty()) {
virtual void init() { }
- virtual void get_health(Formatter *f,
- list<pair<health_status_t,string> >& summary,
+ virtual void get_health(list<pair<health_status_t,string> >& summary,
list<pair<health_status_t,string> > *detail) = 0;
virtual int get_type() = 0;
virtual string get_name() const = 0;