Skip to content

Commit

Permalink
Use "cluster-zone" command to check agent hosts
Browse files Browse the repository at this point in the history
refs #7248
  • Loading branch information
gunnarbeutner committed Oct 29, 2014
1 parent 1c79503 commit 93da4ba
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/cli/agentupdateconfigcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,13 @@ int AgentUpdateConfigCommand::Run(const boost::program_options::variables_map& v
Dictionary::Ptr host_attrs = make_shared<Dictionary>();
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>();
host_imports->Add("agent-host"); //default host agent template
Expand Down

0 comments on commit 93da4ba

Please sign in to comment.