centreon / nagiosToCentreon

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

Unable to export service if servicetemplate have same name #18

Closed lpinsivy closed 8 years ago

lpinsivy commented 8 years ago

It's impossible to export a service if a service template has the same name

homer2012 commented 8 years ago

Hello,

Thanks for this update. It generate on error for me

perl nagios_reader_to_centreon_clapi.pl -S --config /etc/nagios3/nagios.cfg > /tmp/centreon_clapi_import_commands.txt Use of uninitialized value $name in exists at /usr/local/share/perl/5.10.1/Nagios/Object/Config.pm line 367. Can't call method "register" without a package or object reference at nagios_reader_to_centreon_clapi.pl line 490.

It occures at the second service :

define service{ host_name Switch Fibre1 service_description PING_SWITCHES is_volatile 0 check_period 24x7 max_check_attempts 10 normal_check_interval 5 retry_check_interval 1 contact_groups switches notification_options w,u,c,r notification_interval 960 notification_period 24x7 check_command check_ping!1000.0,50%!5000.0,100% }

define service{ host_name Switch Fibre2 service_description PING_SWITCHES is_volatile 0 check_period 24x7 max_check_attempts 10 normal_check_interval 5 retry_check_interval 1 contact_groups switches notification_options w,u,c,r notification_interval 960 notification_period 24x7 check_command check_ping!1000.0,50%!5000.0,100% }

homer2012 commented 8 years ago

for the first error, i saw your workaround at #9. Seems to work.

But i steel have the error on register line 490.

KarlisSe commented 7 years ago

Did you ever resolved your problem on register line 490? I`m encountering the same error.

homer2012 commented 7 years ago

No, finally i used this script and manualy modify the result before import.

Le ven. 25 nov. 2016 07:54, KarlisSe notifications@github.com a écrit :

Did you ever resolved your problem on register line 490? I`m encountering the same error.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/centreon/nagiosToCentreon/issues/18#issuecomment-262891878, or mute the thread https://github.com/notifications/unsubscribe-auth/AS_TQaGuNWCMHTBLh6QQ7fqrJlzNl-o6ks5rBoYngaJpZM4Iy_k7 .