centreon / nagiosToCentreon

Import your nagios config files into Centreon DB... And it rocks !
Apache License 2.0
9 stars 13 forks source link

Called hostgroup() on an object that doesn't support it #14

Closed dbonengel closed 7 years ago

dbonengel commented 8 years ago

Hi,

I try to import a Nagios configuration created by Centreon into CES. Nagios runs on a Debian system (Debian 7.9), I have installed libnagios-object-perl version 0.21.16-1, which comes with that release of Debian

Upon starting nagios_reader_to_centreon_clapi.pl, I get the following error: Called hostgroup() on an object that doesn't support it. at /usr/share/perl5/Nagios/Object.pm line 961 Nagios::Object::hostgroup_name('Nagios::Contact=HASH(0x9512b44)') called at /usr/share/perl5/Nagios/Object/Config.pm line 646 Nagios::Object::Config::get_host_list('Nagios::Contact=HASH(0x9512b44)') called at /usr/share/perl5/Nagios/Object/Config.pm line 662 Nagios::Object::Config::register('Nagios::Object::Config=HASH(0x93d11e4)', 'Nagios::Contact=HASH(0x9512b44)') called at /usr/share/perl5/Nagios/Object/Config.pm line 813 Nagios::Object::Config::register_objects('Nagios::Object::Config=HASH(0x93d11e4)') called at /usr/share/perl5/Nagios/Config.pm line 136 Nagios::Config::new('Nagios::Config', 'Filename', '/tmp/nagiosToCentreon/nagios3/nagios.cfg', 'force_relative_files', 0) called at nagios_reader_to_centreon_clapi.pl line 742

Please advice

Thanks in advance

Dirk

cgagnaire commented 7 years ago

Hi @dbonengel, Can you please try the v3-sims branch that fix your problem ? Be advise that the --config option now needs the path to the configuration files objects directory, not the nagios.cfg. Thanks!