Hello community,

here is the log from the commit of package icinga.1247 for openSUSE:12.1:Update 
checked in at 2013-01-29 14:55:46
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update/icinga.1247 (Old)
 and      /work/SRC/openSUSE:12.1:Update/.icinga.1247.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "icinga.1247", Maintainer is ""

Changes:
--------
New Changes file:

--- /dev/null   2013-01-09 19:40:42.352580873 +0100
+++ /work/SRC/openSUSE:12.1:Update/.icinga.1247.new/icinga.changes      
2013-01-29 14:55:47.000000000 +0100
@@ -0,0 +1,221 @@
+-------------------------------------------------------------------
+Tue Jan 15 13:29:07 UTC 2013 - thard...@suse.com
+
+- fixed bnc#797237 - CVE-2012-6096 - icinga-fix-bnc797237.patch
+
+-------------------------------------------------------------------
+Thu Aug 16 13:10:01 UTC 2012 - thard...@suse.com
+
+- fixed bnc#776186 - rcido2db failed when lock directory /var/run/icinga was 
missing
+
+-------------------------------------------------------------------
+Fri Jun 15 16:55:17 UTC 2012 - thard...@suse.com
+
+- fixed icinga-create_mysqldb.sh - it granted icinga access to all dbs - so 
please check the permissions of your mysql icinga user 
+
+-------------------------------------------------------------------
+Thu Oct 13 19:13:41 UTC 2011 - co...@suse.com
+
+- remove fragile service
+
+-------------------------------------------------------------------
+Wed Oct  5 16:17:03 UTC 2011 - thard...@suse.com
+
+- fixed incorrect rcicinga meta data 
+
+-------------------------------------------------------------------
+Tue Sep 20 11:12:36 UTC 2011 - thard...@suse.com
+
+- imported Upstream version 1.5.1
+- ran spec-cleaner and added patch tags
+
+-------------------------------------------------------------------
+Thu Sep 15 15:06:28 UTC 2011 - thard...@suse.com
+
+- removed unnecessary testing source files because of conflicting licenses
+- little spec file optimizations
+
+-------------------------------------------------------------------
+Fri Sep  9 13:50:06 UTC 2011 - thard...@suse.com
+
+- cleaned up icinga.spec
+- removed specs for other distributions
+
+-------------------------------------------------------------------
+Mon Sep  2 14:55:17 UTC 2011 - thard...@suse.com
+
+- made icinga-api building optional but disabling it by default
+  just set build_api to 1 to build the packages
+
+-------------------------------------------------------------------
+Sun Aug 28 12:27:47 UTC 2011 - thard...@suse.com
+
+- removed obsolete icinga-api
+- added icinga-remove-api.patch
+- little spec file optimizations
+
+-------------------------------------------------------------------
+Sat Aug 27 17:07:16 UTC 2011 - thard...@suse.com
+
+- initial version 1.5.0
+- removed obsolete patch with-p1-file-dir
+
+-------------------------------------------------------------------
+Mon Jul 11 18:51:42 UTC 2011 - thard...@suse.com
+
+- activated Fedora 15 
+
+-------------------------------------------------------------------
+Mon Jul 11 18:37:09 UTC 2011 - thard...@suse.com
+
+- initial version 1.4.2
+- added 1.5 with-p1-file-dir.patch
+- created new ido2db init script
+- updated icinga init script (no spool sgid needed anymore)
+- major spec file changes
+- fixed wrong var pathes
+
+-------------------------------------------------------------------
+Mon Jul 11 16:02:33 UTC 2011 - l...@linux-schulserver.de
+
+- changed cron job according to bnc#701208
+
+-------------------------------------------------------------------
+Tue Jun 21 17:33:49 UTC 2011 - thard...@suse.com
+
+- remove ido2db lock and socket files while stopping the init script
+
+-------------------------------------------------------------------
+Fri Jun 17 09:18:23 UTC 2011 - thard...@suse.com
+
+- using the Build Service SourceService for the tarball
+- using the default spec for other distributions
+
+-------------------------------------------------------------------
+Thu Jun  9 12:54:17 UTC 2011 - thard...@suse.com
+
+- added db update notification for idoutils
+
+-------------------------------------------------------------------
+Wed Jun  8 13:01:52 UTC 2011 - thard...@suse.com
+
+- initial version 1.4.1
+
+-------------------------------------------------------------------
+Fri May 20 14:24:59 UTC 2011 - thard...@suse.com
+
+- reverted idoutils db path
+
+-------------------------------------------------------------------
+Fri May 20 14:14:04 UTC 2011 - thard...@suse.com
+
+- fixed a wrong cmd configuration entry
+- fixed some rpmlint warnings
+
+-------------------------------------------------------------------
+Thu May 19 12:51:44 UTC 2011 - thard...@suse.com
+
+- initial version 1.4.0 
+- removed db creation scripts - 1.4.0 has its own now
+- removed openssl patch - now obsolete
+
+-------------------------------------------------------------------
+Fri May  6 14:16:22 UTC 2011 - thard...@suse.com
+
+- SLES 10 Perl issue fixed
+
+-------------------------------------------------------------------
+Fri May  6 12:56:33 UTC 2011 - thard...@suse.com
+
+- added fix for ssl support and enabled it
+- updated mysql db creation script
+- fixed some rpmlint warnings
+
+-------------------------------------------------------------------
+Thu Mar 31 11:58:59 UTC 2011 - thard...@suse.com
+
+- initial version 1.3.1
+
+-------------------------------------------------------------------
+Thu Mar  3 16:18:45 UTC 2011 - thard...@suse.com
+
+- fixed ido2db db initializiation scripts
+- fixed /var/run/spool/icinga permissions
+
+-------------------------------------------------------------------
+Mon Feb 28 18:07:39 UTC 2011 - thard...@suse.com
+
+- fixed SLES 10 building problem
+- fixed empty file warnings
+
+-------------------------------------------------------------------
+Mon Feb 28 16:14:39 UTC 2011 - thard...@suse.com
+
+- fixed icinga-api permissions
+- replaced the ido2db init script with a basic version because of problems
+- added simple db creation script for mysql and pgsql for idoutils
+- moved icinga-api docs to icinga-api-doc
+- fixed idoutils oracle dependency
+
+-------------------------------------------------------------------
+Tue Feb 22 10:03:57 UTC 2011 - l...@linux-schulserver.de
+
+- fix pathname to database in icinga-installdb
+- require perl(DBD::mysql) in icinga-idoutils-mysql
+
+-------------------------------------------------------------------
+Sat Feb 19 20:23:43 UTC 2011 - l...@linux-schulserver.de
+
+- package documentation and SQL statements in 
+  /usr/share/doc/packages/icinga-idoutils-{mysql,postgresql}
+- create two subpackages icinga-idoutils-{mysql,postgresql} for 
+  the two supported databases
+- also package php files in %{_datadir}/%{name}/icinga-api/
+
+-------------------------------------------------------------------
+Fri Feb 18 10:22:12 UTC 2011 - thard...@suse.com
+
+- initial version 1.3.0
+- fixed ido2db init script removal problem
+- fixed some warnings
+
+-------------------------------------------------------------------
+Mon Feb 14 18:49:41 UTC 2011 - l...@linux-schulserver.de
+
+- enable ICINGA via a2enflag on initial installation
+
+-------------------------------------------------------------------
+Mon Feb 14 07:01:56 UTC 2011 - l...@linux-schulserver.de
+
+- install icinga.conf instead of icinga.conf.in and add an 
+  <IfDefine ICINGA>, so users can enable the apache configuration 
+  via /etc/sysconfig/apache2 (APACHE_SERVER_FLAGS="ICINGA")
+
+-------------------------------------------------------------------
+Sat Feb 12 21:02:33 UTC 2011 - l...@linux-schulserver.de
+
+- fix path to traceroute
++++ 24 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.1:Update/.icinga.1247.new/icinga.changes

New:
----
  htpasswd.users
  icinga-1.5.1.tar.gz
  icinga-add-ifdefine-to-apache.patch
  icinga-fix-bnc797237.patch
  icinga-fix-create_mysqldb.patch
  icinga-remove-obsolete-api.patch
  icinga-rpmlintrc
  icinga.8
  icinga.changes
  icinga.spec
  icinga.sysconfig
  icingastats.8
  ido2db.8
  mini_epn_icinga.8
  rcicinga
  rcido2db
  suse.de-icinga

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ icinga.spec ++++++
++++ 625 lines (skipped)

++++++ htpasswd.users ++++++
icingaadmin:r7/b9cx2mGCfQ
++++++ icinga-add-ifdefine-to-apache.patch ++++++
Index: icinga-1.2.1/sample-config/httpd.conf.in
===================================================================
--- icinga-1.2.1.orig/sample-config/httpd.conf.in
+++ icinga-1.2.1/sample-config/httpd.conf.in
@@ -5,6 +5,7 @@
 # configuration file.  Customize the paths, etc. as
 # needed to fit your system.
 
+<IfDefine ICINGA>
 ScriptAlias @cgiurl@ "@sbindir@"
 
 <Directory "@sbindir@">
@@ -38,4 +39,4 @@ Alias @htmurl@ "@datadir@/"
    AuthUserFile @sysconfdir@/htpasswd.users
    Require valid-user
 </Directory>
-
+</IfDefine>
++++++ icinga-fix-bnc797237.patch ++++++
diff -rupN icinga-1.5.1.orig/cgi/cgiutils.c icinga-1.5.1/cgi/cgiutils.c
--- icinga-1.5.1.orig/cgi/cgiutils.c    2011-09-09 17:50:53.000000000 +0200
+++ icinga-1.5.1/cgi/cgiutils.c 2013-01-15 14:11:56.898120000 +0100
@@ -2353,6 +2353,10 @@ void print_export_link(int content_type,
 
        /* just do stuff if some options are requested */
        if (getenv("QUERY_STRING") != NULL && strcmp(getenv("QUERY_STRING"), 
"")) {
+               if(strlen(getenv("QUERY_STRING")) > MAX_INPUT_BUFFER) {
+                       printf("print_export_link(): Could not allocate memory 
for stripped_query_string\n");
+                       exit(1);
+         }
                strcpy(stripped_query_string, getenv("QUERY_STRING"));
                strip_html_brackets(stripped_query_string);
                strcat(link, "?");
diff -rupN icinga-1.5.1.orig/cgi/getcgi.c icinga-1.5.1/cgi/getcgi.c
--- icinga-1.5.1.orig/cgi/getcgi.c      2011-09-09 17:50:53.000000000 +0200
+++ icinga-1.5.1/cgi/getcgi.c   2013-01-15 14:03:01.275633000 +0100
@@ -157,13 +157,15 @@ char **getcgivars(void) {
                /* check for NULL query string environment variable - 04/28/00 
(Ludo Bosmans) */
                if (getenv("QUERY_STRING") == NULL) {
                        cgiinput = (char *)malloc(1);
+                       if (cgiinput != NULL) {
+                               cgiinput[0] = '\x0';
+                       }
+               } else
+                       cgiinput = strdup(getenv("QUERY_STRING"));
                        if (cgiinput == NULL) {
                                printf("getcgivars(): Could not allocate memory 
for CGI input.\n");
                                exit(1);
                        }
-                       cgiinput[0] = '\x0';
-               } else
-                       cgiinput = strdup(getenv("QUERY_STRING"));
        }
 
        else if (!strcmp(request_method, "POST") || !strcmp(request_method, 
"PUT")) {
@@ -232,7 +234,11 @@ char **getcgivars(void) {
        paircount = 0;
        nvpair = strtok(cgiinput, "&");
        while (nvpair) {
-               pairlist[paircount++] = strdup(nvpair);
+               pairlist[paircount] = strdup(nvpair);
+               if(pairlist[paircount++] == NULL) {
+                       printf("getcgivars(): Could not allocate memory for 
name-value pair element #%d.\n", paircount);
+                       exit(1);
+               }
                if (paircount > MAX_CGI_INPUT_PAIRS)
                        break;
                if (!(paircount % 256)) {
@@ -259,12 +265,27 @@ char **getcgivars(void) {
                /* get the variable name preceding the equal (=) sign */
                if ((eqpos = strchr(pairlist[i], '=')) != NULL) {
                        *eqpos = '\0';
-                       unescape_cgi_input(cgivars[i*2+1] = strdup(eqpos + 1));
+                       cgivars[i*2+1] = strdup(eqpos + 1);
+                       if(cgivars[i*2+1] == NULL) {
+                               printf("getcgivars(): Could not allocate memory 
for cgi param value #%d.\n", i);
+                               exit(1);
+                       }
+                       unescape_cgi_input(cgivars[i*2+1]);
                } else
-                       unescape_cgi_input(cgivars[i*2+1] = strdup(""));
+                       cgivars[i*2+1] = strdup("");
+                       if(cgivars[i*2+1] == NULL) {
+                               printf("getcgivars(): Could not allocate memory 
for empty cgi param value #%d.\n", i);
+                               exit(1);
+                       }
+                       unescape_cgi_input(cgivars[i*2+1]);
 
                /* get the variable value (or name/value of there was no real 
"pair" in the first place) */
-               unescape_cgi_input(cgivars[i*2] = strdup(pairlist[i]));
+               cgivars[i*2] = strdup(pairlist[i]);
+               if(cgivars[i*2] == NULL) {
+                       printf("getcgivars(): Could not allocate memory for cgi 
param name #%d.\n", i);
+                       exit(1);
+               }
+               unescape_cgi_input(cgivars[i*2]);
        }
 
        /* terminate the name-value list */
diff -rupN icinga-1.5.1.orig/cgi/history.c icinga-1.5.1/cgi/history.c
--- icinga-1.5.1.orig/cgi/history.c     2011-09-09 17:50:53.000000000 +0200
+++ icinga-1.5.1/cgi/history.c  2013-01-15 14:06:14.487198000 +0100
@@ -747,14 +747,14 @@ void show_history(void) {
                                else if (display_type == DISPLAY_HOSTS) {
 
                                        if (history_type == HOST_HISTORY || 
history_type == SERVICE_HISTORY) {
-                                               sprintf(match1, " HOST ALERT: 
%s;", host_name);
-                                               sprintf(match2, " SERVICE 
ALERT: %s;", host_name);
+                                               snprintf(match1, 
sizeof(match1), " HOST ALERT: %s;", host_name);
+                                               snprintf(match2, 
sizeof(match2), " SERVICE ALERT: %s;", host_name);
                                        } else if (history_type == 
HOST_FLAPPING_HISTORY || history_type == SERVICE_FLAPPING_HISTORY) {
-                                               sprintf(match1, " HOST FLAPPING 
ALERT: %s;", host_name);
-                                               sprintf(match2, " SERVICE 
FLAPPING ALERT: %s;", host_name);
+                                               snprintf(match1, 
sizeof(match1), " HOST FLAPPING ALERT: %s;", host_name);
+                                               snprintf(match2, 
sizeof(match2), " SERVICE FLAPPING ALERT: %s;", host_name);
                                        } else if (history_type == 
HOST_DOWNTIME_HISTORY || history_type == SERVICE_DOWNTIME_HISTORY) {
-                                               sprintf(match1, " HOST DOWNTIME 
ALERT: %s;", host_name);
-                                               sprintf(match2, " SERVICE 
DOWNTIME ALERT: %s;", host_name);
+                                               snprintf(match1, 
sizeof(match1), " HOST DOWNTIME ALERT: %s;", host_name);
+                                               snprintf(match2, 
sizeof(match2), " SERVICE DOWNTIME ALERT: %s;", host_name);
                                        }
 
                                        if (show_all_hosts == TRUE)
@@ -793,11 +793,11 @@ void show_history(void) {
                                else if (display_type == DISPLAY_SERVICES) {
 
                                        if (history_type == SERVICE_HISTORY)
-                                               sprintf(match1, " SERVICE 
ALERT: %s;%s;", host_name, service_desc);
+                                               snprintf(match1, 
sizeof(match1), " SERVICE ALERT: %s;%s;", host_name, service_desc);
                                        else if (history_type == 
SERVICE_FLAPPING_HISTORY)
-                                               sprintf(match1, " SERVICE 
FLAPPING ALERT: %s;%s;", host_name, service_desc);
+                                               snprintf(match1, 
sizeof(match1), " SERVICE FLAPPING ALERT: %s;%s;", host_name, service_desc);
                                        else if (history_type == 
SERVICE_DOWNTIME_HISTORY)
-                                               sprintf(match1, " SERVICE 
DOWNTIME ALERT: %s;%s;", host_name, service_desc);
+                                               snprintf(match1, 
sizeof(match1), " SERVICE DOWNTIME ALERT: %s;%s;", host_name, service_desc);
 
                                        if (strstr(temp_entry->entry_text, 
match1) && (history_type == SERVICE_HISTORY || history_type == 
SERVICE_FLAPPING_HISTORY || history_type == SERVICE_DOWNTIME_HISTORY))
                                                display_line = TRUE;
++++++ icinga-fix-create_mysqldb.patch ++++++
diff -rupN icinga-1.7.0.orig/module/idoutils/db/scripts/create_mysqldb.sh 
icinga-1.7.0/module/idoutils/db/scripts/create_mysqldb.sh
--- icinga-1.7.0.orig/module/idoutils/db/scripts/create_mysqldb.sh      
2012-05-15 15:00:56.000000000 +0200
+++ icinga-1.7.0/module/idoutils/db/scripts/create_mysqldb.sh   2012-06-15 
17:12:43.998353127 +0200
@@ -40,7 +40,7 @@ echo "create new DB $DB, user $DBUSER an
 mysql -u $DBADMIN -h $DBHOST $P --verbose >$WD/create_mysqldb.log mysql <<EOS2
  CREATE DATABASE $DB;
  CREATE USER '$DBUSER'@'$DBHOST'  IDENTIFIED BY '$DBPASS';
- GRANT USAGE ON *.* TO '$DBUSER'@'$DBHOST' WITH MAX_QUERIES_PER_HOUR 0 
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
+ GRANT USAGE ON $DB.* TO '$DBUSER'@'$DBHOST' WITH MAX_QUERIES_PER_HOUR 0 
MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
  GRANT SELECT , INSERT , UPDATE , DELETE ON $DB.* to '$DBUSER'@'$DBHOST';
  FLUSH PRIVILEGES ;
  use $DB;
++++++ icinga-remove-obsolete-api.patch ++++++
diff -rupN icinga-1.5.0.orig/Makefile.in icinga-1.5.0/Makefile.in
--- icinga-1.5.0.orig/Makefile.in       2011-08-24 15:57:57.000000000 +0200
+++ icinga-1.5.0/Makefile.in    2011-08-28 13:11:39.662070208 +0200
@@ -371,7 +371,6 @@ install:
        cd $(SRC_CGI) && $(MAKE) $@
        cd $(SRC_HTM) && $(MAKE) $@
 
-       $(MAKE) install-api
        $(MAKE) install-basic
 
 install-unstripped:
@@ -379,7 +378,6 @@ install-unstripped:
        cd $(SRC_CGI) && $(MAKE) $@
        cd $(SRC_HTM) && $(MAKE) $@
 
-       $(MAKE) install-api
        $(MAKE) install-basic
 
 install-basic:
++++++ icinga-rpmlintrc ++++++
# icinga uses it's own users and groups named icinga
addFilter("non-standard-uid.*icinga");
# ido2db is the official upstream name and should follow the documentation
addFilter("incoherent-init-script-name.*ido2db");
# we download the file with _service anyway so pointless
addFilter("source-or-patch-not-bzipped");
addFilter("source-or-patch-not-compressed");
# we need these packages to get the right database drivers
addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-mysql");
addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-oracle");
addFilter("explicit-lib-dependency.*libdbi-drivers-dbd-pgsql");

++++++ icinga.8 ++++++
.TH icinga "8" "March 2010" "sean finney" "nagios"
.SH NAME
icinga \- network/systems status monitoring daemon

.SH SYNOPSIS
.B icinga [\-h] [\-v] [\-s] [\-d] <main_config_file>
.br

.SH DESCRIPTION
.B icinga
is a daemon program that monitors the status of various network
accessible systems, devices, and more.  For more information, please
consult the online documentation available at http://www.icinga.org,
or on your Icinga server's web page.

.SH OPTIONS
.TP
main_config_file
The main configuration file.  On debian systems this defaults to
/etc/icinga/icinga.cfg
.TP
\fB\-h\fR
A helpful usage message
.TP
\fB\-v\fR
Reads all data in the configuration files and performs a basic
verification/sanity check.  Always make sure you verify your
config data before (re)starting Icinga.
.TP
\fB\-s\fR
Shows projected/recommended check scheduling information based
on the current data in the configuration files.
.TP
\fB\-d\fR
Starts Icinga in daemon mode (instead of as a foreground process).

.SH FILES
.TP
.IP /etc/icinga
Default configuration directory for Icinga

.SH AUTHOR
Icinga was started as Nagios by Ethan Galstad <nag...@nagios.org>. 
Icinga is maintained by the Icinga Project <i...@icinga.org>.
This manual page was written by sean finney <sean...@debian.org> for the Debian
GNU/Linux operating system (but it may be freely used, modified, and
redistributed by others).
++++++ icinga.sysconfig ++++++
## Path:           Network/Monitors/Icinga
## Description:    Icinga startup parameters
## Type:        integer
## Default:     10
#
# Timeout during server shutdown (seconds)
# The start script kills Icinga after this timeout in double-seconds with 
SIGTERM
#
# Increase it, if you use Icinga in an big environment (>100 monitoring hosts)!
#
ICINGA_TIMEOUT="10"

## Type:        integer
## Default:     0
#
# Nice level of running Icinga daemon.
#
ICINGA_NICELEVEL="0"

## Type:        boolean
## Default:     true
#
# Compress old Icinga logfiles in /var/log/icinga/archive.
#
# Icinga comes with his own logrotate scripts, so you can configure Icinga 
# to rotate his logfile in /etc/icinga/icinga.cfg
# To save disk space, you can enable a cron job which compress the old 
# logfiles once a week. Note: this disables the Icinga history.
ICINGA_COMPRESS_LOGFILES="true"
++++++ icingastats.8 ++++++
.TH icingastats "8" "February 2006" "sean finney " "icinga"
.SH NAME
icingastats \- report statistics information from the Icinga system

.SH SYNOPSIS
.B icingastats [\-hVL] [\-c config] [\-m] [\-d]
.br

.SH DESCRIPTION
.B icingastats
Is a program designed to provide information on the running Icinga
system.  It can provide a brief summary of information, or it can
be used to export specific information about the nagios system
into an MRTG-compatible format.
For more information please consult the Icinga online documentation
available at http://www.icinga.org or the documentation available
with your icinga server's web page.

.SH OPTIONS
.TP
\fB\-c\fR|\-\-config=FILE
The main configuration file.  On debian systems this defaults to
/etc/icinga/icinga.cfg
.TP
\fB\-m\fR|\-\-mrtg
Print output in MRTG-compatible format.  For more details run
icingastats with \-\-help
.TP
\fB\-d\fR|\-\-data=VARS
Comma-seperated list of variables to output in MRTG format.  For
more details run icingastats with \-\-help.
.TP
\fB\-h\fR|\-\-help
A helpful usage message
.TP
\fB\-V\fR|\-\-version
Print version information
.TP
\fB\-L\fR|\-\-license
Print license details

.SH FILES
.TP
.IP /etc/icinga
Default configuration directory for icinga

.SH AUTHOR
Icinga was started as Nagios by Ethan Galstad <nag...@nagios.org>.  Icinga is
maintained by the Icinga Project <i...@icinga.org>.  This manual page was
written by sean finney <sean...@debian.org> for the Debian GNU/Linux operating
system (but it may be freely used, modified, and redistributed by others).
++++++ ido2db.8 ++++++
'\" t
.\"     Title: ido2db
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 03/16/2010
.\"    Manual: ido2db
.\"    Source: Nagios/Icinga
.\"  Language: English
.\"
.TH "IDO2DB" "8" "03/16/2010" "Nagios/Icinga" "ido2db"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
ido2db \- store icinga events and configs in database
.SH "SYNOPSIS"
.sp
\fBido2db\fR \-c <config_file> [\-i] [\-f]
.SH "DESCRIPTION"
.sp
Stores Icinga event and configuration data to a database for later retrieval 
and processing\&. Clients that are capable of sending data to the IDO2DB daemon 
include the LOG2NDO utility and IDOMOD event broker module\&.
.SH "OPTIONS"
.PP
\fB\-i\fR
.RS 4
Run under INETD/XINETD\&.
.RE
.PP
\fB\-f\fR
.RS 4
Don\(cqt daemonize, run in foreground\&.
.RE
.SH "AUTHOR"
.sp
This manpage was written by Alexander Wirt <formorer@debian\&.org> for the 
Debian Distribution\&.
++++++ mini_epn_icinga.8 ++++++
'\" t
.\"     Title: mini_epn
.\"    Author: [see the "AUTHOR" section]
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
.\"      Date: 09/19/2009
.\"    Manual: mini_epn
.\"    Source: Nagios/Icinga
.\"  Language: English
.\"
.TH "MINI_EPN" "8" "09/19/2009" "Nagios/Icinga" "mini_epn"
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"
mini_epn \- too to nagios/icingaplugins inside of an embedded perl interpreter
.SH "SYNOPSIS"
.sp
\fBmini_epn\fR
.SH "DESCRIPTION"
.sp
After calling \fBmini_epn\fR an embedded perl interpreter gets started and asks 
for you a script to execute under the interpreter\&. To exit the interpreter 
loop press ^d at the prompt\&.
.SH "EXAMPLES"
.sp
.if n \{\
.RS 4
.\}
.nf
# mini_epn
Enter file name: /usr/lib/nagios/plugins/check_linux_raid
embedded perl plugin return code and output was: 0 & \'OK md0 status=[UU]\&. 
md1 status=[UU]\&.
.fi
.if n \{\
.RE
.\}
.SH "AUTHOR"
.sp
This manpage was written by Alexander Wirt <formorer@debian\&.org> for the 
Debian Distribution\&.
++++++ rcicinga ++++++
#! /bin/sh
# Copyright (c) 1995-2001 SuSE GmbH Nuernberg, Germany.
#                    2002 SuSE Linux AG Nuernberg, Germany.
#                    2007 SuSE Linux GmbH Nuernberg, Germany.
#                    2010 SUSE LINUX Products GmbH, Nuernberg, Germany
#
# Author: Wolfgang Rosenauer, Lars Vogdt
#
#
# /etc/init.d/icinga
#
#   and symbolic its link
#
# /usr/sbin/rcicinga
#
# System startup script for icinga
#
### BEGIN INIT INFO
# Provides:       icinga
# Required-Start: $local_fs $remote_fs $syslog $network
# Required-Stop:  $local_fs $remote_fs $syslog $network
# Should-Start:   $time sendmail httpd2 $named cron ido2db
# Should-Stop:    sendmail ido2db
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Network monitor Icinga
# Description:    Starts and stops the Icinga monitor
#   used to provide network services status for hosts,
#   services and networks.
### END INIT INFO
 
. /etc/rc.status
 
ICINGA_BIN="/usr/sbin/icinga"
ICINGA_CFG="/etc/icinga/icinga.cfg"
ICINGA_SYSCONFIG="/etc/sysconfig/icinga"
ICINGA_CFG_ERR_LOG="/var/log/icinga/config.err"
 
# Read config and log errors in logfile
function config_check () {
    case "$1" in
        verbose)
            $ICINGA_BIN -v "$ICINGA_CFG" >"$ICINGA_CFG_ERR_LOG" 2>&1
            if [ $? -eq 0 ]; then
                return 0
            else
                return 1
            fi
        ;;
        *)  
            $ICINGA_BIN -v "$ICINGA_CFG" >/dev/null 2>&1
            if [ $? -eq 0 ]; then
                return 0
            else
                $ICINGA_BIN -v "$ICINGA_CFG" >"$ICINGA_CFG_ERR_LOG" 2>&1
                return 1
            fi
        ;;
    esac
}
 
# grab a config option
function get_var() {
    if [ -n "$2" ]; then
        set -- `grep ^$1 $2 | sed 's@=@ @' | tr -d '[:cntrl:]'`
    else
        set -- `grep ^$1 "$ICINGA_CFG" | sed 's@=@ @' | tr -d '[:cntrl:]'`
    fi
    shift # remove first ARG => search-string
    echo $*
}
 
# check some default files and directories
function check_files() {
    # remove some perhaps left over files  
    for file in "$command_file" "$lock_file" "$status_file" "$temp_file" 
"/var/lock/subsys/icinga"; do
        test -f "$file" && rm -f "$file"
    done
    # set default access rights for files and directories
    for file in "$log_file" "$state_retention_file" "$status_file"; do
      if [ ! -e "$file" ]; then
            touch "$file"
      fi
      chown $icinga_user:$icinga_cmdgrp "$file"
    done
    for dir in "$check_result_path" ; do
      if [ ! -d "$dir" ]; then
          mkdir -p "$dir"
      fi
      chown $icinga_user:$icinga_cmdgrp "$dir"
    done
    chmod 660 "$resource_file"
    chown $icinga_user:$icinga_cmdgrp "$resource_file"
}
 
function check_lock_file() {
    PIDDIR=$(dirname $lock_file)
    case "$PIDDIR" in
        /var/run)
            if [ x"$icinga_user" != x"root" ]; then
                DATESTRING=`date +"%Y%m%d"`
                mv -f "$ICINGA_CFG" "$ICINGA_CFG-$DATESTRING"
                sed -e "s|^lock_file.*|pid_file=$lock_file|g" 
"$ICINGA_CFG-$DATESTRING" > "$ICINGA_CFG"
                /bin/logger -t rcicinga "Configured $lock_file in $ICINGA_CFG 
moved to $lock_file. Backup is $ICINGA_CFG-$DATESTRING"
                test -f "$lock_file" && rm -f "$lock_file"
                install -d -m755 -o$icinga_user -g$icinga_cmdgrp $(dirname 
"$lock_file")
            else
                test -d "$PIDDIR" || mkdir -p "$PIDDIR"
            fi
        ;;
        *)
            install -d -m755 -o$icinga_user -g$icinga_cmdgrp $(dirname 
"$lock_file")
    esac
}
 
# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
test -x "$ICINGA_BIN" || { echo "$ICINGA_BIN not installed or not executable.";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 5; fi; }
 
# Check for existence of needed config file
test -r "$ICINGA_CFG" || { echo "$ICINGA_CFG not existing or readable.";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 6; fi; }

# Check for existence of sysconfig file and read it
test -r "$ICINGA_SYSCONFIG" || { echo "$ICINGA_SYSCONFIG not existing or 
readable.";
        if [ "$1" = "stop" ]; then exit 0;
        else exit 6; fi; }

. "$ICINGA_SYSCONFIG"

# set values for sysconfig vars
if [ -n "$ICINGA_NICELEVEL" ]; then
    NICELEVEL="-n $ICINGA_NICELEVEL"
else
    NICELEVEL="-n 0"
fi
if [ -z "$ICINGA_TIMEOUT" ]; then
    ICINGA_TIMEOUT=10
fi
 
#
# get variables from config file
#
icinga_user="$(get_var icinga_user)"
lock_file="$(get_var lock_file)"
status_file="$(get_var status_file)"
log_file="$(get_var log_file)"
temp_file="$(get_var temp_file)"
state_retention_file="$(get_var state_retention_file)"
command_file="$(get_var command_file)"
resource_file="$(get_var resource_file)"
object_cache_file="$(get_var object_cache_file)"
check_result_path="$(get_var check_result_path)"
check_external_commands="$(get_var check_external_commands)"
 
#
# use default values if above check doesn't work
#
: ${icinga_user:=icinga}
: ${icinga_cmdgrp:=icingacmd}
: ${resource_file:=/etc/icinga/resource.cfg}
# check ownership files
: ${check_result_path:=/var/spool/icinga}
: ${log_file:=/var/log/icinga/icinga.log}
: ${state_retention_file:=/var/log/icinga/retention.dat}
: ${status_file:=/var/log/icinga/status.dat}
: ${check_external_commands:=0}
# files to remove
: ${command_file:=/var/spool/icinga/icinga.cmd}
: ${lock_file:=/var/run/icinga/icinga.pid}
: ${object_cache_file:=/var/lib/icinga/objects.cache}
: ${temp_file:=/var/log/icinga/icinga.tmp}
 
# Reset status of this service
rc_reset
 
case "$1" in
    start)
        echo -n "Starting Icinga "
        config_check
        if [ $? -eq 0 ]; then
            # check if icinga is already running
            ICINGAPID=$(pidof "$ICINGA_BIN")
            if [ -z "$ICINGAPID" ]; then
                check_files
                check_lock_file
            fi            
            
            startproc $NICELEVEL -p "$lock_file" "$ICINGA_BIN" -d "$ICINGA_CFG"
            if [ "$check_external_commands" != 0 ]; then
                while [ ! -e "$command_file" ] && [ $ICINGA_TIMEOUT -gt 0 ]; do
                    sleep 1
                    ICINGA_TIMEOUT=$[$ICINGA_TIMEOUT-1]
                done
                chgrp $icinga_cmdgrp "$command_file"
                chown $icinga_user:$icinga_cmdgrp "$check_result_path"
            fi
        else
            echo "Error in configuration - please read $ICINGA_CFG_ERR_LOG"
            rc_failed
        fi
        rc_status -v
    ;;
    stop)
        echo -n "Shutting down Icinga "
        # we have to wait for icinga to exit and remove its
        # own Lockfile, otherwise a following "start" could
        # happen, and then the exiting icinga will remove the
        # new Lockfile, allowing multiple icinga daemons
        # to (sooner or later) run - John Sellens
 
        if checkproc "$ICINGA_BIN" ; then
            killproc -p "$lock_file" -TERM "$ICINGA_BIN"
            sleep 1
            if [ -e "$lock_file" ]; then
                echo "Warning - Icinga did not exit in a timely manner. 
Waiting..."
                while [ -e "$lock_file" ] && [ $ICINGA_TIMEOUT -gt 0 ] ; do
                    sleep 1
                    ICINGA_TIMEOUT=$[$ICINGA_TIMEOUT-1]
                    echo -n '.'
                    [ $ICINGA_TIMEOUT -eq 41 ] && echo
                done
            fi
            if checkproc "$ICINGA_BIN" ; then
                killproc -p "$lock_file" -SIGKILL "$ICINGA_BIN"
                echo -n "Warning: Icinga killed"
            fi
        else
            echo -n "Icinga not running"
            rc_failed 7
        fi
        check_files
        rc_reset
        rc_status -v
    ;;
    try-restart)
        ## Do a restart only if the service was active before.
        $0 status
        if test $? = 0; then
            $0 restart
        else
            rc_reset        # Not running is not a failure.
        fi
        rc_status
    ;;
    restart)
        $0 stop
        $0 start
        rc_status
    ;;
    reload|force-reload)
        echo -n "Reload service Icinga "
        config_check
        if [ $? -eq 0 ]; then
          echo -n "Passed configuration check - reloading..."
          killproc -HUP -p "$lock_file" "$ICINGA_BIN"
        else
          echo "- Error in configuration files"
          echo -n "- aborting reload - please read $ICINGA_CFG_ERR_LOG"
          rc_failed
        fi
        rc_status -v
    ;;
    status)
        echo -n "Checking for Icinga "
        checkproc -p "$lock_file" "$ICINGA_BIN"
        rc_status -v
    ;;
    check)
        echo -n "Starting configuration check "
        config_check
        if [ $? -eq 0 ]; then
            echo "- passed configuration check"
            test -f $ICINGA_CFG_ERR_LOG && rm $ICINGA_CFG_ERR_LOG
            rc_reset
        else
            echo "- detected Error in configuration files"
            echo "Please read $ICINGA_CFG_ERR_LOG"
            rc_failed
        fi
        rc_status -v
    ;;
    check_verbose)
        echo "Running verbose configuration check..."
        config_check verbose
        exitcode=$?
        cat "$ICINGA_CFG_ERR_LOG"
        rc_failed $exitcode
        rc_status -v
        rc_exit
    ;;
    *)
        echo "Usage: $0 
{start|stop|status|try-restart|restart|reload|check|check_verbose}"
        exit 1
        ;;
esac
rc_exit
++++++ rcido2db ++++++
#!/bin/sh
#
# Startup script for IDO2DB
#
# /etc/init.d/ido2db
# and its symbolic link
# /usr/sbin/rcido2db
#
### BEGIN INIT INFO
# Provides:         ido2db
# Required-Start:   $syslog $remote_fs
# Should-Start:     mysql
# Required-Stop:    $syslog $remote_fs
# Should-Stop:      mysql
# Default-Start:    3 5
# Default-Stop:     0 1 2 6
# Short-Description: Icinga Data Output Utilities
# Description: Automatic startup and shutdown of Icinga IDO2DB.
#   IDOUtils is an Icinga addon allowing you to store Icinga data (current 
status
#   information, state history, notification history, etc.) in a MySQL database.
### END INIT INFO
 
# Note on runlevels:
# 0 - halt/poweroff                     6 - reboot
# 1 - single user                       2 - multiuser without network exported
# 3 - multiuser w/ network (text mode)  5 - multiuser w/ network and X11 (xdm)

. /etc/rc.status
 
IDO2DB_BIN="/usr/sbin/ido2db"
IDO2DB_CFG="/etc/icinga/ido2db.cfg"
ICINGA_SYSCONFIG="/etc/sysconfig/icinga"

# grab a config option
function get_var() {
    if [ -n "$2" ]; then
        set -- `grep ^$1 $2 | sed 's@=@ @' | tr -d '[:cntrl:]'`
    else
        set -- `grep ^$1 "$IDO2DB_CFG" | sed 's@=@ @' | tr -d '[:cntrl:]'`
    fi
    shift # remove first ARG => search-string
    echo $*
}

# check some default files and directories
function check_files() {
    # remove some perhaps left over files  
    for file in "$lock_file" "$socket_name"; do
        test -e "$file" && rm -f "$file"
    done

    # create lock directory if it doesn't exist
    PIDDIR=$(dirname $lock_file)
    test -d "$PIDDIR" || install -d -m755 -o$ido2db_user -g$ido2db_group 
"$PIDDIR"
}

test -x $IDO2DB_BIN || { echo "$IDO2DB_BIN not installed";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 5; fi; }
 

test -r $IDO2DB_CFG || { echo "$IDO2DB_CFG not existing";
    if [ "$1" = "stop" ]; then exit 0;
    else exit 6; fi; }

# Check for existence of sysconfig file and read it
test -r "$ICINGA_SYSCONFIG" || { echo "$ICINGA_SYSCONFIG not existing or 
readable.";
        if [ "$1" = "stop" ]; then exit 0;
        else exit 6; fi; }

. "$ICINGA_SYSCONFIG"

# set values for sysconfig vars
if [ -n "$IDO2DB_NICELEVEL" ]; then
    NICELEVEL="-n $IDO2DB_NICELEVEL"
else
    NICELEVEL="-n 0"
fi
if [ -z "$IDO2DB_TIMEOUT" ]; then
    IDO2DB_TIMEOUT=10
fi

#
# get variables from config file
#
lock_file="$(get_var lock_file)"
socket_name="$(get_var socket_name)"
ido2db_user="$(get_var ido2db_user)"
ido2db_group="$(get_var ido2db_group)"

#
# use default values if above check doesn't work
#
: ${lock_file:=/var/run/icinga/ido2db.pid}
: ${socket_name:=/var/spool/icinga/ido2db.sock}
: ${ido2db_user:=icinga}
: ${ido2db_group:=icinga}
 
# Reset status of this service
rc_reset 
 
case "$1" in
    start)
      echo -n "Starting Ido2db "
      IDO2DBPID=$(pidof "$IDO2DB_BIN")
      if [ -z "$IDO2DBPID" ]; then
          check_files
      fi      
      startproc $NICELEVEL -p "$lock_file" "$IDO2DB_BIN" -c "$IDO2DB_CFG"
 
      # Remember status and be verbose
      rc_status -v
    ;;
    stop)
        echo -n "Shutting down Ido2db "
 
        if checkproc "$IDO2DB_BIN" ; then
            killproc -p "$lock_file" -TERM "$IDO2DB_BIN"
            sleep 1
            if [ -e "$lock_file" ]; then
                echo "Warning - Ido2db did not exit in a timely manner. 
Waiting..."
                while [ -e "$lock_file" ] && [ $IDO2DB_TIMEOUT -gt 0 ] ; do
                    sleep 1
                    IDO2DB_TIMEOUT=$[$IDO2DB_TIMEOUT-1]
                    echo -n '.'
                    [ $IDO2DB_TIMEOUT -eq 41 ] && echo
                done
            fi
            if checkproc "$IDO2DB_BIN" ; then
                killproc -p "$lock_file" -SIGKILL "$IDO2DB_BIN"
                echo -n "Warning: Ido2db killed"
            fi
        else
            echo -n "Ido2db not running"
            rc_failed 7
        fi
        check_files
        rc_reset
 
        # Remember status and be verbose
        rc_status -v
    ;;
    try-restart)
        ## Do a restart only if the service was active before.
        $0 status
        if test $? = 0; then
            $0 restart
        else
            rc_reset        # Not running is not a failure.
        fi
        rc_status
    ;;
    restart)
        $0 stop
        $0 start
        rc_status
    ;;
    reload|force-reload)
        echo -n "Reload service Ido2db "
        config_check
        if [ $? -eq 0 ]; then
          echo -n "Passed configuration check - reloading..."
          killproc -HUP -p "$lock_file" "$IDO2DB_BIN"
        else
          echo "- Error in configuration files"
          echo -n "- aborting reload - please read $IDO2DB_CFG_ERR_LOG"
          rc_failed
        fi
        rc_status -v
    ;;
    status)
        echo -n "Checking for Ido2db "
        checkproc -p "$lock_file" "$IDO2DB_BIN"
        rc_status -v
    ;;
    check)
        echo -n "Starting configuration check "
        config_check
        if [ $? -eq 0 ]; then
            echo "- passed configuration check"
            test -f $IDO2DB_CFG_ERR_LOG && rm $IDO2DB_CFG_ERR_LOG
            rc_reset
        else
            echo "- detected Error in configuration files"
            echo "Please read $IDO2DB_CFG_ERR_LOG"
            rc_failed
        fi
        rc_status -v
    ;;
    check_verbose)
        echo "Running verbose configuration check..."
        config_check verbose
        exitcode=$?
        cat "$IDO2DB_CFG_ERR_LOG"
        rc_failed $exitcode
        rc_status -v
        rc_exit
    ;;
    *)
        echo "Usage: $0 
{start|stop|status|try-restart|restart|reload|check|check_verbose}"
        exit 1
        ;;
esac
rc_exit
++++++ suse.de-icinga ++++++
#!/usr/bin/env bash
#
# Compress old logfiles in /var/log/icinga/archives/
# once a week, if sysconfig variable is set to true
#
if [ -r /etc/sysconfig/icinga ]; then 
. /etc/sysconfig/icinga
else
        echo "/etc/sysconfig/icinga not found or not readable." >&2
        exit 1
fi

if [[ "$ICINGA_COMPRESS_LOGFILES" = "true" ]]; then
        for f in /var/log/icinga/archives/*.log ; do
                if [[ -r "$f" ]] ; then
                        /usr/bin/bzip2 "$f" 
                fi
        done
fi
-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to