centreon / nagiosToCentreon

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

Nagios 3.5.3 Import to Centreon 2.8.17 #50

Open Meistercoach83 opened 6 years ago

Meistercoach83 commented 6 years ago

Hello! I tried to Import the configuration from a new nagios Server to our centreon Server, but I´m getting the following error:

Use of uninitialized value in concatenation (.) or string at nagios_reader_to_centreon_clapi.pl line 480.

lpinsivy commented 6 years ago

Hi,

Can you give us:

Regards,

Meistercoach83 commented 6 years ago

Nagios Core: 3.5.3 @Nagios.zip

lpinsivy commented 6 years ago

Can you try to modify line 477:

if (defined($service->{'name'})) { push @{$clapi{STPL}}, "STPL;ADD;".$OPTION{'prefix'}.$service->{'name'}.";".$service->{'service_description'}.";".(defined($service->{'use'}) ? $OPTION{'prefix'}.$service->{'use'} : $default_stpl) };

by:

if (defined($service->{'name'})) { push @{$clapi{STPL}}, "STPL;ADD;".$OPTION{'prefix'}.$service->{'name'}.";".(defined($service->{'service_description'}) ? $service->{'service_description'} : $service->{'name'}).";".(defined($service->{'use'}) ? $OPTION{'prefix'}.$service->{'use'} : $default_stpl) };

Meistercoach83 commented 6 years ago

Great, it worked. Sorry for the late Reply, i was ill :-(

Meistercoach83 commented 6 years ago

Sorry, but when I try to Import the data now, I´m getting errors starting from Line 100 : Object not found:icon_image;srvlfsvir03.PNG

HOST;setparam;srvlfsvir03;icon_image;srvlfsvir03.PNG

Where do i have to declare the Icons?

lpinsivy commented 6 years ago

You can synchronise your media using this chapter of the Centreon documentation

ghost commented 6 years ago

hey brother, i have an other problem of migration . i want to import my nagios config to centreon using centreon clapi. => in my directory /usr/local/nagios/etc i have my files of configuration nagios.cfg ..... look at the pictures attached. thank you very much for your help sir. centreon_clapi nagios configuration nagiostocentreon