[icinga-checkins] icinga.org: icinga2/mfriedrich/config: ConfigConvert: fix service linking not unique, add hostgroup->members re-link to host-> hostgroups

git at icinga.org git at icinga.org
Mon Apr 8 11:20:15 CEST 2013

Module: icinga2
Branch: mfriedrich/config
Commit: 4ca947a5877a8601cbe4c822b6ffcf95958ccda7
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=4ca947a5877a8601cbe4c822b6ffcf95958ccda7

Author: Michael Friedrich <michael.friedrich at netways.de>
Date:   Thu Apr  4 21:33:54 2013 +0200

ConfigConvert: fix service linking not unique, add hostgroup->members re-link to host->hostgroups

while working on the missing servicegroups and their facepalm members
syntax (host1,svc1,host2,svc2 - awesome to parse), i figured that the
whole detection of services by their attribute 'service_description' is
not uniquely implemented. now the getter functions are duplicated, and
not modular anymore, for the sake of having a service identified by its
host_name + service_description. since that lookup is recursive, we must
pass the host_name from the very beginning - otherwise we could
accidently overwrite that with a template entry.

the hostgroup re-linking works, also thanks to the fact that the inner
object structure is just an array in the hashref, which allows smart

contact/user groups are tricky again due to the different naming.

further todo: sort all macros and hostservice links. right now this
looks like chaos.

refs #2743


 contrib/configconvert/Icinga2/Convert.pm        |  139 ++++++++++++++++++++---
 contrib/configconvert/Icinga2/DumpIcinga2Cfg.pm |    1 +
 2 files changed, 122 insertions(+), 18 deletions(-)

Diff:   https://git.icinga.org/?p=icinga2.git;a=commitdiff;h=4ca947a5877a8601cbe4c822b6ffcf95958ccda7

More information about the icinga-checkins mailing list