mirror of https://github.com/Icinga/icinga2.git
Rename templates "agent-{host,service}" to "satellite-{host,service}"
refs #7525
This commit is contained in:
parent
086eeea66f
commit
2ab43a63cb
|
@ -4,26 +4,26 @@
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides settings for agent hosts managed by 'icinga2 repository'.
|
* Provides settings for satellite hosts managed by 'icinga2 repository'.
|
||||||
* Define your global agent attributes here, for example custom
|
* Define your global attributes here, for example custom
|
||||||
* attributes used for notifications, etc.
|
* attributes used for notifications, etc.
|
||||||
*/
|
*/
|
||||||
template Host "agent-host" {
|
template Host "satellite-host" {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides settings for agent services managed by 'icinga2 repository'.
|
* Provides settings for satellite services managed by 'icinga2 repository'.
|
||||||
* Define your global agent attributes here, for example custom
|
* Define your global satellite attributes here, for example custom
|
||||||
* attributes used for notifications, etc.
|
* attributes used for notifications, etc.
|
||||||
*/
|
*/
|
||||||
template Service "agent-service" {
|
template Service "satellite-service" {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
apply Dependency "agent-host" to Host {
|
apply Dependency "satellite-host" to Host {
|
||||||
parent_host_name = host.zone
|
parent_host_name = host.zone
|
||||||
|
|
||||||
assign where host.zone != "" && "agent-host" in host.templates
|
assign where host.zone != "" && "satellite-host" in host.templates
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,7 +104,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
|
||||||
host_attrs->Set("name", zone);
|
host_attrs->Set("name", zone);
|
||||||
host_attrs->Set("check_command", "cluster-zone");
|
host_attrs->Set("check_command", "cluster-zone");
|
||||||
Array::Ptr host_imports = make_shared<Array>();
|
Array::Ptr host_imports = make_shared<Array>();
|
||||||
host_imports->Add("node-host"); //default host node template
|
host_imports->Add("satellite-host"); //default host node template
|
||||||
host_attrs->Set("import", host_imports);
|
host_attrs->Set("import", host_imports);
|
||||||
|
|
||||||
if (!RepositoryUtility::AddObject(zone, "Host", host_attrs)) {
|
if (!RepositoryUtility::AddObject(zone, "Host", host_attrs)) {
|
||||||
|
@ -159,7 +159,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
|
||||||
}
|
}
|
||||||
|
|
||||||
Array::Ptr host_imports = make_shared<Array>();
|
Array::Ptr host_imports = make_shared<Array>();
|
||||||
host_imports->Add("node-host"); //default host node template
|
host_imports->Add("satellite-host"); //default host node template
|
||||||
host_attrs->Set("import", host_imports);
|
host_attrs->Set("import", host_imports);
|
||||||
|
|
||||||
if (!RepositoryUtility::AddObject(host, "Host", host_attrs)) {
|
if (!RepositoryUtility::AddObject(host, "Host", host_attrs)) {
|
||||||
|
@ -213,7 +213,7 @@ int NodeUpdateConfigCommand::Run(const boost::program_options::variables_map& vm
|
||||||
service_attrs->Set("zone", zone);
|
service_attrs->Set("zone", zone);
|
||||||
|
|
||||||
Array::Ptr service_imports = make_shared<Array>();
|
Array::Ptr service_imports = make_shared<Array>();
|
||||||
service_imports->Add("node-service"); //default service node template
|
service_imports->Add("satellite-service"); //default service node template
|
||||||
service_attrs->Set("import", service_imports);
|
service_attrs->Set("import", service_imports);
|
||||||
|
|
||||||
if (!RepositoryUtility::AddObject(service, "Service", service_attrs)) {
|
if (!RepositoryUtility::AddObject(service, "Service", service_attrs)) {
|
||||||
|
|
Loading…
Reference in New Issue