Segfault during pre-flight check
Ethan Galstad
nagios at nagios.org
Thu Jul 6 22:58:18 CEST 2006
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/extinfo.cgi?type=2&host=$HOSTNAME$&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 at 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 escalations...
> Checked 0 host escalations.
> Checking host dependencies...
> Checked 0 host dependencies.
> Checking commands...
> Checked 59 commands.
> Checking time periods...
> Checked 4 time periods.
> Checking extended host info definitions...
> Checked 64 extended host info definitions.
> Checking extended service info definitions...
> Checked 132 extended service info definitions.
> Checking for circular paths between hosts...
> Checking for circular host and service dependencies...
> Checking global event handlers...
> Checking obsessive compulsive processor commands...
> Checking misc settings...
>
> Total Warnings: 0
> Total Errors: 0
>
> Things look okay - No serious problems were detected during the pre-flight
> check
>
>
> I'm sorry I didn't have time to cleanup all the config . I'm currently
> setting another nagios box, so if I run into this problem at the very
> beginning I'll keep that config and send it over. I also tried to get a core
> dump but it didn't worked, I'm not sure if I need to enable some options at
> compile time...
>
> Thanks
>
> Thomas
>
Ethan Galstad,
Nagios Developer
---
Email: nagios at nagios.org
Website: http://www.nagios.org
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
More information about the Developers
mailing list