dump_config_line($icinga2_cfg, "\t\t$custom_key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
}
dump_config_line($icinga2_cfg, "\t},");
+
+ dump_config_line($icinga2_cfg, "\tmacros += {");
+ foreach my $custom_key (keys %{$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) {
+ if ($custom_key =~ /^_/) {
+ next;
+ }
+
+ my $key = substr($custom_key, 1);
+ dump_config_line($icinga2_cfg, "\t\t_SERVICE$key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
+ }
+ dump_config_line($icinga2_cfg, "\t},");
}
dump_config_line($icinga2_cfg, "");
dump_config_line($icinga2_cfg, "\t\t$custom_key = \"$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
}
dump_config_line($icinga2_cfg, "\t},");
+
+ dump_config_line($icinga2_cfg, "\tmacros += {");
+ foreach my $custom_key (keys %{$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) {
+ if ($custom_key =~ /^_/) {
+ next;
+ }
+
+ my $key = substr($custom_key, 1);
+ dump_config_line($icinga2_cfg, "\t\t_HOST$key = \"$host_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
+ }
+ dump_config_line($icinga2_cfg, "\t},");
}
####################################################
dump_config_line($icinga2_cfg, "\t\t\t$custom_key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
}
dump_config_line($icinga2_cfg, "\t\t},");
+
+ dump_config_line($icinga2_cfg, "\t\tmacros += {");
+ foreach my $custom_key (keys %{$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) {
+ if ($custom_key =~ /^_/) {
+ next;
+ }
+
+ my $key = substr($custom_key, 1);
+ dump_config_line($icinga2_cfg, "\t\t\t_SERVICE$key = \"$service_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
+ }
+ dump_config_line($icinga2_cfg, "\t\t},");
}
dump_config_line($icinga2_cfg, "\t},");
dump_config_line($icinga2_cfg, "\t\t$custom_key = \"$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
}
dump_config_line($icinga2_cfg, "\t},");
+
+ dump_config_line($icinga2_cfg, "\tmacros += {");
+ foreach my $custom_key (keys %{$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}}) {
+ if ($custom_key =~ /^_/) {
+ next;
+ }
+
+ my $key = substr($custom_key, 1);
+ dump_config_line($icinga2_cfg, "\t\t_CONTACT$key = \"$user_2x->{'__I2CONVERT_CUSTOM_ATTR'}->{$custom_key}\",");
+ }
+ dump_config_line($icinga2_cfg, "\t},");
}
dump_config_line($icinga2_cfg, "");