Hello community, here is the log from the commit of package icinga for openSUSE:Factory checked in at Mon Sep 19 17:22:49 CEST 2011.
-------- New Changes file: --- /dev/null 2010-08-26 16:28:41.000000000 +0200 +++ /mounts/work_src_done/STABLE/icinga/icinga.changes 2011-09-15 17:08:53.000000000 +0200 @@ -0,0 +1,190 @@ +------------------------------------------------------------------- +Thu Sep 15 15:06:28 UTC 2011 - [email protected] + +- removed unnecessary testing source files because of conflicting licenses +- little spec file optimizations + +------------------------------------------------------------------- +Fri Sep 9 13:50:06 UTC 2011 - [email protected] + +- cleaned up icinga.spec +- removed specs for other distributions + +------------------------------------------------------------------- +Mon Sep 2 14:55:17 UTC 2011 - [email protected] + +- 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 - [email protected] + +- removed obsolete icinga-api +- added icinga-remove-api.patch +- little spec file optimizations + +------------------------------------------------------------------- +Sat Aug 27 17:07:16 UTC 2011 - [email protected] + +- initial version 1.5.0 +- removed obsolete patch with-p1-file-dir + +------------------------------------------------------------------- +Mon Jul 11 18:51:42 UTC 2011 - [email protected] + +- activated Fedora 15 + +------------------------------------------------------------------- +Mon Jul 11 18:37:09 UTC 2011 - [email protected] + +- 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 - [email protected] + +- changed cron job according to bnc#701208 + +------------------------------------------------------------------- +Tue Jun 21 17:33:49 UTC 2011 - [email protected] + +- remove ido2db lock and socket files while stopping the init script + +------------------------------------------------------------------- +Fri Jun 17 09:18:23 UTC 2011 - [email protected] + +- using the Build Service SourceService for the tarball +- using the default spec for other distributions + +------------------------------------------------------------------- +Thu Jun 9 12:54:17 UTC 2011 - [email protected] + +- added db update notification for idoutils + +------------------------------------------------------------------- +Wed Jun 8 13:01:52 UTC 2011 - [email protected] + +- initial version 1.4.1 + +------------------------------------------------------------------- +Fri May 20 14:24:59 UTC 2011 - [email protected] + +- reverted idoutils db path + +------------------------------------------------------------------- +Fri May 20 14:14:04 UTC 2011 - [email protected] + +- fixed a wrong cmd configuration entry +- fixed some rpmlint warnings + +------------------------------------------------------------------- +Thu May 19 12:51:44 UTC 2011 - [email protected] + +- 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 - [email protected] + +- SLES 10 Perl issue fixed + +------------------------------------------------------------------- +Fri May 6 12:56:33 UTC 2011 - [email protected] + +- 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 - [email protected] + +- initial version 1.3.1 + +------------------------------------------------------------------- +Thu Mar 3 16:18:45 UTC 2011 - [email protected] + +- fixed ido2db db initializiation scripts +- fixed /var/run/spool/icinga permissions + +------------------------------------------------------------------- +Mon Feb 28 18:07:39 UTC 2011 - [email protected] + +- fixed SLES 10 building problem +- fixed empty file warnings + +------------------------------------------------------------------- +Mon Feb 28 16:14:39 UTC 2011 - [email protected] + +- 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 - [email protected] + +- fix pathname to database in icinga-installdb +- require perl(DBD::mysql) in icinga-idoutils-mysql + +------------------------------------------------------------------- +Sat Feb 19 20:23:43 UTC 2011 - [email protected] + +- 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 - [email protected] + +- initial version 1.3.0 +- fixed ido2db init script removal problem +- fixed some warnings + +------------------------------------------------------------------- +Mon Feb 14 18:49:41 UTC 2011 - [email protected] + +- enable ICINGA via a2enflag on initial installation + +------------------------------------------------------------------- +Mon Feb 14 07:01:56 UTC 2011 - [email protected] + +- 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 - [email protected] + +- fix path to traceroute +- split off different packages: + + icinga-doc + + icinga-api + + icinga-plugins-eventhandlers +- patch (mini-)epn to use full path to p1.pl +- add Requires/Recommends to packages + +------------------------------------------------------------------- +Sun Feb 6 15:15:08 UTC 2011 - [email protected] + +- fix ido2db init script +- fix non_void function +- add rpmlintrc +- place the apache config file in /etc/apache2/conf.d/ and mark it + as not included by default +- added manpages from Debian +- move p1.pl to /usr/sbin +- added pre/post scripts for idoutils + +------------------------------------------------------------------- +Thu Nov 11 02:05:10 UTC 2010 - [email protected] + +- initial version 1.2.1 based on nagios package + calling whatdependson for head-i586 New: ---- _service _service:download_url:icinga-1.5.0.tar.gz htpasswd.users icinga-apache.patch icinga-remove-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 ++++++ ++++ 624 lines (skipped) ++++++ htpasswd.users ++++++ icingaadmin:r7/b9cx2mGCfQ ++++++ icinga-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-remove-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"); # 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 <[email protected]>. Icinga is maintained by the Icinga Project <[email protected]>. This manual page was written by sean finney <[email protected]> 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 <[email protected]>. Icinga is maintained by the Icinga Project <[email protected]>. This manual page was written by sean finney <[email protected]> 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 ndo2db # Should-Stop: sendmail ndo2db # 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 } 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)" # # use default values if above check doesn't work # : ${lock_file:=/var/run/icinga/ido2db.pid} : ${socket_name:=/var/spool/icinga/ido2db.sock} # 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 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
