mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-06 21:34:28 +02:00
parent
19b7f79bbb
commit
cfa382f0dd
@ -731,6 +731,7 @@ void StatusDataWriter::UpdateObjectsCache(void)
|
|||||||
|
|
||||||
String criteria = boost::algorithm::join(failure_criteria, ",");
|
String criteria = boost::algorithm::join(failure_criteria, ",");
|
||||||
|
|
||||||
|
/* Icinga 1.x only allows host->host, service->service dependencies */
|
||||||
if (!child_service && !parent_service) {
|
if (!child_service && !parent_service) {
|
||||||
objectfp << "define hostdependency {" "\n"
|
objectfp << "define hostdependency {" "\n"
|
||||||
"\t" "dependent_host_name" "\t" << child_host->GetName() << "\n"
|
"\t" "dependent_host_name" "\t" << child_host->GetName() << "\n"
|
||||||
@ -739,7 +740,7 @@ void StatusDataWriter::UpdateObjectsCache(void)
|
|||||||
"\t" "notification_failure_criteria" "\t" << criteria << "\n"
|
"\t" "notification_failure_criteria" "\t" << criteria << "\n"
|
||||||
"\t" "}" "\n"
|
"\t" "}" "\n"
|
||||||
"\n";
|
"\n";
|
||||||
} else {
|
} else if (child_service && parent_service){
|
||||||
|
|
||||||
objectfp << "define servicedependency {" "\n"
|
objectfp << "define servicedependency {" "\n"
|
||||||
"\t" "dependent_host_name" "\t" << child_service->GetHost()->GetName() << "\n"
|
"\t" "dependent_host_name" "\t" << child_service->GetHost()->GetName() << "\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user