Use "cluster-zone" command to check agent hosts

refs #7248
This commit is contained in:
Gunnar Beutner 2014-10-29 07:58:34 +01:00
parent 1c79503918
commit 93da4baf8f
1 changed files with 7 additions and 2 deletions

View File

@ -118,8 +118,13 @@ int AgentUpdateConfigCommand::Run(const boost::program_options::variables_map& v
Dictionary::Ptr host_attrs = make_shared<Dictionary>(); Dictionary::Ptr host_attrs = make_shared<Dictionary>();
host_attrs->Set("__name", host); host_attrs->Set("__name", host);
host_attrs->Set("name", host); host_attrs->Set("name", host);
host_attrs->Set("check_command", "dummy");
host_attrs->Set("zone", zone); if (host == zone)
host_attrs->Set("check_command", "cluster-zone");
else {
host_attrs->Set("check_command", "dummy");
host_attrs->Set("zone", zone);
}
Array::Ptr host_imports = make_shared<Array>(); Array::Ptr host_imports = make_shared<Array>();
host_imports->Add("agent-host"); //default host agent template host_imports->Add("agent-host"); //default host agent template