Thomas, et al -
I think I've found and fixed this bug. I just posted a proposed fix to
CVS a few moments ago. A new CVS snapshot should be available in about
10 minutes from the following URL:
http://nagios.sourceforge.net/download/cvs/
When you get a chance, can you grab the latest nagios-2-x-cvs tarball,
compile it, and see if it fixes the segfault? Thanks!
Thomas Guyot-Sionnest wrote:
> Hi,
>
> I'm maintaining a pretty big nagios setup (about 60 hosts/ 600 services and
> plan to grow that by 3-4 times). Most of the config is using templates to
> save config lines and maintenance time. Every host has an extinfo (one
> definition for each hostsgroup).
>
> Now I started adding services extinfos to do some fancy things with e-mail
> pages, and ran in a strange segfault bug. To explain it better I'll give an
> overview of my config.
>
> templates.cfg: This defines all basic hosts, services and service extinfo
> templates.
>
> Ex:
>
> define service {
> name generic_service
> max_check_attempts 3
> normal_check_interval 300
> retry_check_interval 60
> check_period 24x7
> notification_interval 600
> notification_period 24x7
> notification_options c,w,r
> contact_groups admin
> register 0
> }
>
> define service {
> hostgroup_name admin,license,public,web
> use generic_service
> name dynamic_service
> register 0
> }
>
> services.cfg: This defines services based on template above.
>
> For ex.:
>
> define service {
> host_name nagios.example.com
> service_description HTTP
> servicegroups http_svc
> check_command check_http!$HOSTADDRESS$
> use dynamic_service
> }
>
> Will add this services for all hosts in hostsgroups admin,license,public,web
> PLUS host nagios.example.com
>
> So far this works fine. Now I add in templates.cfg (Note that I removed the
> ampersand from "illegal_macro_output_chars" for this to work) :
>
> define serviceextinfo {
> name generic_service_ext
> action_url
> https://nagios.example.com/cgi-bin/exti ... ME$&servic
> e=$SERVICEDESC$
> register 0
> }
>
> define serviceextinfo {
> hostgroup_name admin,license,public,web
> use generic_service_ext
> name dynamic_service_ext
> register 0
> }
>
> And in services.cfg:
>
> define serviceextinfo {
> host_name nagios.example.com
> service_description HTTP
> use dynamic_service_ext
> }
>
> Then run:
>
> # nagios -v /etc/nagios/nagios.cfg
>
> Nagios 2.4
> Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
> Last Modified: 05-31-2006
> License: GPL
>
> Reading configuration data...
>
> Segmentation fault
>
>
> Now, interesting thing here, If I move "hostgroup_name
> admin,license,public,web" from the template to the registered service
> extinfo, it works!
>
> templates.cfg:
>
> define serviceextinfo {
> use generic_service_ext
> name dynamic_service_ext
> register 0
> }
>
> services.cfg:
>
> define serviceextinfo {
> host_name nagios.example.com
> hostgroup_name admin,license,public,web
> service_description HTTP
> use dynamic_service_ext
> }
>
>
> root@josianne:/etc/nagios/cfg# nagios -v /etc/nagios/nagios.cfg
>
> Nagios 2.4
> Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
> Last Modified: 05-31-2006
> License: GPL
>
> Reading configuration data...
>
> Running pre-flight check on configuration data...
>
> Checking services...
> Checked 597 services.
> Checking hosts...
> Checked 64 hosts.
> Checking host groups...
> Checked 10 host groups.
> Checking service groups...
> Checked 4 service groups.
> Checking contacts...
> Checked 7 contacts.
> Checking contact groups...
> Checked 4 contact groups.
> Checking service escalations...
> Checked 0 service escalations.
> Checking service dependencies...
> Checked 71 service dependencies.
> Checking host es
...[email truncated]...
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]