Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 191675 - net-analyzer/nagios-core add lighttpd USE flag and config-file
Summary: net-analyzer/nagios-core add lighttpd USE flag and config-file
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Tobias Scherbaum (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 213683
  Show dependency tree
 
Reported: 2007-09-08 11:25 UTC by Tiziano Müller (RETIRED)
Modified: 2009-01-22 17:00 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
nagios-core-2.9-r1.ebuild.patch (nagios-core-2.9-r1.ebuild.patch,3.40 KB, patch)
2007-09-08 11:27 UTC, Tiziano Müller (RETIRED)
Details | Diff
files/lighttpd_nagios.conf (lighttpd_nagios.conf,437 bytes, text/plain)
2007-09-08 11:27 UTC, Tiziano Müller (RETIRED)
Details
mod_alias missing in default config (lighttpd_nagios3.conf.patch,319 bytes, patch)
2009-01-22 13:03 UTC, Marcel Pennewiß
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2007-09-08 11:25:09 UTC
It's possible to use nagios with lighttpd instead of apache.
Please add a corresponding USE-flag.
Comment 1 Tiziano Müller (RETIRED) gentoo-dev 2007-09-08 11:27:16 UTC
Created attachment 130323 [details, diff]
nagios-core-2.9-r1.ebuild.patch

This patch does the magic.
Comment 2 Tiziano Müller (RETIRED) gentoo-dev 2007-09-08 11:27:52 UTC
Created attachment 130324 [details]
files/lighttpd_nagios.conf

... and this is the configuration-file for lighttpd
Comment 3 Tiziano Müller (RETIRED) gentoo-dev 2007-09-08 11:31:09 UTC
Maybe you want to add an apache2 USE-flag such that people who want to use nginx for example can simply do it
Comment 4 Tobias Scherbaum (RETIRED) gentoo-dev 2007-09-08 11:50:03 UTC
I plan to phase out the "noweb" use-flag w/ nagios-3 and instead support different http-servers via use-flags (apache2, lighttpd, ...). I'll try to add nagios-3 packages to my personal overlay within the next few days.
Comment 5 Tobias Scherbaum (RETIRED) gentoo-dev 2007-09-28 17:56:47 UTC
nagios-3 ebuilds with support for lighttpd (and apache of course :P) just added to my dev-overlay. I set up a test installation using lighty, works for me. Please test and report back! :)
Comment 6 Tiziano Müller (RETIRED) gentoo-dev 2007-10-29 14:11:53 UTC
Cool, seems to work here too after solving a couple of small things:

When I tried to start nagios right after the installation, I got the following:
[1193608375] Nagios 3.0b4 starting... (PID=5652)
[1193608375] LOG VERSION: 2.0
[1193608375] Warning: Could not open object cache file '/var/nagios/objects.cache' for writing!
[1193608375] Caught SIGSEGV, shutting down...
... I just changed the ownership of /var/nagios to solve this.

You might also want to add a note to tell the user how he has to configure lighttpd ("include nagios.conf" and define an authentication method).

The folder /etc/nagios is not w+rx and has the ownership nagios:nagios, but the user running the cgi is lighttpd:lighttpd, which resulted in the error "Error: Could not open CGI config file '/etc/nagios/cgi.cfg' for reading!". I changed the group for the folder to lighttpd.
A better way (but only possible with lighttpd-1.5) is to run the cgi-process as a different user.

And a question: why is the nagios.log-file in /var/nagios instead of /var/log/nagios?

Thanks a lot, btw.
Comment 7 Tobias Scherbaum (RETIRED) gentoo-dev 2007-10-29 17:33:59 UTC
(In reply to comment #6)
> ... I just changed the ownership of /var/nagios to solve this.

ok, taken care of
 
> You might also want to add a note to tell the user how he has to configure
> lighttpd ("include nagios.conf" and define an authentication method).

There's some info for apache, so some for lighty should be added - yeah.

> The folder /etc/nagios is not w+rx and has the ownership nagios:nagios, but the
> user running the cgi is lighttpd:lighttpd, which resulted in the error "Error:
> Could not open CGI config file '/etc/nagios/cgi.cfg' for reading!". I changed
> the group for the folder to lighttpd.

There's also info for usage with apache already included, might make sense to make this wording a bit more general to cover both apache and ligthy.

> And a question: why is the nagios.log-file in /var/nagios instead of
> /var/log/nagios?

Mostly historical reasons, I plan to adjust the installation path for nagios-3 according to FHS, i.e. install to /usr instead of /usr/nagios, moving nagios logfiles to /var/log/nagios/ is another thingy to be done. I'm going to push a new nagios-3.0_b5 ebuild to my overlay within the next few days which includes these changes.
Comment 8 Tobias Scherbaum (RETIRED) gentoo-dev 2008-04-27 18:46:40 UTC
This is fixed in CVS now. Note that nagios-3 ebuilds are still p.masked.
Comment 9 Marcel Pennewiß 2009-01-22 13:03:08 UTC
Created attachment 179330 [details, diff]
mod_alias missing in default config

in nagios.conf you have to load mod_alias for lighttpd to get alias.url working - this should be added to default config, lighttpd did not use this module by default
Comment 10 Tobias Scherbaum (RETIRED) gentoo-dev 2009-01-22 14:49:17 UTC
reopen
Comment 11 Tobias Scherbaum (RETIRED) gentoo-dev 2009-01-22 17:00:59 UTC
(In reply to comment #9)
> Created an attachment (id=179330) [edit]
> mod_alias missing in default config
> 
> in nagios.conf you have to load mod_alias for lighttpd to get alias.url working
> - this should be added to default config, lighttpd did not use this module by
> default
> 

fixed in 3.0.6-r1