commit icinga for openSUSE:Factory
Hello community,
here is the log from the commit of package icinga for openSUSE:Factory checked in at 2012-07-23 10:11:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/icinga (Old)
and /work/SRC/openSUSE:Factory/.icinga.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "icinga", Maintainer is ""
Changes:
--------
--- /work/SRC/openSUSE:Factory/icinga/icinga.changes 2012-03-12 20:14:00.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.icinga.new/icinga.changes 2012-07-23 10:15:48.000000000 +0200
@@ -1,0 +2,93 @@
+Wed Jun 20 10:06:31 UTC 2012 - thardeck@suse.com
+
+- imported upstream version 1.7.1
+ * core: use prefix in solaris service definition #2609 - TD/CF
+ * core: fix various memory leaks in downtime eventhandling on SIGHUP (Carlos Velasco) #2666 - MF
+ * classic ui: Fixed status.cgi time out when displaying hostgroups in large environments #2617 - RB
+ * classic ui: Fixed Invalid JSON output for hostgroup overview (Torsten Rehn) #2680 - RB
+ * classic ui: Fixed Confusing use of display_name in JSON and CSV output (Torsten Rehn) #2681 - RB
+ * classic ui: Fixed wrong totals in "Service Status Summary" on Status Summary page (Mark Ziesemer) #2689 - RB
+ * idoutils: fix small compiler issues #2620 - TD/CF
+ * idoutils: fix upgradedb script typos & past changes #2682 - MF
+ * config: check_ido2db_procs.cfg should not depend on local-service template #2616 - MF
+ * install: adapt lsb headers for icinga and ido2db #2637 - MF
+ * install: fix typo in contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event (thanks uosiu) #2671 - MF
+
+-------------------------------------------------------------------
+Tue Jun 19 17:56:21 UTC 2012 - thardeck@suse.com
+
+- cleaned up rcicinga and added checkresult directory creation before start
+- added patch to fix wrong fsf address in some license files
+- extracted update_path_script parts from %post to a separate file located under doc
+
+-------------------------------------------------------------------
+Fri Jun 15 18:38:48 UTC 2012 - thardeck@suse.com
+
+- fixed icinga-create_mysqldb.sh - it granted icinga access to all dbs - so please check the permissions of your mysql icinga user
+- removed all other ido2utils scripts since they are not supported by upstream
+- updated readme - better distinguishable topics
+
+-------------------------------------------------------------------
+Fri Jun 15 12:24:01 UTC 2012 - thardeck@suse.com
+
+- updated readme - mysql example command granted icinga access to all dbs
+
+-------------------------------------------------------------------
+Wed Jun 13 12:29:29 UTC 2012 - lars@linux-schulserver.de
+
+- added 'show-errors' to icinga init script as documented in the
+ wiki
+
+-------------------------------------------------------------------
+Tue Jun 5 13:29:20 UTC 2012 - thardeck@suse.com
+
+- changed eventhandlers directory from /usr/lib/nagios/plugins/eventhandler to /lib/icinga/eventhandler (unpackaged files do not get copied)
+- moved remaining files and the checkresults directory from /var/lib/icinga to /var/spool/icinga
+- moved /var/lib/icinga to /var/spool/icinga/
+- removed nagios directories from the packages (/var/lib/nagios/*)
+- changed /var/spool/icinga/icinga.cmd to /var/run/icinga/icinga.cmd
+- changed /var/spool/icinga/ido2db.sock to /var/run/icinga/ido2db.sock
+- added post scripts to update the existing configuration files accordingly
+- replaced the existing default http-passwd file with the one from upstream - user icingaadmin with password icingaadmin
+- adapted the RHEL upstream icinga and icinga-idoutils readmes for SUSE and packaged them
+- idoutils db schema has changed, check /usr/share/doc/packages/icinga-idoutils/README.SUSE.idoutils how to upgrade it
+- imported upstream version 1.7.0
+ * core: notifications: Create contact list after eventbroker callbacks (Andreas Ericsson) #2110 - MF
+ * core: fix event removal from queues with O(1) removal from doubly linked lists (Andreas Ericsson) #2183 - MF
+ * core: avoid senseless looping when free()'ing macros (Andreas Ericsson) #2184 - MF
+ * core: avoid insane looping through event list when rescheduling checks (Mathias Kettner, Andreas Ericsson) #2182 - MF
+ * core: allow empty host groups in service and host dependencies if allow_empty_hostgroup_assignment flag is set (Daniel Wittenberg) #2255 - MF
+ * core: fix compatibility problems on solaris 10 (affects core, cgis, ido) (Carl R. Friend) #2292 - MF/RB/TD
+ * core: add trigger_time to downtimes to allow calculating of flexible downtimes endtime #2537 - MF
+ * core: add nebmodule version/name check for idomod (this allows future version dependencies) #2569 - MF
+
+ * classic ui: Added option for max log entries displayed in showlog.cgi #2145 - RB
+ * classic ui: Added config option for status totals in status.cgi #2018 - RB
+ * classic ui: Added multiple hosts/services to status.cgi GET #1981 - RB
+ * classic ui: Added nostatusheader in status.cgi as config option #2018 - RB
+ * classic ui: Added statusmap resizing with exclude/include button (thanks to Mat) #2186 - RB
+ * classic ui: Added Select hosts or services by clicking on line instead of box #2118 - RB
+ * classic ui: include graph icons by default in logos #2222 - MF
+ * classic ui: added missing comment tool tip box to outages.cgi #2396 - RB
+ * classic ui: add javascript to refresh page/pause easier #2119 - RB
+ * classic ui: Added Scheduling queue filter for specific host or service #2421 - RB
+ * classic ui: add display_status_totals as cgi.cfg option in order to allow the status totals to be shown again #2443 - RB
+ * classic ui: Changed reading of auth information from cgiauth.c to cgiutils.c #2524 - RB
+ * classic ui: Added readonly cgi.cfg view into the config section #1776 - RB
+ * classic ui: add is_in_effect and trigger_time to downtime view for html, csv, json #2538 - MF
+ * classic ui: add modified attributes row to extinfo.cgi showing diffs to original config (thx Sven Nierlein for the idea) #2473 - MF
+ * classic ui: add modified attributes reset command to extinfo.cgi allowing to reset to original config #2474 - MF
+
+ * idoutils: add new index for state in table statehistory #2274 - TD
+ * idoutils: add is_in_effect and trigger_time to scheduleddowntime and downtimehistory tables #2539 - MF
+ * idoutils: change varchar(255) to TEXT in mysql (not cs and address rfc columns) #2181 - MF
+ * idoutils: enhance dbversion table with modified and created columns #2562 - MF
+ * idoutils: set module info in idomod, to be checked on neb module load in future versions #2569 - MF
+
+-------------------------------------------------------------------
+Sun May 27 17:06:20 UTC 2012 - lars@linux-schulserver.de
+
+- init script: check configuration before restart to avoid a
+ non running service on config problems
+
+-------------------------------------------------------------------
Old:
----
htpasswd.users
icinga-1.6.1.tar.gz
New:
----
README.SUSE
README.SUSE.idoutils
icinga-1.7.1.tar.gz
icinga-fix-create_mysqldb.patch
icinga-fix-fsf-address.patch
update_icinga_paths.sh
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ icinga.spec ++++++
--- /var/tmp/diff_new_pack.jQavnP/_old 2012-07-23 10:15:51.000000000 +0200
+++ /var/tmp/diff_new_pack.jQavnP/_new 2012-07-23 10:15:51.000000000 +0200
@@ -17,20 +17,18 @@
%define apacheconfdir %{_sysconfdir}/apache2/conf.d
-# overload eventhandlerdir with the original value for now to not break backward
-# compatibility, this will be changed with the next upstream version integration
-# to /usr/lib/icinga/eventhandler
-%define icinga_eventhandlerdir %{_prefix}/lib/nagios/plugins/eventhandlers/
+%define apachegroup www
+# Macro that print mesages to syslog at package (un)install time
+%define logmsg logger -t %{name}/rpm
Name: icinga
-Version: 1.6.1
-Release: 2
-License: GPL-2.0
-# Macro that print mesages to syslog at package (un)install time
-%define nnmmsg logger -t %{name}/rpm
+Version: 1.7.1
+Release: 0
+
Summary: Host/service/network monitoring program
-Url: http://www.icinga.org/
+License: GPL-2.0
Group: System/Monitoring
+Url: http://www.icinga.org/
Source0: %{name}-%{version}.tar.gz
Source1: rc%{name}
Source2: rcido2db
@@ -41,11 +39,17 @@
Source7: icingastats.8
Source8: ido2db.8
Source9: mini_epn_icinga.8
-Source12: htpasswd.users
+Source10: README.SUSE
+Source11: README.SUSE.idoutils
+Source12: update_icinga_paths.sh
# PATCH-FIX-OPENSUSE icinga-add-ifdefine-to-apache.patch
Patch0: icinga-add-ifdefine-to-apache.patch
+# PATCH-FIX
+Patch1: icinga-fix-create_mysqldb.patch
+# PATCH-FIX
+Patch2: icinga-fix-fsf-address.patch
BuildRequires: apache2-devel
-BuildRequires: nagios-rpm-macros
+BuildRequires: nagios-rpm-macros >= 0.05
%if 0%{?suse_version} >= 1110
BuildRequires: fdupes
%endif
@@ -81,6 +85,7 @@
Recommends: %{name}-plugins-eventhandlers
Recommends: %{name}-www
Recommends: cron
+Recommends: logrotate
Recommends: nagios-plugins
Recommends: net-snmp
Recommends: openssl
@@ -163,6 +168,8 @@
Recommends: mysql
Recommends: mysql-client
Provides: %{name}-idoutils-drivers-dbd = %{version}
+Conflicts: idoutils-oracle
+Conflicts: idoutils-pgsql
%description idoutils-mysql
This package requires all needed packages for using IDOUtils with MySQL.
@@ -173,6 +180,8 @@
Requires: %{name}-idoutils = %{version}
Recommends: oracle-client
Provides: %{name}-idoutils-drivers-dbd = %{version}
+Conflicts: idoutils-pgsql
+Conflicts: idoutils-mysql
%description idoutils-oracle
This package requires all needed packages for using IDOUtils with OracleDB.
@@ -185,6 +194,8 @@
Recommends: postgresql
Recommends: postgresql-libs
Provides: %{name}-idoutils-drivers-dbd = %{version}
+Conflicts: idoutils-mysql
+Conflicts: idoutils-oracle
%description idoutils-pgsql
This package requires all needed packages for using IDOUtils with PostgreSQL.
@@ -210,47 +221,55 @@
%prep
%setup -q
%patch0 -p1
-
-# replace default ido2db lock and socket file settings
-sed -ie "s|@localstatedir@/ido2db.lock|%{icinga_ido2db_lockfile}|g; \
- s|@localstatedir@/ido.sock|%{icinga_ido2db_socketfile}|g;" \
- "module/idoutils/config/ido2db.cfg-sample.in" \
- "module/idoutils/config/idomod.cfg-sample.in";
+%patch1 -p1
+%patch2 -p1
# remove GPLv3+ source files which are not needed for this package
-rm t-tap/*.c
+rm "t-tap/"*.c
%build
export PATH_TO_TRACEROUTE="%{_sbindir}/traceroute"
%configure \
+ --prefix="%{icinga_datadir}" \
--exec-prefix="%{_sbindir}" \
--bindir="%{_sbindir}" \
- --sbindir="%{icinga_cgidir}" \
- --libexecdir="%{icinga_plugindir}" \
+ --datadir="%{icinga_datadir}" \
--datarootdir="%{icinga_datadir}" \
- --sysconfdir="%{icinga_sysconfdir}" \
- --with-p1-file-dir="%{icinga_datadir}" \
- --with-init-dir="%{_sysconfdir}/init.d" \
+ --libexecdir="%{icinga_plugindir}" \
--localstatedir="%{icinga_localstatedir}" \
- --with-checkresult-dir="%{icinga_localstatedir}/checkresults" \
+ --libdir="%{icinga_libdir}" \
+ --sbindir="%{icinga_cgidir}" \
+ --sysconfdir="%{icinga_sysconfdir}" \
--with-cgiurl="/%{name}/cgi-bin" \
- --with-htmurl="/%{name}" \
- --with-httpd-conf="%{apacheconfdir}" \
- --with-lockfile="%{icinga_lockfile}" \
- --with-ext-cmd-file-dir="%{icinga_spooldir}" \
- --with-log-dir="%{icinga_logdir}" \
- --with-cgi-log-dir="%{icinga_logdir}/www" \
- --with-icinga-user="%{icinga_user}" \
- --with-icinga-group="%{icinga_group}" \
--with-command-user="%{icinga_command_user}" \
--with-command-group="%{icinga_command_group}" \
--with-gd-lib="%{_libdir}" \
--with-gd-inc="%{_includedir}" \
+ --with-htmurl="/%{name}" \
+ --with-init-dir="%{_initrddir}" \
+ --with-lockfile="%{icinga_lockfile}" \
+ --with-icinga-user="%{icinga_user}" \
+ --with-icinga-group="%{icinga_group}" \
+ --with-httpd-conf="%{apacheconfdir}" \
+ --with-log-dir="%{icinga_logdir}" \
--with-perlcache \
+ --enable-cgi-log \
--enable-event-broker \
--enable-embedded-perl \
--enable-idoutils \
- --enable-ssl
+ --enable-ssl \
+ --with-cgi-log-dir="%{icinga_cgi_logdir}" \
+ --with-plugin-dir="%{icinga_plugindir}" \
+ --with-eventhandler-dir="%{icinga_eventhandlerdir}" \
+ --with-p1-file-dir="%{icinga_datadir}" \
+ --with-checkresult-dir="%{icinga_checkresultdir}" \
+ --with-ext-cmd-file-dir="%{icinga_cmd_filedir}" \
+ --with-http-auth-file="%{icinga_http_authfile}" \
+ --with-icinga-chkfile="%{icinga_chkfile}" \
+ --with-ido2db-lockfile="%{icinga_ido2db_lockfile}" \
+ --with-ido-sockfile="%{icinga_ido2db_socketfile}" \
+ --with-idomod-tmpfile="%{icinga_idomod_tmpfile}" \
+ --with-state-dir="%{icinga_spooldir}"
#
# make daemonchk.cgi and event handlers
@@ -259,14 +278,10 @@
make %{?_smp_mflags} -C contrib
pushd contrib/eventhandlers 1>/dev/null
for f in `find . -type f` ; do
- sed -i "s=/usr/local/nagios/var/rw/=/var/spool/%{name}/=; \
- s=/usr/local/%{name}/var/rw/=/var/spool/%{name}/=; \
- s=NscaBin\=\"/usr/local/nagios/libexec/send_nsca\"=NscaBin\=/usr/bin/send_nsca=; \
- s=/usr/local/nagios/libexec/eventhandlers/=%{icinga_eventhandlerdir}/=; \
+ sed -i "s=NscaBin\=\"/usr/local/%{name}/libexec/send_nsca\"=NscaBin\=/usr/bin/send_nsca=; \
s=/usr/local/%{name}/libexec/eventhandlers/=%{icinga_eventhandlerdir}/=; \
- s=/usr/local/nagios/libexec/=%{icinga_plugindir}/=; \
- s=/usr/local/nagios/etc/=%{icinga_sysconfdir}/=; \
- s=/usr/local/nagios/test/var=/var/log/%{name}=" ${f}
+ s=/usr/local/nagios/libexec/eventhandlers/=%{icinga_eventhandlerdir}/=; \
+ s=/usr/local/%{name}/etc/=%{icinga_sysconfdir}/=" ${f}
done
popd 1>/dev/null
# make daemonchk.cgi and event handlers
@@ -274,38 +289,68 @@
make
%install
-install -d -m0775 "%{buildroot}%{_localstatedir}/log/%{name}/archives"
-install -d -m0775 "%{buildroot}%{_localstatedir}/spool/%{name}"
-install -d -m0775 "%{buildroot}%{_sbindir}"
-install -d -m0755 "%{buildroot}%{_includedir}/%{name}"
-install -d -m0755 "%{buildroot}%{_sysconfdir}/init.d"
-install -d -m0755 "%{buildroot}%{_sysconfdir}/logrotate.d"
-install -d -m0755 "%{buildroot}%{apacheconfdir}"
-install -d -m0755 "%{buildroot}%{icinga_sysconfdir}/objects"
-install -d -m0755 "%{buildroot}%{icinga_localstatedir}"
-install -d -m0755 "%{buildroot}%{icinga_eventhandlerdir}"
-make install install-commandmode install-idoutils install-config install-webconf install-cgis install-init \
+make \
+ install-unstripped \
+ install-init \
+ install-commandmode \
+ install-idoutils \
+ install-config \
+ install-webconf \
+ install-eventhandlers \
DESTDIR=%{buildroot} \
INSTALL_OPTS="" \
- COMMAND_OPTS="" \
INSTALL_OPTS_WEB="" \
- CGIDIR="%{icinga_libdir}/cgi" \
- CGICFGDIR="%{icinga_sysconfdir}" \
+ COMMAND_OPTS="" \
INIT_OPTS=""
make install -C contrib \
DESTDIR=%{buildroot} \
- CGIDIR="%{icinga_libdir}/cgi" \
- CGICFGDIR="%{icinga_sysconfdir}" \
INSTALL_OPTS=""
-### move idoutils sample configs to final name
+# make SUSE readmes available
+cp %{SOURCE10} ./
+cp %{SOURCE11} ./
+
+# replace placeholders in the update_icinga_paths.sh script
+sed -i "s=%%{logmsg}=%{logmsg}=; \
+ s=%%{icinga_lockfile}=%{icinga_lockfile}=; \
+ s=%%{icinga_sysconfdir}=%{icinga_sysconfdir}=; \
+ s=%%{icinga_eventhandlerdir}=%{icinga_eventhandlerdir}=; \
+ s=%%{icinga_spooldir}=%{icinga_spooldir}=; \
+ s=%%{icinga_ido2db_lockfile}=%{icinga_ido2db_lockfile}=; \
+ s=%%{icinga_ido2db_socketfile}=%{icinga_ido2db_socketfile}=; \
+ s=%%{icinga_cmdfile}=%{icinga_cmdfile}=" %{SOURCE12}
+# make update_icinga_paths.sh script available
+chmod +x %{SOURCE12}
+mkdir -p ./examples
+cp %{SOURCE12} ./examples
+
+# make unsupported mysql db creation script available
+pushd module/idoutils/db 1>/dev/null
+mkdir -p examples
+cp scripts/create_mysqldb.sh examples/
+popd 1>/dev/null
+
+# move idoutils sample configs to final name
mv "%{buildroot}%{icinga_sysconfdir}/ido2db.cfg-sample" "%{buildroot}%{icinga_sysconfdir}/ido2db.cfg"
mv "%{buildroot}%{icinga_sysconfdir}/idomod.cfg-sample" "%{buildroot}%{icinga_sysconfdir}/idomod.cfg"
mv "%{buildroot}%{icinga_sysconfdir}/modules/idoutils.cfg-sample" "%{buildroot}%{icinga_sysconfdir}/modules/idoutils.cfg"
-# install directory for event brokers like ndoutils
-install -d -m0755 "%{buildroot}%{_prefix}/lib/nagios/brokers"
+# fix resource.cfg eventhandler path - otherwise it creates problem with the update_config_files script
+sed -i "s|/usr/lib/nagios/plugins/eventhandlers|%{icinga_eventhandlerdir}|g" "%{buildroot}%{icinga_sysconfdir}/resource.cfg"
+
+# remove unnecessary files from www log directory
+rm "%{buildroot}/%{icinga_cgi_logdir}/"{.htaccess,index.htm}
+
+# remove setuid from %%{icinga_cmd_filedir}
+chmod -s "%{buildroot}%{icinga_cmd_filedir}"
+
+# install logrotate rule
+install -D -m 0644 icinga.logrotate %{buildroot}%{icinga_logrotatefile}
+
+# install sample htpasswd file
+install -D -m 0644 icinga.htpasswd %{buildroot}%{icinga_http_authfile}
+
# install eventhandlers
cp -r contrib/eventhandlers/* "%{buildroot}%{icinga_eventhandlerdir}"
@@ -313,74 +358,62 @@
install -d -m0755 "%{buildroot}%{_includedir}/%{name}/"
install -m0644 include/{config,snprintf,cgiutils,locations}.h "%{buildroot}%{_includedir}/%{name}"
-# remove unnecessary files from www log directory
-rm "%{buildroot}/%{icinga_logdir}/www/"{.htaccess,index.htm}
-
# REST of special SUSE stuff here, if needed....
# init-scripts
# remove the default init script as SUSE uses an adapted one
-test -f "%{buildroot}%{_sysconfdir}/init.d/%{name}" && rm -v "%{buildroot}%{_sysconfdir}/init.d/%{name}"
-install -D -m0755 %{SOURCE1} "%{buildroot}%{_sysconfdir}/init.d/%{name}"
-ln -sf ../../%{_sysconfdir}/init.d/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
-install -D -m0755 %{SOURCE2} "%{buildroot}%{_sysconfdir}/init.d/ido2db"
-ln -sf ../../%{_sysconfdir}/init.d/ido2db "%{buildroot}%{_sbindir}/rcido2db"
+install -D -m0755 %{SOURCE1} "%{buildroot}%{_initrddir}/%{name}"
+ln -sf ../../%{_initrddir}/%{name} "%{buildroot}%{_sbindir}/rc%{name}"
+install -D -m0755 %{SOURCE2} "%{buildroot}%{_initrddir}/ido2db"
+ln -sf ../../%{_initrddir}/ido2db "%{buildroot}%{_sbindir}/rcido2db"
# sysconfig script
install -D -m 0644 %{SOURCE3} "%{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}"
# install cronjob (gzip' the logfiles)
install -D -m 0640 %{SOURCE4} "%{buildroot}%{_sysconfdir}/cron.weekly/%{name}"
%if 0%{?suse_version} >= 1110
-%fdupes -s %{buildroot}
+ %fdupes -s %{buildroot}
%endif
# fix documentation
-rm -f sample-config/*.in
-rm -f sample-config/template-object/*.in
+rm "sample-config/"*.in
+rm "sample-config/template-object/"*.in
+rm "module/idoutils/config/"*.in
# install manpages from Debian
-mkdir -p %{buildroot}%{_mandir}/man8/
+install -d -m0755 "%{buildroot}%{_mandir}/man8/"
install -m644 %{SOURCE6} "%{buildroot}%{_mandir}/man8/"
install -m644 %{SOURCE7} "%{buildroot}%{_mandir}/man8/"
install -m644 %{SOURCE8} "%{buildroot}%{_mandir}/man8/"
install -m644 %{SOURCE9} "%{buildroot}%{_mandir}/man8/"
-# install default www interface user
-install -m644 %{SOURCE12} "%{buildroot}%{icinga_sysconfdir}/"
-
-# install ido2utils scripts
-pushd module/idoutils/db/scripts >/dev/null
-test -d "%{buildroot}/%{_bindir}" || mkdir -p "%{buildroot}/%{_bindir}"
-for file in *; do
- outfile=$(basename $file .in)
- sed -e "s|@ido2db_perl@|%{_bindir}/perl|g; \
- s|../mysql|%{_defaultdocdir}/%{name}-idoutils-mysql/mysql|g" \
- $file > "%{buildroot}/%{_bindir}/%{name}-$outfile"
- chmod +x "%{buildroot}/%{_bindir}/%{name}-$outfile"
-done
-popd >/dev/null
-
%pre
+# add icinga user and groups
groupadd -r %{icinga_group} 2>/dev/null || :
groupadd -r %{icinga_command_group} 2>/dev/null || :
/usr/sbin/useradd -c %{icinga_user} -s /sbin/nologin -r -d %{icinga_localstatedir} -G %{icinga_command_group} -g %{icinga_group} %{icinga_user} 2> /dev/null || :
%post
-%{fillup_and_insserv %{name}}
-# New installation?
-if [ ${1:-0} -eq 0 ]; then
+if [ ${1:-0} -gt 1 ]
+then
+# On Update
+ %{_defaultdocdir}/%{name}/examples/update_icinga_paths.sh %{name}
+else
+# On installation
# First installation: create an alias for the default nagiosadmin user
if [ -r etc/aliases ]; then
if ! grep -q "^%{name}:" etc/aliases; then
echo -e "%{name}:\troot" >> etc/aliases
- %{nnmmsg} "Added alias for user %{name} to /etc/aliases"
+ %{logmsg} "Added alias for user %{name} to /etc/aliases"
if [ -x usr/bin/newaliases ]; then
usr/bin/newaliases &>/dev/null || true
else
- %{nnmmsg} "Cannot execute newaliases. Please run it manually."
+ %{logmsg} "Cannot execute newaliases. Please run it manually."
fi
fi
fi
fi
+%{fillup_and_insserv %{name}}
+
%preun
%stop_on_removal %{name}
@@ -395,18 +428,19 @@
else
wwwusr=$(awk '/^[ \t]*User[ \t]+[a-zA-Z0-9]+/ {print $2}' etc/apache2/*.conf)
fi
-if [ "z" == "z$wwwusr" ]; then # otherwise, use the default
+if [ "$wwwusr" == "" ]; then # otherwise, use the default
wwwusr=%{icinga_command_user}
fi
# if apache user is not in cmdgrp, add it
if /usr/bin/id -Gn $wwwusr 2>/dev/null | /bin/grep -q %{icinga_command_group} > /dev/null 2>&1 ; then
- : # $wwwusr (default: %{icinga_command_user}) is already in %{icinga_command_group} group
+ : # $wwwusr (default: %%{icinga_command_user}) is already in %%{icinga_command_group} group
else
# modify apache user, adding it to cmdgrp
groupmod -A $wwwusr %{icinga_command_group} 2>/dev/null
- %nnmmsg "User $wwwusr added to group %{icinga_command_group} so sending commands to Icinga from the command CGI is possible."
+ %{logmsg} "User $wwwusr added to group %{icinga_command_group} so sending commands to Icinga from the command CGI is possible."
fi
-if [ "$1" = "1" ]; then
+if [ ${1:-0} -eq 1 ]
+then
# this is the initial installation: enable icinga
test -x %{_sbindir}/a2enflag && %{_sbindir}/a2enflag ICINGA >/dev/null
fi
@@ -423,14 +457,14 @@
fi
%post idoutils
-#post a db update notification in case of major updates
-if [ "$1" == "2" ] &&
- [ "`rpm -q %{name}-idoutils | head -n1 | cut -d- -f3 | cut -d. -f-2`" != "`echo %{version} | cut -d. -f-2`" ]; then
- echo "########################################################################################"
- echo "Don't forget to update your database. Check /usr/share/doc/packages/icinga-idoutils-<db>"
- echo "########################################################################################"
+if [ ${1:-0} -gt 1 ]
+then
+# On Update
+ %{_defaultdocdir}/%{name}/examples/update_icinga_paths.sh %{name}-idoutils
fi
+%{logmsg} "icinga-idoutils installed: Don't forget to install/upgrade your db schema, check /usr/share/doc/packages/icinga-idoutils/README.SUSE.idoutils"
+
%{fillup_and_insserv ido2db}
%preun idoutils
@@ -442,10 +476,10 @@
%files
%defattr(-,root,root)
-%doc Changelog LEGAL LICENSE README UPGRADING sample-config/
+%doc README LICENSE Changelog UPGRADING LEGAL sample-config/ README.SUSE examples
%{_mandir}/man8/icinga*.8*
%{_mandir}/man8/mini_epn_icinga.8*
-%{_sysconfdir}/init.d/%{name}
+%{_initrddir}/%{name}
%{_sbindir}/%{name}
%{_sbindir}/icingastats
%{_sbindir}/mini_epn
@@ -453,17 +487,17 @@
%{_sbindir}/rc%{name}
%{icinga_datadir}/p1.pl
%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
-%attr(0755,root,root) %config %{_sysconfdir}/cron.weekly/*
+%attr(0755,root,root) %config %{_sysconfdir}/cron.weekly/%{name}
%dir %{icinga_libdir}
-%dir %{_prefix}/lib/nagios
-%dir %{_prefix}/lib/nagios/brokers
-%dir %{_prefix}/lib/nagios/plugins
-%exclude %{icinga_libdir}/cgi
+%exclude %{icinga_cgidir}
+%exclude %{icinga_libdir}/idomod.so
%{_sbindir}/convertcfg
%dir %{icinga_sysconfdir}
%dir %{icinga_sysconfdir}/modules
%config(noreplace) %{icinga_sysconfdir}/icinga.cfg
%dir %{icinga_sysconfdir}/objects
+%dir %{_sysconfdir}/%{name}/conf.d
+%config(noreplace) %{icinga_logrotatefile}
%config(noreplace) %{icinga_sysconfdir}/objects/commands.cfg
%config(noreplace) %{icinga_sysconfdir}/objects/contacts.cfg
%config(noreplace) %{icinga_sysconfdir}/objects/notifications.cfg
@@ -473,21 +507,38 @@
%config(noreplace) %{icinga_sysconfdir}/objects/templates.cfg
%config(noreplace) %{icinga_sysconfdir}/objects/timeperiods.cfg
%config(noreplace) %{icinga_sysconfdir}/objects/windows.cfg
-%config(noreplace) %{icinga_sysconfdir}/resource.cfg
+%config(noreplace) %attr(0640,icinga,icinga) %{icinga_sysconfdir}/resource.cfg
%defattr(-,%{icinga_user},%{icinga_group})
-%dir %{icinga_localstatedir}
-%dir %{icinga_localstatedir}/checkresults
%dir %{icinga_logdir}
%dir %{icinga_logdir}/archives
-%attr(0755,%{icinga_user},%{icinga_command_group}) %dir %{icinga_spooldir}
+%dir %{icinga_spooldir}
+%dir %{icinga_spooldir}/checkresults
+%ghost %{icinga_cmd_filedir}
%files www
%defattr(-,root,root)
-%config(noreplace) %attr(-,root,root) %{apacheconfdir}/%{name}.conf
-%config(noreplace) %{icinga_sysconfdir}/htpasswd.users
+%config(noreplace) %{apacheconfdir}/%{name}.conf
%config(noreplace) %{icinga_sysconfdir}/cgi.cfg
%config(noreplace) %{icinga_sysconfdir}/cgiauth.cfg
-%{icinga_libdir}/cgi
+%config(noreplace) %attr(0640,root,%{apachegroup}) %{icinga_http_authfile}
+%dir %{icinga_cgidir}/
+%{icinga_cgidir}/avail.cgi
+%{icinga_cgidir}/cmd.cgi
+%{icinga_cgidir}/config.cgi
+%{icinga_cgidir}/extinfo.cgi
+%{icinga_cgidir}/histogram.cgi
+%{icinga_cgidir}/history.cgi
+%{icinga_cgidir}/notifications.cgi
+%{icinga_cgidir}/outages.cgi
+%{icinga_cgidir}/showlog.cgi
+%{icinga_cgidir}/status.cgi
+%{icinga_cgidir}/statusmap.cgi
+%{icinga_cgidir}/statuswml.cgi
+%{icinga_cgidir}/statuswrl.cgi
+%{icinga_cgidir}/summary.cgi
+%{icinga_cgidir}/tac.cgi
+%{icinga_cgidir}/trends.cgi
+%{icinga_cgidir}/daemonchk.cgi
%dir %{icinga_datadir}
%{icinga_datadir}/contexthelp
%{icinga_datadir}/images
@@ -500,13 +551,13 @@
%{icinga_datadir}/sidebar.html
%{icinga_datadir}/ssi
%{icinga_datadir}/stylesheets
-%attr(0775,%{icinga_command_user},%{icinga_command_group}) %dir %{icinga_logdir}/www
+%attr(0775,%{icinga_command_user},%{icinga_command_group}) %dir %{icinga_cgi_logdir}
%files idoutils
%defattr(-,root,root)
-%doc module/idoutils/db/queries module/idoutils/db/README module/idoutils/config
+%doc module/idoutils/db/queries UPGRADING module/idoutils/db/README module/idoutils/config README.SUSE.idoutils
%{_mandir}/man8/ido2db.8*
-%{_sysconfdir}/init.d/ido2db
+%{_initrddir}/ido2db
%config(noreplace) %{icinga_sysconfdir}/ido2db.cfg
%config(noreplace) %{icinga_sysconfdir}/idomod.cfg
%config(noreplace) %{icinga_sysconfdir}/modules/idoutils.cfg
@@ -514,25 +565,19 @@
%{_sbindir}/rcido2db
%{_sbindir}/ido2db
%{_sbindir}/log2ido
-%{_sbindir}/idomod.o
+%{icinga_libdir}/idomod.so
%files idoutils-mysql
%defattr(-,root,root)
-%doc module/idoutils/db/mysql
-%{_bindir}/%{name}-create_mysqldb.sh
-%{_bindir}/%{name}-installdb
-%{_bindir}/%{name}-prepsql
-%{_bindir}/%{name}-upgradedb
+%doc module/idoutils/db/mysql module/idoutils/db/examples
%files idoutils-oracle
%defattr(-,root,root)
%doc module/idoutils/db/oracle
-%{_bindir}/%{name}-create_oracledb.sh
%files idoutils-pgsql
%defattr(-,root,root)
%doc module/idoutils/db/pgsql
-%{_bindir}/%{name}-create_pgsqldb.sh
%files devel
%defattr(-,root,root)
++++++ README.SUSE ++++++
Introduction
------------
CHANGES for 1.7
* bindir/idomod.o => libdir/idomod.so
* /var/lib/icinga => /var/spool/icinga
* /usr/lib/nagios/plugins/eventhandlers => /usr/lib/icinga/eventhandler
* /var/spool/icinga/icinga.cmd => /var/run/icinga/icinga.cmd
* /var/spool/icinga/ido2db.sock => /var/run/icinga/ido2db.sock
The packages are made as little dependend on each other as possible, to get the
maximum flexibility in setting up distributed monitoring environments. This
means, that you may have to install some additional packages manually. Zypper is
your friend.
Recommended OS Installation
---------------------------
Repositories:
https://build.opensuse.org/package/show?package=icinga&project=server%3Amonitoring
Order of Installation
---------------------
Keeping a certain order of installation will lead you to a working monitoring
setup in a relatively short time. Use zypper to pull the proper dependencies
automatically.
1. Install icinga
2. Install the needed nagios-plugins
3. If you need or want the classic gui, install icinga-www. If you want plain
monitoring with icinga core and configure everything else by hand, you are done.
3.1 An example user icingaadmin with password icingaadmin is installed to
/etc/icinga/htpasswd.users
3.1 Add a new basic auth user for apache:
# htpasswd /etc/icinga/htpasswd.users youradmin
4. Optional: install icinga-idoutils. Icinga Data Output Utils are necessary for
various database backed guis such as Icinga Web or Icinga Reporting. IDOUtils
use the libdbi database abstraction layer and can use MySQL or Postgresql with
this package.
- icinga-idoutils-mysql
- icinga-idoutils-pgsql
4.1 Create the idoutils database. For details see the README.SUSE.idoutils of the
icinga-idoutils-* package.
Detailed information can be found in the "Creation of Database and IDOUtils" section
in the official docs as well as the wiki howtos.
http://docs.icinga.org/latest/en/quickstart-idoutils.html
https://wiki.icinga.org/display/howtos/Setting+up+Icinga+with+IDOUtils
5. Optional: install additional Icinga guis like Icinga Web or Icinga Reporting as well
as addons such as PNP4Nagios, Check_MK or NagVis. For a suggested list please
either consult the docs or the wiki, or ask community members at icinga-portal.org
Troubleshooting
---------------
- check if you have set SELinux to "disabled" mode
- check that your local firewall rules contain appropriate rules for the
webserver and non-local database-connections
- start the components in the rigth order: database, ido2db, icinga, apache2
- check if idomod loads correctly
(/var/log/icinga/icinga.log: idomod: Successfully connected to data sink)
- check the apache2 error.log, the icinga.log and the syslog
- in case of possible bugs, turn on debugging and refer to the debug logs
Recommended Reading
-------------------
http://docs.icinga.org
http://wiki.icinga.org
http://www.icinga-portal.org
Suggestions and Bugreports
--------------------------
If you want to make suggestions for the way this software is packaged or want
to report bugs related to the packaging of this software, please report to
the SUSE bug tracker by using the link "Report Bug" on
https://build.opensuse.org/package/show?package=icinga&project=server%3Amonitoring
++++++ README.SUSE.idoutils ++++++
IDOUtils Notes for SUSE packages
================================
CHANGES for 1.7
* bindir/idomod.o => libdir/idomod.so
* /var/lib/icinga => /var/spool/icinga
* /usr/lib/nagios/plugins/eventhandlers => /usr/lib/icinga/eventhandler
* /var/spool/icinga/icinga.cmd => /var/run/icinga/icinga.cmd
* /var/spool/icinga/ido2db.sock => /var/run/icinga/ido2db.sock
==============
= IDOMOD Setup
==============
DO NOT EDIT icinga.cfg for broker_module entry!!! Icinga RPMs will use the
/etc/icinga/modules/idoutils.cfg with the module definition automatically.
Defining that twice can lead into unwanted errors!
Verify that by looking into the modules/idoutils.cfg file
# vim /etc/icinga/modules/idoutils.cfg
Other event broker modules can be defined using this module definition as well.
==============
= IDO2DB Setup
==============
Edit your database credentials in ido2db.cfg ...
# vim /etc/icinga/ido2db.cfg
db_servertype=mysql
#db_servertype=pgsql
db_host=localhost
db_port=3306
#db_port=5432
db_name=icinga
db_prefix=icinga_
db_user=icinga
db_pass=icinga
... and create the database like described below.
-------
- MySQL
-------
Create Database, User, Grants
-----------------------------
# mysql -u root -p
mysql> CREATE DATABASE icinga;
Query OK, 1 row affected (0.01 sec)
mysql> GRANT USAGE ON icinga.* TO 'icinga'@'localhost'
IDENTIFIED BY 'icinga'
WITH MAX_QUERIES_PER_HOUR 0
MAX_CONNECTIONS_PER_HOUR 0
MAX_UPDATES_PER_HOUR 0;
mysql> GRANT SELECT , INSERT , UPDATE , DELETE, DROP, CREATE VIEW
ON icinga.* TO 'icinga'@'localhost';
mysql> FLUSH PRIVILEGES;
mysql> quit
Import database schema
----------------------
# cd /usr/share/doc/packages/icinga-idoutils-mysql/mysql
# mysql -u root -p icinga < mysql.sql
------------
- Postgresql
------------
Create Database, User, Grants
-----------------------------
# su - postgres
postgres:~$ psql template1
template1=# create database icinga;
template1=# \q
postgres:~$ createlang plpgsql icinga
postgres:~$ psql
postgres=# create role icinga;
postgres=# alter role icinga login;
postgres=# grant all on database icinga to icinga;
postgres=# \q
Import database schema
----------------------
postgres:~$ cd /usr/share/doc/packages/icinga-idoutils-pgsql/pgsql
postgres:~$ psql -U icinga -d icinga < pgsql.sql
Setup trusted local icinga user
-------------------------------
Now that Postgresql does use a local user to be trusted (insecure, but good as startup),
edit pg_hba.conf accordingly. See Postgresql Manual for a more advanced setup on user
auth and privilegues.
# vim /var/lib/pgsql/data/pg_hba.conf
# TYPE DATABASE USER CIDR-ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 trust
#icinga
local icinga icinga trust
and reload the Postgresql server.
==========
= Upgrade
==========
There is no db upgrade script like in Debian, so you need to keep track of that yourself.
First, get the schema version
# mysql -u root -p icinga
mysql> SELECT * from icinga_dbversion;
+--------------+----------+---------+
| dbversion_id | name | version |
+--------------+----------+---------+
| 1 | idoutils | 1.6.0 |
+--------------+----------+---------+
1 row in set (0.01 sec)
and then decide, what to do - based on the official upgrade docs:
http://docs.icinga.org/latest/en/upgrading_idoutils.html
Remember - the upgrade steps need to be applied incremential, version by version.
e.g.
# cd /usr/share/doc/packages/icinga-idoutils-mysql/mysql/upgrade/
# mysql -u root -p icinga < mysql-upgrade-1.7.0.sql
===========
= Advanced
===========
Advanced guides and upgrade information can be found in the docs and wiki:
http://docs.icinga.org/latest/en/quickstart-idoutils.html
http://docs.icinga.org/latest/en/upgrading_idoutils.html
++++++ icinga-1.6.1.tar.gz -> icinga-1.7.1.tar.gz ++++++
/work/SRC/openSUSE:Factory/icinga/icinga-1.6.1.tar.gz /work/SRC/openSUSE:Factory/.icinga.new/icinga-1.7.1.tar.gz differ: char 5, line 1
++++++ icinga-add-ifdefine-to-apache.patch ++++++
--- /var/tmp/diff_new_pack.jQavnP/_old 2012-07-23 10:15:51.000000000 +0200
+++ /var/tmp/diff_new_pack.jQavnP/_new 2012-07-23 10:15:51.000000000 +0200
@@ -1,7 +1,7 @@
-Index: icinga-1.2.1/sample-config/httpd.conf.in
+Index: icinga-1.7.0/sample-config/httpd.conf.in
===================================================================
---- icinga-1.2.1.orig/sample-config/httpd.conf.in
-+++ icinga-1.2.1/sample-config/httpd.conf.in
+--- icinga-1.7.0.orig/sample-config/httpd.conf.in
++++ icinga-1.7.0/sample-config/httpd.conf.in
@@ -5,6 +5,7 @@
# configuration file. Customize the paths, etc. as
# needed to fit your system.
@@ -10,8 +10,8 @@
ScriptAlias @cgiurl@ "@sbindir@"
participants (1)
-
root@hilbert.suse.de