View Full Version : After Upgrade configuration errors
Jogarem
01-04-2008, 02:33 PM
Hi,
since my upgrade from version 1.4.1 to 1.4.2 I get an error
while reloading my configuration within Centreon.
Here is the output:
Nagios 2.5
Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
Last Modified: 07-13-2006
License: GPL
Reading configuration data...
Error: Invalid service object directive '#TEMPLATE-HOST-LINK'.
Error: Could not add object property in file '/usr/local/oreon/filesGeneration/nagiosCFG/services.cfg' on line 63.
***> The name of the main configuration file looks suspicious...
Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
I work with many templates (hosts and services) and also linkt service-templates to host-templates.
It' "Server i" in my signature.
Any ideas?
Thanks in advance
Jogi
## EDIT ##
I forgot to mention that there is an error message above the title:
Array ( [sg_id] => 1 [sg_name] => otrs_server ) Array ( [sg_id] => 1 [sg_name] => otrs_server )
See the attached screenshot (nconf.gif)
## EDIT 2 ##
just to mention: otrs_server in the above message is a service-group
.
julio
01-04-2008, 02:38 PM
no... nagios has bug with commentary. In nagios 2.9 there are no problem. very strange.
Can you send me you configuration file services.cfg by email ?
thanks
Jogarem
01-04-2008, 03:13 PM
no... nagios has bug with commentary. In nagios 2.9 there are no problem. very strange.
Can you send me you configuration file services.cfg by email ?
thanks
Could you send me your email adress via PM? I will send you then a part of the services.cfg. Thanks
Do you think it could be solved with Nagios v2.9?
I don't want to upgrade today but if this fixes the problem I have to... :neutral:
.
julio
01-04-2008, 03:28 PM
I'm testing with nagios 2.6... wait :)
Jogarem
01-04-2008, 03:37 PM
I'm testing with nagios 2.6... wait :)
Cool :cool:
Only to mention:
I have added two news and a screenshot in my first post.
julio
01-04-2008, 03:50 PM
yes I have seen thanks
Jogarem
01-07-2008, 10:21 AM
Hi julio,
any good or bad news about this?
regards
Jogarem
passie
01-08-2008, 01:09 PM
After upgrading we have the same problem.
It looks like Centreon is not getting the description field from the db to insert into the cfg files.
any help would be great.
julio
01-08-2008, 01:34 PM
I haven't this problem...
Can you copy here a service definition please ?
Thanks...
Jogarem
01-08-2008, 02:36 PM
After upgrading we have the same problem.
It looks like Centreon is not getting the description field from the db to insert into the cfg files.
any help would be great.
Hi passie,
what Nagios version do you have installed?
Jogarem
01-08-2008, 02:53 PM
Can you copy here a service definition please ?
Hi julio,
did you have tested this with your nagios v2.6?
What was the result?
Here are some lines of my services.cfg. I cutted only examples
and marked sensible data with "xxxxxx".
MY OLD working one here:
# 'generic-service' service definition 1
# ID_OREON:'9'
# 24/07/2007 - 14:15:27
define service{
name generic-service
service_description generic-service
max_check_attempts 5
normal_check_interval 5
retry_check_interval 2
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
parallelize_check 1
obsess_over_service 1
check_freshness 0
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_interval 1440
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxx-admins
stalking_options o,w,u,c
register 0
}
# 'ping_template' service definition 2
# ID_OREON:'10'
# 24#S#07#S#2007 - 14:15:27
define service{
name ping_template
service_description ping_template
is_volatile 0
check_command check_graph_ping!1500,60%!4000,80%
max_check_attempts 6
normal_check_interval 3
retry_check_interval 1
check_period 24x7
process_perf_data 1
notification_interval 1440
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxx-admins
stalking_options o,w,u,c
register 0
}
# 'sv-templ_cat-CERT_https' service definition 4
# ID_OREON:'56'
# Service template Category CERT and service check-https
define service{
name sv-templ_cat-CERT_https
service_description sv-templ_cat-CERT_https
check_command check_graph_https
max_check_attempts 1
normal_check_interval 10080
retry_check_interval 1440
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_interval 60
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxxx-users
stalking_options o,w,u,c
register 0
}
# 'sv-templ_cat-CERT_nrpeHttps' service definition 5
# ID_OREON:'57'
# Service template Category CERT and service check-nrpe-https
define service{
name sv-templ_cat-CERT_nrpeHttps
service_description sv-templ_cat-CERT_nrpeHttps
check_command check_nrpe_cert
max_check_attempts 1
normal_check_interval 10080
retry_check_interval 1440
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_interval 60
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxx-users
stalking_options o,w,u,c
register 0
}
# 'Juniper_SystemLoad' service definition 31
# ID_OREON:'68'
define service{
host_name xxxxxxxxxxxx
service_description Juniper_SystemLoad
use sv-templ_cat-SSH-SNMP_nrpeIVEload
check_command check_nrpe_juniper-load!xxxxxxxx!xxxxxxxx!5,5,5!10,10,10
}
# 'PING' service definition 32
# ID_OREON:'1'
# 24#S#07#S#2007 - 14:14:07
define service{
host_name xxxxxxx
service_description PING
use ping_template
is_volatile 0
check_command check_graph_ping!1500,60%!4000,80%
contact_groups cgroup_xxxxxxxx-admins
}
MY Centreon generated new NOT working one here:
define service{
name generic-service
service_description generic-service
max_check_attempts 5
normal_check_interval 5
retry_check_interval 2
active_checks_enabled 1
passive_checks_enabled 1
check_period 24x7
parallelize_check 1
obsess_over_service 1
check_freshness 0
event_handler_enabled 1
flap_detection_enabled 1
process_perf_data 1
retain_status_information 1
retain_nonstatus_information 1
notification_interval 1440
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxx-admins
stalking_options o,w,u,c
register 0
}
define service{
name ping_template
service_description PING
is_volatile 0
check_command check_graph_ping!1500,60%!4000,80%
max_check_attempts 6
normal_check_interval 3
retry_check_interval 1
check_period 24x7
process_perf_data 1
notification_interval 1440
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxx-admins
stalking_options o,w,u,c
register 0
#TEMPLATE-HOST-LINK template_host-alive
}
define service{
name sTMPL_cat-CRT_https
service_description HTTPS
check_command check_graph_https
max_check_attempts 1
normal_check_interval 10080
retry_check_interval 1440
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_interval 60
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxxxxx-users
stalking_options o,w,u,c
register 0
}
define service{
name sTMPL_cat-CRT_nrpeHttps
service_description HTTPS
check_command check_nrpe_cert
max_check_attempts 1
normal_check_interval 10080
retry_check_interval 1440
active_checks_enabled 1
passive_checks_enabled 0
check_period 24x7
notification_interval 60
notification_period workhours
notification_options w,u,c,r,f
notifications_enabled 1
contact_groups cgroup_xxxxxxxx-users
stalking_options o,w,u,c
register 0
}
define service{
host_name xxxxxxxxxxxxx.de
service_description ASG_CPU
use generic-service
check_command check_nrpe!check_astaro-cpu!xxxxxxxx xxxxxxx 80% 95%
}
define service{
host_name xxxxxxxxxxxxx.net
service_description ASG_CPU
use sTMPL_cat-ENV_nrpeASGcpu
check_command check_nrpe_asg-cpu!xxxxxxxx!xxxxxxxxx!80%!95%
}
define service{
host_name xxxxxxxxxxxxxxxxx.net
service_description ASG_SwapSpace
use generic-service
check_command check_nrpe_asg-swap!xxxx!xxxxxxx!50!99
normal_check_interval 10
retry_check_interval 2
}
julio
01-08-2008, 03:24 PM
Ok I have found.
It's not compatible with nagios 2.5 and 2.6. In nagios 2.5 and nagios 2.6 comments are ; and not # in object definitions.
so I will generate as soon as possible a new version to fixe this bug.
You can change the comment caracter in this file : INSTALLEDPATH\www\include\configuration\configGene rate\genServices.php
line 242 ~ replace
$strTMP .= print_line("#TEMPLATE-HOST-LINK", $template_link["host_name"]);
by
$strTMP .= print_line(";TEMPLATE-HOST-LINK", $template_link["host_name"]);
passie
01-08-2008, 03:26 PM
Nagios 2.5
Jogarem
01-08-2008, 03:31 PM
Ok I have found.
It's not compatible with nagios 2.5 and 2.6. In nagios 2.5 and nagios 2.6 comments are ; and not # in object definitions.
so I will generate as soon as possible a new version to fixe this bug.
You can change the comment caracter in this file : INSTALLEDPATH\www\include\configuration\configGene rate\genServices.php
line 242 ~ replace
$strTMP .= print_line("#TEMPLATE-HOST-LINK", $template_link["host_name"]);
by
$strTMP .= print_line(";TEMPLATE-HOST-LINK", $template_link["host_name"]);
Yeah :cool: This works !!
julio you are great :)
Jogarem
01-08-2008, 03:42 PM
and any idea about the array error message showing in my screenshot?
julio
01-08-2008, 04:00 PM
Thanks ! :)
The error is juste a debug. It's ok for 1.4.2.3.
Thanks
passie
01-08-2008, 04:01 PM
I did a nagios upgrade to nagios 2.10, but the problem is still there.
Even when i change the # to ;
Update: nevermind it was something with a custom script we have.
anyway after upgrading to nagios-2.10 it works fine now.
julio
01-08-2008, 04:44 PM
Thanks Passie for you feed back
No problem with nagios 2.9
passie
01-09-2008, 10:32 AM
FYI,
Previously I said:
Update: nevermind it was something with a custom script we have.
anyway after upgrading to nagios-2.10 it works fine now.
But after checking some other things as well it looks like Centreon was not getting de description field from the db. When I checked that specific services I found out it was linked to a template.
The services itself was running fine, but the template had no description. When I later manually edited the description field for the 3 templates which were causing the problem, a normal export could be made.
It could be that this problem was specific for our platform and/or Centreon. If not it can help somebody else to pinpoint the problem.
HTH