Hi,

Am 12.05.2015 um 10:20 schrieb Pascal den Bekker:
Hello,

we are planning to upgrade to icinga 2, and we are testing the
migration script: https://github.com/icinga/icinga2-migration.
Somehow I am getting an odd Error:

//---------------------------------------------------
//Migrate Icinga 1.x configuration to Icinga 2 format
//Start time: 2015-05-12 08:12:34
//---------------------------------------------------
//ERROR: Object: no key found ('name' or 'hostgroup_name') for type
'hostgroup'.
object(Icinga\Module\Conftool\Icinga\IcingaHostgroup)#4039 (7) {
  ["key":protected]=>
  string(14) "hostgroup_name"
  ["_own_services":protected]=>
  array(0) {
  }
  ["_not_services":protected]=>
  array(0) {
  }
  ["props":protected]=>
  object(stdClass)#4040 (0) {
  }
  ["_parents":protected]=>
  array(0) {
  }
  ["is_template":protected]=>
  bool(false)
  ["type":protected]=>
  string(9) "hostgroup"
}
PHP Catchable fatal error:  Method
Icinga\Module\Conftool\Icinga\IcingaHostgroup::__toString() must
return a string value in
/data/icinga2-migration-master/modules/conftool/library/Conftool/Icinga/IcingaConfig.php
on line 360

Catchable fatal error: Method
Icinga\Module\Conftool\Icinga\IcingaHostgroup::__toString() must
return a string value in
/data/icinga2-migration-master/modules/conftool/library/Conftool/Icinga/IcingaConfig.php
on line 360

I looked through all the config files, and everywhere there is either
a name of hostgroup_name definied for the hostgroups..
Could someone help me with this problem ??

Probably your old configuration object is invalid, and the parser
detects that correctly. You could try editing line 360 and dump the
object to analyze it further.

I wouldn't go that direction to be honest. I've hacked the migration
script a few days before the 2.0.0 release. Mainly because everyone was
screaming for such a script. Given that we've added many many
configuration language enhancements until 2.3 - next to apply and
command arguments already provided - you might use that script for
education and learning purposes but not for production environments.
We've learned over the past year that no-one really uses it, but people
start over and do really really cool things with apply and so on.

I'd recommend throwing it away, and *learn* the configuration language
Icinga 2 provides. The documentation evolved pretty much over the past
year, and it is a steep learning curve - from creating hosts, applying
services/notifications/dependencies, pushing custom attributes as
command arguments, and much more.

If you want to fix the migration script, feel free to do so. But I don't
think that you'll learn to love and maintain Icinga 2.

Ask others on this list and other community channels if they feel the same.

Kind regards,
Michael


Thnx,

- Pascal


_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users


-- 
Michael Friedrich, DI (FH)
Application Developer

NETWAYS GmbH | Deutschherrnstr. 15-19 | D-90429 Nuernberg
Tel: +49 911 92885-0 | Fax: +49 911 92885-77
GF: Julian Hein, Bernd Erk | AG Nuernberg HRB18461
http://www.netways.de | [email protected]

** OSBConf 2015 - September - osbconf.org **
** OSMC 2015 - November - netways.de/osmc **
_______________________________________________
icinga-users mailing list
[email protected]
https://lists.icinga.org/mailman/listinfo/icinga-users

Reply via email to