Nagios Core 4.0.0 is out!
4.0.1 - 10/15/2013 ENHANCEMENTS Added compiler flags in RPM spec file to reduce compiler noise (Dan Wittenberg) Added logging of failure in dlclose() call (Anton Lofgren) Added a simple query handler interface, nagios-qh.rb (Dan Wittenberg) Multiple code simplifications, additional error handling in downtime code (Andreas Ericsson) FIXES Reverted commit f99a9a7b which set check_interval to 1 if it was configured as zero. Corrected order of arguments when logging unknown hosts/services (Scott Wilkerson) Downtime initialized before retention data read (Eric Stanley) Patches to make RPM build again (Dan Wittenberg) Ensure that scheduled_downtime_depth never drops below zero (Andreas Ericsson)
Version 4.0.1 seems to work fine on amd64. For those using pnp4nagios and npcdmod: http://docs.pnp4nagios.org/pnp-0.6/start PNP4Nagios Broker Module npcdmod.o is not compatible with Nagios Core 4.x Nagios fails to start when using this mod: [1384172339] Error: Module '/usr/lib64/npcdmod.o' is using an old or unspecified version of the event broker API. Module will be unloaded. [1384172339] Event broker module '/usr/lib64/npcdmod.o' deinitialized successfully. [1384172339] Error: Failed to load module '/usr/lib64/npcdmod.o'. [1384172339] Error: Module loading failed. Aborting. --- /usr/portage/net-analyzer/nagios-core/nagios-core-3.3.1.ebuild 2012-09-06 03:31:21.000000000 +0200 +++ nagios-core-4.0.1.ebuild 2013-11-11 13:27:09.625673031 +0100 @@ -28,7 +28,7 @@ want_apache2 -S="${WORKDIR}/${PN/-core}" +S="${WORKDIR}/${PN/-core}-${PV}" pkg_setup() { depend.apache_pkg_setup @@ -37,12 +37,6 @@ enewuser nagios -1 /bin/bash /var/nagios/home nagios } -src_prepare() { - epatch "${FILESDIR}/nagios-3.3.1-htmlmakefile.patch" - local strip="$(echo '$(MAKE) strip-post-install')" - sed -i -e "s:${strip}::" {cgi,base}/Makefile.in || die "sed failed in Makefile.in" -} - src_configure() { local myconf @@ -101,7 +95,7 @@ sed -i -e 's/^contactgroups$//g' Makefile - emake DESTDIR="${D}" install + emake DESTDIR="${D}" install-unstripped emake DESTDIR="${D}" install-config emake DESTDIR="${D}" install-commandmode emake DESTDIR="${D}" install-classicui
4.0.2 - 11/25/2013 FIXES Fixed bug 528: Nagios 4.0.1: Logrotation: Only current host- and servicestates saved in rotated logfiles (duplicate of 507) Fixed bug 507: Nagios 4.0.0 - Problem during log rotate (Stefano Ghelfi) Fixed bug 530: RPM spec file sets wrong permissions on plugins directory (duplicate of bug 494) Fixed bug 494: nagios.spec fixes (with patch) (Karsten Weiss) Fixed bug 515: Segsegv after starting up nagios (duplicate of bug 526) Fixed bug 513: Crash while entering downtime for service (duplicate of bug 526) Fixed bug 529: Core Worker failed to reap child in 4.0.1 Description Fixed bug 514: scheduled downtime not showing in web interface (Eric Stanley) Fixed bug 526: sort_downtime() corrupts scheduled_downtime_list causing segfault (Adam James) Fixed bug 492: Nagios 4 fails to remove/add checks upon reload (Eric Stanley) Fixed Bug 484: Beta4.0.0b4 service checks returning (No output on stdout) (Eric Stanley) Fixed Bug 470: statusmap doesn't display info (Cameron Moore) Fixed Bug 499: Security issue in daemon-init.in, function check_config (Tómas Edwardsson)
I've been using 4.0.2 for monitoring about 2000 services since 11/2013, works fine.
4.0.4 - 03/14/2014 ENHANCEMENTS JSON CGIs moved to beta status (Eric Stanley) FIXES Fixed bug #491,#553: Rebuilt the daemon-init scripts back to something that should work on all systems (Scott Wilkerson) 4.0.3 - 02/28/2014 ENHANCEMENTS Aliased hourly_value to importance and minimum_value to minimum_importance and deprecated the former (Eric Stanley) Added host and service importance macros (Eric Stanley) Added notifications on flexible downtime expiration (Dan Wittenberg) FIXES Bug #548: Temporary fix that rejects all external command during restart to prevent Core from crashing (Eric Stanley) Corrected calculation of host importance and importance defaults (Eric Stanley) Fixed bug #498: Nagios 4 enable_environment_macros=1 not working (Eric Stanley, Alexey Dvoryanchikov) No longer checks whether logs can be written when verifying configuration (Eric Stanley) Fixed CGI bug where the CGI could read past the end of the list of CGI variables, potentially crashing the CGI (Scott Wilkerson) Fixed inheritance of hourly_value from host and service templates (Scott Wilkerson) Fixed bug #502: 4.0.0: Configuration -> Service Escalations = incomplete list (Eric Stanley) Fixed bug #523: quotes and double quotes in plugin message are converted to HTML escapes in Nagios 4.0 (duplicate of bug #524) Fixed bug #524: URLs returned in plugin check results are not correctly displayed (Eric Stanley) Fixed bug where passive service checks would return "Service check timed out after 0.00 seconds" (Scott Wilkerson)
Created attachment 384846 [details] nagios-core-4.0.8.ebuild This is the ebuild I've been using at work. We don't use the web interface, so please test if you can.
Created attachment 384848 [details] nagios-4.0.8.ebuild And the meta ebuild. If you're feeling adventurous, I have an updated nagios-plugins ebuild at bug #522946.
Without install-html, it doesn't build with USE="apache2 web" (see the build log). Without install-cgis, the cgis are missing: Not Found The requested URL /nagios/cgi-bin/status.cgi was not found on this server. --- nagios-core-4.0.8.ebuild 2014-09-17 06:07:46.420206098 +0000 +++ nagios-core-4.0.8-r1.ebuild 2014-09-17 06:26:45.458765256 +0000 @@ -83,6 +83,8 @@ emake DESTDIR="${D}" install-commandmode if use web; then + emake DESTDIR="${D}" install-cgis + emake DESTDIR="${D}" install-html emake DESTDIR="${D}" install-classicui fi
Created attachment 384900 [details] nagios-4.0.8.build.log The build.log of nagios 4.0.8 by Michael when USE="apache2 web"
Created attachment 385188 [details] nagios-core-4.0.8.ebuild Thanks, I've patched the nagios-core ebuild. It should build with USE=web now.
Created attachment 388492 [details] nagios-core-4.0.8.ebuild Updated ebuild with a fix for bug #401237.
I've tested your latest ebuild on our environment with 100+ hosts and 4000 services, it works fine. After merging there is a notice: * QA Notice: Symbolic link /usr/share/doc/nagios-core-4.0.8-r3/README points to /usr/share/doc/nagios-core-4.0.8-r3/README.asciidoc which does not exist. net-analyzer/nagios-core-4.0.8-r3 was built with the following: USE="apache2 web -lighttpd -perl -vim-syntax" ABI_X86="64"
Created attachment 388614 [details] nagios-core-4.0.8.ebuild Thanks for testing. I've fixed that QA issue (upstream ships a symlink...) and a few others. There's a patch and a new init script now too.
Created attachment 388616 [details] metadata.xml for nagios-core Oh, right. And I made the classic UI optional (USE=classicui) but defaulted to the new "exfoliation" theme.
Created attachment 388618 [details] files/nagios4 New init script.
Created attachment 388620 [details, diff] files/use-MAKE-instead-of-bare-make.patch Patch to fix another QA issue.
Thanks for the improved version, seems to work just fine.
How big of an issue would it be if I required apache-2.4.x for the nagios-4.x series? Right now we're shipping an apache-2.2.x config with nagios-3.x, but it's not compatible with apache-2.4. There are a couple solutions: 1. Put both apache-2.2 and 2.4 configs in the conf file we ship with nagios, and comment one out. 2. Keep shipping the 2.2 config, and require mod_access_compat with apache-2.4 3. Ship only a 2.4 config, and require apache-2.4 from now on Option #1 leaves things up to the user, but doesn't work "out of the box." Option #2 I don't like much because nagios doesn't really require mod_access_compat, it only does if you want to use a 2.2.x config. Option #3 works out-of-the-box, with the caveat that you don't get a box at all if you don't use the newer apache. Eventually apache-2.4 will go stable, and the point will be moot, which is why it might not be so bad to do this now.
I would vote for option 3. Version 2.4 has been out since 2012 and checking the stable tracker, I think the stabilization could be done pretty quickly. For most of the bugs, it's enough to change the default shipped configuration and adjust to Apache 2.4.
Created attachment 389174 [details] nagios-core-4.0.8.ebuild Ok, one more round. This adds a build dep on apache >= 2.4 (so that I can fix the permissions at install time). It also restricts you to only one of USE=apache2 or USE=lighttpd, since /etc/nagios can't have two groups at once. I also fixed the double pkg_postinst() that was hiding the elog messages.
Created attachment 389176 [details, diff] files/use-INSTALL-to-install-themes.patch
Created attachment 389178 [details] 99_nagios4.conf
Created attachment 389180 [details] lighttpd_nagios4.conf Sorry the attachments are getting out of control. I think I'm finally done.
Thanks Michael for your work on this, tested and works ok (a current amd64 system with web via apache 2.4).
Great, thanks for testing. I have permission to commit this and the new -plugins ebuild, probably some time later today.
Ok, time to go close some bugs =) *nagios-4.0.8 (22 Nov 2014) 22 Nov 2014; Michael Orlitzky <mjo@gentoo.org> +nagios-4.0.8.ebuild: Version bump with permission from creffett, bug #485756. *nagios-core-4.0.8 (22 Nov 2014) 22 Nov 2014; Michael Orlitzky <mjo@gentoo.org> +files/99_nagios4.conf, +files/lighttpd_nagios4.conf, +files/nagios4, +files/use-INSTALL-to-install-themes.patch, +files/use-MAKE-instead-of-bare-make.patch, +nagios-core-4.0.8.ebuild, metadata.xml: Version bump with permission from creffett, bug #485756. Thanks to Tomas Mozes and others for testing.