Search
j0ke.net Open Build Service
>
Projects
>
server:monitoring
:
icinga
:
production
>
icinga114
> 1140_1142.diff
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 1140_1142.diff of Package icinga114
diff -uNr icinga-core-1.14.0/AUTHORS icinga-core-1.14.2/AUTHORS --- icinga-core-1.14.0/AUTHORS 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/AUTHORS 2017-12-20 15:45:58.000000000 +0100 @@ -1,3 +1,4 @@ +Adrian Lopez <adrianlzt@gmail.com> Alexander Hofmann <alexander.hofmann@dfs.de> Alexander Wirt <formorer@debian.org> Andreas Ericsson <ae@op5.se> @@ -5,6 +6,7 @@ Assaf Flatto <icinga@flatto.net> Bas Couwenberg <sebastic@xs4all.nl> Bernd Arnold <bernd_a@gmx.de> +brammeleman <brammeleman@users.noreply.github.com> Carl Friend <crfriend@rcn.com> Carl R. Friend <crfriend@rcn.com> Chris Moates <six@mox.net> @@ -52,6 +54,7 @@ Thomas Dreßler <tdressler@tdressler.net> Tim Hardeck <thardeck@suse.de> Tim Schumacher <tschumacher@tourevo-software.com> +Tobias Deiminger <haxtibal@t-online.de> Tobias Redel <tobias.redel@netways.de> Tobias Scherbaum <tobias@scherbaum.info> Tomas Dubec <tomas.dubec@gmail.com> diff -uNr icinga-core-1.14.0/base/checks.c icinga-core-1.14.2/base/checks.c --- icinga-core-1.14.0/base/checks.c 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/base/checks.c 2017-12-20 15:45:58.000000000 +0100 @@ -88,6 +88,8 @@ extern int passive_host_checks_are_soft; extern int check_service_freshness; +extern int log_stale_services; +extern int log_stale_hosts; extern int check_host_freshness; extern int additional_freshness_latency; @@ -1592,9 +1594,12 @@ /* put service into a hard state without attempting check retries and don't send out notifications about it */ temp_service->host_problem_at_last_check = TRUE; + /* Below removed, causes trouble with SOFT recoveries - https://github.com/Icinga/icinga-core/issues/1594*/ + /* temp_service->state_type = HARD_STATE; temp_service->last_hard_state = temp_service->current_state; temp_service->current_attempt = 1; + */ } /* the host is up - it recovered since the last time the service was checked... */ @@ -2241,7 +2246,7 @@ continue; /* the results for the last check of this service are stale! */ - if (is_service_result_fresh(temp_service, current_time, TRUE) == FALSE) { + if (is_service_result_fresh(temp_service, current_time, log_stale_services) == FALSE) { /* set the freshen flag */ temp_service->is_being_freshened = TRUE; @@ -2651,7 +2656,7 @@ continue; /* the results for the last check of this host are stale */ - if (is_host_result_fresh(temp_host, current_time, TRUE) == FALSE) { + if (is_host_result_fresh(temp_host, current_time, log_stale_hosts) == FALSE) { /* set the freshen flag */ temp_host->is_being_freshened = TRUE; diff -uNr icinga-core-1.14.0/base/config.c icinga-core-1.14.2/base/config.c --- icinga-core-1.14.0/base/config.c 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/base/config.c 2017-12-20 15:45:58.000000000 +0100 @@ -126,6 +126,8 @@ extern int check_orphaned_services; extern int check_orphaned_hosts; extern int check_service_freshness; +extern int log_stale_services; +extern int log_stale_hosts; extern int check_host_freshness; extern int auto_reschedule_checks; @@ -1164,6 +1166,28 @@ check_service_freshness = (atoi(value) > 0) ? TRUE : FALSE; } + else if (!strcmp(variable, "log_stale_services")) { + + if (strlen(value) != 1 || value[0] < '0' || value[0] > '1') { + asprintf(&error_message, "Illegal value for log_stale_services"); + error = TRUE; + break; + } + + log_stale_services = (atoi(value) > 0) ? TRUE : FALSE; + } + + else if (!strcmp(variable, "log_stale_hosts")) { + + if (strlen(value) != 1 || value[0] < '0' || value[0] > '1') { + asprintf(&error_message, "Illegal value for log_stale_hosts"); + error = TRUE; + break; + } + + log_stale_hosts = (atoi(value) > 0) ? TRUE : FALSE; + } + else if (!strcmp(variable, "check_host_freshness")) { if (strlen(value) != 1 || value[0] < '0' || value[0] > '1') { diff -uNr icinga-core-1.14.0/base/icinga.c icinga-core-1.14.2/base/icinga.c --- icinga-core-1.14.0/base/icinga.c 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/base/icinga.c 2017-12-20 15:45:58.000000000 +0100 @@ -126,6 +126,8 @@ int check_orphaned_services = DEFAULT_CHECK_ORPHANED_SERVICES; int check_orphaned_hosts = DEFAULT_CHECK_ORPHANED_HOSTS; int check_service_freshness = DEFAULT_CHECK_SERVICE_FRESHNESS; +int log_stale_services = DEFAULT_LOG_STALE_SERVICES; +int log_stale_hosts = DEFAULT_LOG_STALE_HOSTS; int check_host_freshness = DEFAULT_CHECK_HOST_FRESHNESS; int auto_reschedule_checks = DEFAULT_AUTO_RESCHEDULE_CHECKS; int auto_rescheduling_window = DEFAULT_AUTO_RESCHEDULING_WINDOW; diff -uNr icinga-core-1.14.0/base/Makefile.in icinga-core-1.14.2/base/Makefile.in --- icinga-core-1.14.0/base/Makefile.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/base/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -49,7 +49,6 @@ INSTALL=@INSTALL@ INSTALL_OPTS=@INSTALL_OPTS@ COMMAND_OPTS=@COMMAND_OPTS@ -STRIP=@STRIP@ CGIURL=@cgiurl@ HTMURL=@htmurl@ @@ -61,7 +60,7 @@ THREADLIBS=@THREADLIBS@ BROKERLIBS=@BROKERLIBS@ -BROKER_LDFLAGS=@BROKER_LDFLAGS@ +BROKER_LDFLAGS=@BROKER_LDFLAGS@ CP=@CP@ @@ -184,18 +183,7 @@ devclean: distclean install: - $(MAKE) install-basic - $(MAKE) strip-post-install - -install-unstripped: - $(MAKE) install-basic - -install-basic: $(INSTALL) -m 755 -d $(DESTDIR)$(BINDIR) $(INSTALL) -m 755 -d $(DESTDIR)$(LIBDIR) - $(INSTALL) -m 755 $(INSTALL_OPTS) @icinga_name@ $(DESTDIR)$(BINDIR) - $(INSTALL) -m 755 $(INSTALL_OPTS) @icingastats_name@ $(DESTDIR)$(BINDIR) - -strip-post-install: - $(STRIP) $(DESTDIR)$(BINDIR)/@icinga_name@ - $(STRIP) $(DESTDIR)$(BINDIR)/@icingastats_name@ + $(INSTALL) -m 755 @icinga_name@ $(DESTDIR)$(BINDIR) + $(INSTALL) -m 755 @icingastats_name@ $(DESTDIR)$(BINDIR) diff -uNr icinga-core-1.14.0/base/utils.c icinga-core-1.14.2/base/utils.c --- icinga-core-1.14.0/base/utils.c 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/base/utils.c 2017-12-20 15:45:58.000000000 +0100 @@ -144,6 +144,8 @@ extern int check_orphaned_services; extern int check_orphaned_hosts; extern int check_service_freshness; +extern int log_stale_services; +extern int log_stale_hosts; extern int check_host_freshness; extern int auto_reschedule_checks; @@ -4558,6 +4560,8 @@ check_orphaned_services = DEFAULT_CHECK_ORPHANED_SERVICES; check_orphaned_hosts = DEFAULT_CHECK_ORPHANED_HOSTS; check_service_freshness = DEFAULT_CHECK_SERVICE_FRESHNESS; + log_stale_services = DEFAULT_LOG_STALE_SERVICES; + log_stale_hosts = DEFAULT_LOG_STALE_HOSTS; check_host_freshness = DEFAULT_CHECK_HOST_FRESHNESS; auto_reschedule_checks = DEFAULT_AUTO_RESCHEDULE_CHECKS; diff -uNr icinga-core-1.14.0/cgi/Makefile.in icinga-core-1.14.2/cgi/Makefile.in --- icinga-core-1.14.0/cgi/Makefile.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/cgi/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -21,7 +21,6 @@ INSTALL_OPTS=@INSTALL_OPTS@ INSTALL_OPTS_WEB=@INSTALL_OPTS_WEB@ COMMAND_OPTS=@COMMAND_OPTS@ -STRIP=@STRIP@ CGIEXTRAS=@CGIEXTRAS@ @@ -185,22 +184,8 @@ devclean: distclean install: - $(MAKE) install-basic - $(MAKE) strip-post-install - -install-unstripped: - $(MAKE) install-basic - -install-basic: $(INSTALL) -m 775 $(INSTALL_OPTS_WEB) -d $(DESTDIR)$(CGILOGDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(CGIDIR) for file in *.cgi; do \ - $(INSTALL) -m 775 $(INSTALL_OPTS) $$file $(DESTDIR)$(CGIDIR); \ + $(INSTALL) -m 775 $$file $(DESTDIR)$(CGIDIR); \ done - -strip-post-install: - for file in *.cgi; do \ - $(STRIP) $(DESTDIR)$(CGIDIR)/$$file; \ - done - - diff -uNr icinga-core-1.14.0/cgi/summary.c icinga-core-1.14.2/cgi/summary.c --- icinga-core-1.14.0/cgi/summary.c 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/cgi/summary.c 2017-12-20 15:45:58.000000000 +0100 @@ -1618,7 +1618,7 @@ continue; /* find the service */ - if ((temp_service = find_service(temp_event->host_name, temp_event->service_description)) == NULL) + if (temp_event->event_type != AE_HOST_ALERT && (temp_service = find_service(temp_event->host_name, temp_event->service_description)) == NULL) continue; get_time_string(&temp_event->time_stamp, date_time, (int)sizeof(date_time), SHORT_DATE_TIME); diff -uNr icinga-core-1.14.0/Changelog icinga-core-1.14.2/Changelog --- icinga-core-1.14.0/Changelog 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/Changelog 2017-12-20 15:45:58.000000000 +0100 @@ -16,8 +16,34 @@ NEWS -* This is the Icinga 1.x development branch. If you are looking for Icinga 2.x - please check https://www.icinga.org/icinga2 +* This is the Icinga 1.x development branch. It will only receive security +patches for 1.14.x, feature/bug patches are EOL. + +Consider a migration to Icinga 2: https://www.icinga.com/docs + +1.14.2 - 12/20/2017 + +SECURITY FIXES + +* Don't change ownership of STATEDIR +* Change --with-tmp-{file,path} to default to $localstatedir instead of /tmp + +Again, this only affects source installations. Packages are safe. + +1.14.1 - 12/19/2017 + +SECURITY FIXES + +* #1601 & #1604: CVE-2017-16882: Fix source installation permissions (packages are not affected) + +FIXES + +* #8 & #1578 Remove "are stale" log entries +* #1603 Fix SOFT recovery for services +* #7 Feature/initd run with precache +* #1599 & #1600 No host alerts included in alert summary report of type "Most Recent Alert" +* #1595 Fix database upgrade to 1.13.0 with old schema + 1.14.0 - 12/22/2016 diff -uNr icinga-core-1.14.0/common/macros.c icinga-core-1.14.2/common/macros.c --- icinga-core-1.14.0/common/macros.c 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/common/macros.c 2017-12-20 15:45:58.000000000 +0100 @@ -197,7 +197,7 @@ /* grab the macro value */ result = grab_macro_value_r(mac, temp_buffer, &selected_macro, &clean_options, &free_macro); - log_debug_info(DEBUGL_MACROS, 2, " Processed '%s', Clean Options: %d, Free: %d\n, Value: '%s'", temp_buffer, clean_options, free_macro, selected_macro ? selected_macro : ""); + log_debug_info(DEBUGL_MACROS, 2, " Processed '%s', Clean Options: %d, Free: %d, Value: '%s'\n", temp_buffer, clean_options, free_macro, selected_macro ? selected_macro : ""); /* an error occurred - we couldn't parse the macro, so continue on */ if (result == ERROR) { diff -uNr icinga-core-1.14.0/configure icinga-core-1.14.2/configure --- icinga-core-1.14.0/configure 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/configure 2017-12-20 15:45:58.000000000 +0100 @@ -713,7 +713,6 @@ EGREP GREP CPP -STRIP SET_MAKE OBJEXT EXEEXT @@ -2512,9 +2511,9 @@ PKG_NAME=icinga-core -PKG_VERSION="1.14.0" +PKG_VERSION="1.14.2" PKG_HOME_URL="http://www.icinga.org/" -PKG_REL_DATE="12-22-2016" +PKG_REL_DATE="12-20-2017" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -3532,47 +3531,6 @@ SET_MAKE="MAKE=${MAKE-make}" fi -# Extract the first word of "strip", so it can be a program name with args. -set dummy strip; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_STRIP+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $STRIP in - [\\/]* | ?:[\\/]*) - ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - - test -z "$ac_cv_path_STRIP" && ac_cv_path_STRIP="true" - ;; -esac -fi -STRIP=$ac_cv_path_STRIP -if test -n "$STRIP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 -$as_echo "$STRIP" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - ac_ext=c @@ -5434,7 +5392,7 @@ fi if test x$TMPDIR = xno; then - TMPDIR="/tmp" + TMPDIR="$localstatedir" fi @@ -5448,7 +5406,7 @@ fi if test x$TMPFILE = xno; then - TMPFILE="/tmp/icinga.tmp" + TMPFILE="$localstatedir/icinga.tmp" fi diff -uNr icinga-core-1.14.0/configure.in icinga-core-1.14.2/configure.in --- icinga-core-1.14.0/configure.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/configure.in 2017-12-20 15:45:58.000000000 +0100 @@ -9,9 +9,9 @@ AC_PREFIX_DEFAULT(/usr/local/icinga) PKG_NAME=icinga-core -PKG_VERSION="1.14.0" +PKG_VERSION="1.14.2" PKG_HOME_URL="http://www.icinga.org/" -PKG_REL_DATE="12-22-2016" +PKG_REL_DATE="12-20-2017" dnl Figure out how to invoke "install" and what install options to use. AC_PROG_INSTALL @@ -23,7 +23,6 @@ dnl Checks for programs. AC_PROG_CC AC_PROG_MAKE_SET -AC_PATH_PROG([STRIP],[strip],[true]) dnl Checks for header files. AC_HEADER_STDC @@ -319,7 +318,7 @@ TMPDIR=no AC_ARG_WITH(temp-dir,AC_HELP_STRING([--with-temp-dir=<path>],[sets path to temp directory path where Icinga can create temp files for service/host check results]),TMPDIR=$withval,TMPDIR=no) if test x$TMPDIR = xno; then - TMPDIR="/tmp" + TMPDIR="$localstatedir" fi AC_SUBST(TMPDIR) @@ -327,7 +326,7 @@ TMPFILE=no AC_ARG_WITH(temp-file,AC_HELP_STRING([--with-temp-file=<filepath>],[sets path to an Icinga exclusive update temp file i.e. /tmp/icinga.tmp]),TMPFILE=$withval,TMPFILE=no) if test x$TMPFILE = xno; then - TMPFILE="/tmp/icinga.tmp" + TMPFILE="$localstatedir/icinga.tmp" fi AC_SUBST(TMPFILE) diff -uNr icinga-core-1.14.0/contrib/convertcfg.c icinga-core-1.14.2/contrib/convertcfg.c --- icinga-core-1.14.0/contrib/convertcfg.c 2018-02-23 22:40:17.719895770 +0100 +++ icinga-core-1.14.2/contrib/convertcfg.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,741 +0,0 @@ -/************************************************************************ - * - * CONVERTCFG.C - Config File Convertor - * - * Copyright (c) 2001-2005 Ethan Galstad (egalstad@nagios.org) - * - * License: - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - * - ************************************************************************/ - -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -char *my_strsep(char **, const char *); - -int main(int argc, char **argv) { - FILE *fp; - char *temp_ptr; - char *temp_ptr2; - char input[8096]; - int notify_recovery; - int notify_warning; - int notify_critical; - int notify_down; - int notify_unreachable; - int option; - int have_template = 0; - int x = 0, y = 0; - char *host_name; - char *service_description; - char *host_name2; - char *service_description2; - - if (argc != 3) { - printf("Nagios Config File Converter\n"); - printf("Written by Ethan Galstad (egalstad@nagios.org)\n"); - printf("Last Modified: 08-12-2005\n"); - printf("\n"); - printf("Usage: %s <config file> <object type>\n", argv[0]); - printf("\n"); - printf("Valid object types include:\n"); - printf("\n"); - printf("\ttimeperiods\n"); - printf("\tcommands\n"); - printf("\tcontacts\n"); - printf("\tcontactgroups\n"); - printf("\thosts\n"); - printf("\thostgroups\n"); - printf("\thostgroupescalationss\n"); - printf("\tservices\n"); - printf("\tservicedependencies\n"); - printf("\tserviceescalations\n"); - printf("\n"); - printf("\thostextinfo\n"); - printf("\tserviceextinfo\n"); - printf("\n"); - printf("Notes:\n"); - printf("\n"); - printf("This utility is designed to aide you in converting your old 'host'\n"); - printf("config file(s) to the new template-based config file style. It is\n"); - printf("also capable of converting extended host and service information\n"); - printf("definitions in your old CGI config file.\n"); - printf("\n"); - printf("Supply the name of your old 'host' config file (or your old CGI config\n"); - printf("file if you're converting extended host/service definitions) on the\n"); - printf("command line, along with the type of object you would like to produce\n"); - printf("a new config file for. Your old config file is not overwritten - new\n"); - printf("configuration data is printed to standard output, so you can redirect it\n"); - printf("wherever you like.\n"); - printf("\n"); - printf("Please note that you can only specify one type of object at a time\n"); - printf("on the command line.\n"); - printf("\n"); - printf("IMPORTANT: This utility will generate Nagios 1.x compliant config files.\n"); - printf("However, the config files are not totally compatible with Nagios 2.x, so\n"); - printf("you will have to do some manual tweaking.\n"); - printf("\n"); - return -1; - } - - fp = fopen(argv[1], "r"); - if (fp == NULL) { - printf("Error: Could not open file '%s' for reading.\n", argv[1]); - return -1; - } - - for (fgets(input, sizeof(input) - 1, fp); !feof(fp); fgets(input, sizeof(input) - 1, fp)) { - - /* skip blank lines and comments */ - if (input[0] == '#' || input[0] == '\x0' || input[0] == '\n' || input[0] == '\r') - continue; - - /* timeperiods */ - if (strstr(input, "timeperiod[") && !strcmp(argv[2], "timeperiods")) { - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, "]"); - - printf("# '%s' timeperiod definition\n", temp_ptr); - printf("define timeperiod{\n"); - /*printf("\tname\t\t%s\n",temp_ptr);*/ - printf("\ttimeperiod_name\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\talias\t\t%s\n", temp_ptr + 1); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tsunday\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tmonday\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\ttuesday\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\twednesday\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tthursday\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tfriday\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tsaturday\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - /* commands */ - if (strstr(input, "command[") && !strcmp(argv[2], "commands")) { - - temp_ptr = strtok(input, "["); - temp_ptr = strtok(NULL, "]"); - - printf("# '%s' command definition\n", temp_ptr); - printf("define command{\n"); - /*printf("\tname\t\t%s\n",temp_ptr);*/ - printf("\tcommand_name\t%s\n", temp_ptr); - - temp_ptr = strtok(NULL, "\n"); - - printf("\tcommand_line\t%s\n", temp_ptr + 1); - - printf("\t}\n\n\n"); - } - - /* contacts */ - if (strstr(input, "contact[") && !strcmp(argv[2], "contacts")) { - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, "]"); - - printf("# '%s' contact definition\n", temp_ptr); - printf("define contact{\n"); - /*printf("\tname\t\t\t\t%s\n",temp_ptr);*/ - printf("\tcontact_name\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\talias\t\t\t\t%s\n", temp_ptr + 1); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tservice_notification_period\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\thost_notification_period\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_recovery = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_critical = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_warning = atoi(temp_ptr); - - option = 0; - printf("\tservice_notification_options\t"); - if (notify_recovery == 1 || notify_critical == 1 || notify_warning == 1) { - if (notify_warning == 1) { - printf("w,u"); - option = 1; - } - if (notify_critical == 1) { - if (option == 1) - printf(","); - printf("c"); - option = 1; - } - if (notify_recovery == 1) { - if (option == 1) - printf(","); - printf("r"); - } - } else - printf("n"); - printf("\n"); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_recovery = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_down = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_unreachable = atoi(temp_ptr); - - option = 0; - printf("\thost_notification_options\t"); - if (notify_recovery == 1 || notify_down == 1 || notify_unreachable == 1) { - if (notify_down == 1) { - printf("d"); - option = 1; - } - if (notify_unreachable == 1) { - if (option == 1) - printf(","); - printf("u"); - option = 1; - } - if (notify_recovery == 1) { - if (option == 1) - printf(","); - printf("r"); - } - } else - printf("n"); - printf("\n"); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tservice_notification_commands\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\thost_notification_commands\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\temail\t\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tpager\t\t\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - - /* contactgroups */ - if (strstr(input, "contactgroup[") && !strcmp(argv[2], "contactgroups")) { - - temp_ptr = strtok(input, "["); - temp_ptr = strtok(NULL, "]"); - - printf("# '%s' contact group definition\n", temp_ptr); - printf("define contactgroup{\n"); - /*printf("\tname\t\t\t%s\n",temp_ptr);*/ - printf("\tcontactgroup_name\t%s\n", temp_ptr); - - temp_ptr = strtok(NULL, ";"); - printf("\talias\t\t\t%s\n", temp_ptr + 1); - - temp_ptr = strtok(NULL, "\n"); - - printf("\tmembers\t\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - /* hosts */ - if (strstr(input, "host[") && !strcmp(argv[2], "hosts")) { - - if (have_template == 0) { - - printf("# Generic host definition template\n"); - printf("define host{\n"); - printf("\tname\t\t\t\tgeneric-host\t; The name of this host template - referenced in other host definitions, used for template recursion/resolution\n"); - printf("\tactive_checks_enabled\t\t1\t; Active host checks are enabled\n"); - printf("\tpassive_checks_enabled\t\t1\t; Passive host checks are enabled/accepted\n"); - printf("\tnotifications_enabled\t\t1\t; Host notifications are enabled\n"); - printf("\tevent_handler_enabled\t\t1\t; Host event handler is enabled\n"); - printf("\tflap_detection_enabled\t\t1\t; Flap detection is enabled\n"); - /*printf("\tfailure_prediction_enabled\t1\t; Failure prediction is enabled\n");*/ - printf("\tprocess_perf_data\t\t1\t; Process performance data\n"); - printf("\tretain_status_information\t1\t; Retain status information across program restarts\n"); - printf("\tretain_nonstatus_information\t1\t; Retain non-status information across program restarts\n"); - printf("\n"); - printf("\tregister\t\t\t0\t; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!\n"); - printf("\t}\n\n"); - - have_template = 1; - } - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, "]"); - - printf("# '%s' host definition\n", temp_ptr); - printf("define host{\n"); - printf("\tuse\t\t\tgeneric-host\t\t; Name of host template to use\n\n"); - printf("\thost_name\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\talias\t\t\t%s\n", temp_ptr + 1); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\taddress\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tparents\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tcheck_command\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tmax_check_attempts\t%d\n", atoi(temp_ptr)); - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tnotification_interval\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tnotification_period\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_recovery = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_down = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_unreachable = atoi(temp_ptr); - - option = 0; - printf("\tnotification_options\t"); - if (notify_recovery == 1 || notify_down == 1 || notify_unreachable == 1) { - if (notify_down == 1) { - printf("d"); - option = 1; - } - if (notify_unreachable == 1) { - if (option == 1) - printf(","); - printf("u"); - option = 1; - } - if (notify_recovery == 1) { - if (option == 1) - printf(","); - printf("r"); - } - } else - printf("n"); - printf("\n"); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tevent_handler\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - /* hostgroups */ - if (strstr(input, "hostgroup[") && !strcmp(argv[2], "hostgroups")) { - - temp_ptr = strtok(input, "["); - temp_ptr = strtok(NULL, "]"); - - printf("# '%s' host group definition\n", temp_ptr); - printf("define hostgroup{\n"); - /*printf("\tname\t\t%s\n",temp_ptr);*/ - printf("\thostgroup_name\t%s\n", temp_ptr); - - temp_ptr = strtok(NULL, ";"); - printf("\talias\t\t%s\n", temp_ptr + 1); - - temp_ptr = strtok(NULL, ";"); - /*printf("\tcontact_groups\t%s\n",temp_ptr);*/ - - temp_ptr = strtok(NULL, "\n"); - - printf("\tmembers\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - - /* services */ - if (strstr(input, "service[") && !strcmp(argv[2], "services")) { - - if (have_template == 0) { - - printf("# Generic service definition template\n"); - printf("define service{\n"); - printf("\tname\t\t\t\tgeneric-service\t; The 'name' of this service template, referenced in other service definitions\n"); - printf("\tactive_checks_enabled\t\t1\t; Active service checks are enabled\n"); - printf("\tpassive_checks_enabled\t\t1\t; Passive service checks are enabled/accepted\n"); - printf("\tparallelize_check\t\t1\t; Active service checks should be parallelized (disabling this can lead to major performance problems)\n"); - printf("\tobsess_over_service\t\t1\t; We should obsess over this service (if necessary)\n"); - printf("\tcheck_freshness\t\t\t0\t; Default is to NOT check service 'freshness'\n"); - printf("\tnotifications_enabled\t\t1\t; Service notifications are enabled\n"); - printf("\tevent_handler_enabled\t\t1\t; Service event handler is enabled\n"); - printf("\tflap_detection_enabled\t\t1\t; Flap detection is enabled\n"); - /*printf("\tfailure_prediction_enabled\t1\t; Failure prediction is enabled\n");*/ - printf("\tprocess_perf_data\t\t1\t; Process performance data\n"); - printf("\tretain_status_information\t1\t; Retain status information across program restarts\n"); - printf("\tretain_nonstatus_information\t1\t; Retain non-status information across program restarts\n"); - printf("\n"); - printf("\tregister\t\t\t0\t; DONT REGISTER THIS DEFINITION - ITS NOT A REAL SERVICE, JUST A TEMPLATE!\n"); - printf("\t}\n\n"); - - have_template = 1; - } - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, "]"); - - printf("# Service definition\n"); - printf("define service{\n"); - printf("\tuse\t\t\t\tgeneric-service\t\t; Name of service template to use\n\n"); - printf("\thost_name\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tservice_description\t\t%s\n", temp_ptr + 1); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tis_volatile\t\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tcheck_period\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tmax_check_attempts\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tnormal_check_interval\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tretry_check_interval\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tcontact_groups\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tnotification_interval\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tnotification_period\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_recovery = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_critical = atoi(temp_ptr); - temp_ptr = my_strsep(&temp_ptr2, ";"); - notify_warning = atoi(temp_ptr); - - option = 0; - printf("\tnotification_options\t\t"); - if (notify_recovery == 1 || notify_critical == 1 || notify_warning == 1) { - if (notify_warning == 1) { - printf("w,u"); - option = 1; - } - if (notify_critical == 1) { - if (option == 1) - printf(","); - printf("c"); - option = 1; - } - if (notify_recovery == 1) { - if (option == 1) - printf(","); - printf("r"); - } - } else - printf("n"); - printf("\n"); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tevent_handler\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tcheck_command\t\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - /* hostgroup escalations */ - if (strstr(input, "hostgroupescalation[") && !strcmp(argv[2], "hostgroupescalations")) { - - x++; - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, "]"); - - printf("# Hostgroup '%s' escalation definition\n", temp_ptr); - printf("define hostgroupescalation{\n"); - - printf("\thostgroup_name\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, "-"); - printf("\tfirst_notification\t\t%d\n", atoi(temp_ptr + 1)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tlast_notification\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tcontact_groups\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - printf("\tnotification_interval\t\t%d\n", atoi(temp_ptr)); - - printf("\t}\n\n\n"); - } - - /* service escalations */ - if (strstr(input, "serviceescalation[") && !strcmp(argv[2], "serviceescalations")) { - - x++; - - printf("# Serviceescalation definition\n"); - printf("define serviceescalation{\n"); - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - host_name = my_strsep(&temp_ptr2, ";"); - service_description = my_strsep(&temp_ptr2, "]"); - - printf("\thost_name\t\t%s\n", host_name); - printf("\tservice_description\t\t%s\n", service_description); - - temp_ptr = my_strsep(&temp_ptr2, "-"); - printf("\tfirst_notification\t\t%d\n", atoi(temp_ptr + 1)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tlast_notification\t\t%d\n", atoi(temp_ptr)); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - printf("\tcontact_groups\t\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - printf("\tnotification_interval\t\t%d\n", atoi(temp_ptr)); - - printf("\t}\n\n\n"); - } - - /* service dependencies */ - if (strstr(input, "servicedependency[") && !strcmp(argv[2], "servicedependencies")) { - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - host_name = my_strsep(&temp_ptr2, ";"); - service_description = my_strsep(&temp_ptr2, "]"); - host_name2 = my_strsep(&temp_ptr2, ";") + 1; - service_description2 = my_strsep(&temp_ptr2, ";"); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - - x++; - - printf("# Servicedependency definition\n"); - printf("define servicedependency{\n"); - - printf("\thost_name\t\t\t%s\n", host_name2); - printf("\tservice_description\t\t%s\n", service_description2); - printf("\tdependent_host_name\t\t%s\n", host_name); - printf("\tdependent_service_description\t%s\n", service_description); - - printf("\texecution_failure_criteria\t"); - for (y = 0; temp_ptr[y] != '\x0'; y++) - printf("%s%c", (y > 0) ? "," : "", temp_ptr[y]); - if (y == 0) - printf("n"); - printf("\t; These are the criteria for which check execution will be suppressed\n"); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - - printf("\tnotification_failure_criteria\t"); - for (y = 0; temp_ptr[y] != '\x0'; y++) - printf("%s%c", (y > 0) ? "," : "", temp_ptr[y]); - if (y == 0) - printf("n"); - printf("\t; These are the criteria for which notifications will be suppressed\n"); - printf("\t}\n\n\n"); - } - - - /* extended host info */ - if (strstr(input, "hostextinfo[") && !strcmp(argv[2], "hostextinfo")) { - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, "]"); - - printf("# '%s' hostextinfo definition\n", temp_ptr); - printf("define hostextinfo{\n"); - printf("\thost_name\t\t%s\t\t; The name of the host this data is associated with\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - - if (temp_ptr + 1 != NULL && strcmp(temp_ptr + 1, "")) - printf("\tnotes_url\t\t\t%s\n", temp_ptr + 1); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\ticon_image\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tvrml_image\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\tstatusmap_image\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\ticon_image_alt\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\t2d_coords\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\t3d_coords\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - - /* extended service info */ - if (strstr(input, "serviceextinfo[") && !strcmp(argv[2], "serviceextinfo")) { - - temp_ptr2 = &input[0]; - temp_ptr = my_strsep(&temp_ptr2, "["); - temp_ptr = my_strsep(&temp_ptr2, ";"); - - printf("# '%s' serviceextinfo definition\n", temp_ptr); - printf("define serviceextinfo{\n"); - printf("\thost_name\t\t%s\t\t; The name of the service this data is associated with\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, "]"); - printf("\tservice_description\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - - if (temp_ptr + 1 != NULL && strcmp(temp_ptr + 1, "")) - printf("\tnotes_url\t\t%s\n", temp_ptr + 1); - - temp_ptr = my_strsep(&temp_ptr2, ";"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\ticon_image\t\t%s\n", temp_ptr); - - temp_ptr = my_strsep(&temp_ptr2, ";\r\n"); - if (temp_ptr != NULL && strcmp(temp_ptr, "")) - printf("\ticon_image_alt\t\t%s\n", temp_ptr); - - printf("\t}\n\n\n"); - } - - } - - - fclose(fp); - - return 0; -} - - - -/* fixes compiler problems under Solaris, since strsep() isn't included */ -/* this code is taken from the glibc source */ -char *my_strsep(char **stringp, const char *delim) { - char *begin, *end; - - begin = *stringp; - if (begin == NULL) - return NULL; - - /* A frequent case is when the delimiter string contains only one - character. Here we don't need to call the expensive `strpbrk' - function and instead work using `strchr'. */ - if (delim[0] == '\0' || delim[1] == '\0') { - char ch = delim[0]; - - if (ch == '\0') - end = NULL; - else { - if (*begin == ch) - end = begin; - else - end = strchr(begin + 1, ch); - } - } - - else - /* Find the end of the token. */ - end = strpbrk(begin, delim); - - if (end) { - - /* Terminate the token and set *STRINGP past NUL character. */ - *end++ = '\0'; - *stringp = end; - } else - /* No more delimiters; this is the last token. */ - *stringp = NULL; - - return begin; -} - - diff -uNr icinga-core-1.14.0/contrib/daemonchk.c icinga-core-1.14.2/contrib/daemonchk.c --- icinga-core-1.14.0/contrib/daemonchk.c 2018-02-23 22:40:17.719895770 +0100 +++ icinga-core-1.14.2/contrib/daemonchk.c 1970-01-01 01:00:00.000000000 +0100 @@ -1,247 +0,0 @@ -#include "../include/config.h" -#include "../include/common.h" -#include "../include/locations.h" -#include "../include/cgiutils.h" -#include "../include/getcgi.h" -#ifdef HAVE_GETOPT_H -#include <getopt.h> -#endif -#include <stdarg.h> - -#define CHARLEN 256 -#define max(a,b) ((a)>(b))?(a):(b) - -static int process_cgivars(void); - -static char *strscpy(char *dest, const char *src); -static char *ssprintf(char *str, const char *fmt, ...); -static void terminate(int result, const char *fmt, ...); -static void get_expire_time_string(time_t *raw_time, char *buffer, int buffer_length); - -int main(int argc, char **argv) { - FILE *fp; - char *status_file = NULL; - char *lock_file = NULL; - char *proc_file = NULL; - char input_buffer[CHARLEN]; - int c, age, pid, testpid, found; - int wt = -1; - int ct = -1; - struct stat statbuf; - time_t current_time; - -#ifdef DEFAULT_STATUS_FILE - status_file = strscpy(status_file, DEFAULT_STATUS_FILE); -#else - status_file = strscpy(status_file, "/usr/local/icinga/var/status.dat"); -#endif - -#ifdef DEFAULT_LOCK_FILE - lock_file = strscpy(lock_file, DEFAULT_LOCK_FILE); -#else - lock_file = strscpy(lock_file, "/usr/local/icinga/var/icinga.lock"); -#endif - - if (getenv("REQUEST_METHOD")) { - process_cgivars(); - } else { /* get arguments */ - - while ((c = getopt(argc, argv, "+c:w:s:l:")) != EOF) { - switch (c) { - case 'c': - ct = atoi(optarg); - break; - case 'w': - wt = atoi(optarg); - break; - case 's': - status_file = optarg; - break; - case 'l': - lock_file = optarg; - break; - } - } - } - - /* find status file, get lastmod time */ - if (stat(status_file, &statbuf) == -1) { - printf("ICINGA CRITICAL - could not find status log: %s\n", status_file); - exit(STATE_CRITICAL); - } - - time(¤t_time); - age = (int)(current_time - statbuf.st_mtime); - - /* find lock file. get pid if it exists */ - if (stat(lock_file, &statbuf) == -1) { - printf("ICINGA CRITICAL - could not find lock file: %s\n", lock_file); - exit(STATE_CRITICAL); - } - - fp = fopen(lock_file, "r"); - fscanf(fp, "%d", &pid); - fclose(fp); - proc_file = ssprintf(proc_file, "/proc/%d", pid); - - if (stat("/proc", &statbuf) == 0) { - if (stat(proc_file, &statbuf) == -1) { - printf("ICINGA CRITICAL - could not find proc file: %s\n", proc_file); - exit(STATE_CRITICAL); - } - } else if (snprintf(proc_file, CHARLEN - 1, "/bin/ps -o pid -p %d", pid) && (fp = popen(proc_file, "r")) != NULL) { - fgets(input_buffer, CHARLEN - 1, fp); - fgets(input_buffer, CHARLEN - 1, fp); - if (sscanf(input_buffer, "%d", &testpid) == 1) { - if (testpid != pid) { - printf("ICINGA CRITICAL - could not find process(1): %d\n", pid); - exit(STATE_CRITICAL); - } - } - } else if (snprintf(proc_file, CHARLEN - 1, "/bin/ps -eo pid") && (fp = popen(proc_file, "r")) != NULL) { - found = FALSE; - fgets(input_buffer, CHARLEN - 1, fp); - while (fgets(input_buffer, CHARLEN - 1, fp)) { - if (sscanf(input_buffer, "%d", &testpid) == 1) - if (testpid == pid) found = TRUE; - } - if (!found) { - printf("ICINGA CRITICAL - could not find process(2): %d\n", pid); - exit(STATE_CRITICAL); - } - } else if (snprintf(proc_file, CHARLEN - 1, "/bin/ps -Ao pid") && (fp = popen(proc_file, "r")) != NULL) { - found = FALSE; - fgets(input_buffer, CHARLEN - 1, fp); - while (fgets(input_buffer, CHARLEN - 1, fp)) { - if (sscanf(input_buffer, "%d", &testpid) == 1) - if (testpid == pid) found = TRUE; - } - if (!found) { - printf("ICINGA CRITICAL - could not find process(2): %d\n", pid); - exit(STATE_CRITICAL); - } - } - - if (ct > 0 && ct < age) { - printf("ICINGA CRITICAL - status written %d seconds ago\n", age); - exit(STATE_CRITICAL); - } else if (wt > 0 && wt < age) { - printf("ICINGA WARNING - status written %d seconds ago\n", age); - exit(STATE_WARNING); - } else { - printf("ICINGA OK - status written %d seconds ago\n", age); - exit(STATE_OK); - } -} - -static int process_cgivars(void) { - char **variables; - int error = FALSE; - int x; - - variables = getcgivars(); - - for (x = 0; variables[x] != NULL; x++) { - - /* do some basic length checking on the variable identifier to prevent buffer overflows */ - if (strlen(variables[x]) >= MAX_INPUT_BUFFER - 1) { - x++; - continue; - } - } - return error; -} - -/* get date/time string used in META tags for page expiration */ -static void get_expire_time_string(time_t *raw_time, char *buffer, int buffer_length) { - time_t t; - struct tm *tm_ptr; - int day; - int hour; - int minute; - int second; - int year; - char *weekdays[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; - char *months[12] = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sept", "Oct", "Nov", "Dec"}; - - if (raw_time == NULL) - time(&t); - else - t = *raw_time; - - tm_ptr = gmtime(&t); - - hour = tm_ptr->tm_hour; - minute = tm_ptr->tm_min; - second = tm_ptr->tm_sec; - day = tm_ptr->tm_mday; - year = tm_ptr->tm_year + 1900; - - snprintf(buffer, buffer_length, "%s, %d %s %d %02d:%02d:%02d GMT", weekdays[tm_ptr->tm_wday], day, months[tm_ptr->tm_mon], year, hour, minute, second); - buffer[buffer_length-1] = '\x0'; - - return; -} - -static char *strscpy(char *dest, const char *src) { - int len; - - if (src != NULL) - len = strlen(src) + 1; - else - return dest; - - if (dest == NULL || strlen(dest) < len) - dest = realloc(dest, len); - if (dest == NULL) - terminate(STATE_UNKNOWN, "failed realloc in strscpy\n"); - - strncpy(dest, src, len); - - return dest; -} - -static char *ssprintf(char *str, const char *fmt, ...) { - va_list ap; - int nchars; - int size; - - if (str == NULL) - str = malloc(CHARLEN); - if (str == NULL) - terminate(STATE_UNKNOWN, "malloc failed in ssprintf"); - - size = max(strlen(str), CHARLEN); - - va_start(ap, fmt); - - while (1) { - - nchars = vsnprintf(str, size, fmt, ap); - - if (nchars > -1) - if (nchars < size) { - va_end(ap); - return str; - } else { - size = nchars + 1; - } - - else - size *= 2; - - str = realloc(str, nchars + 1); - - if (str == NULL) - terminate(STATE_UNKNOWN, "realloc failed in ssprintf"); - } - -} - -static void terminate(int result, const char *fmt, ...) { - va_list ap; - va_start(ap, fmt); - vprintf(fmt, ap); - va_end(ap); - exit(result); -} diff -uNr icinga-core-1.14.0/contrib/Makefile.in icinga-core-1.14.2/contrib/Makefile.in --- icinga-core-1.14.0/contrib/Makefile.in 2018-02-23 22:40:17.715895841 +0100 +++ icinga-core-1.14.2/contrib/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -23,17 +23,10 @@ BINDIR=@bindir@ LIBDIR=@libdir@ -CGIS=traceroute.cgi daemonchk.cgi -UTILS=mini_epn new_mini_epn convertcfg +UTILS=mini_epn new_mini_epn ALL=$(CGIS) $(UTILS) DST=dst -CGI_C=$(SRC_CGI)/getcgi.c -CGI_O=$(SRC_CGI)/getcgi.o $(SNPRINTF_O) -CGI_H=$(SRC_INCLUDE)/getcgi.h -COMMON_H=$(SRC_INCLUDE)/config.h $(SRC_INCLUDE)/common.h $(SRC_INCLUDE)/locations.h - - ############################### # Debug ############################### @@ -50,7 +43,7 @@ all: $(ALL) clean: - rm -f convertcfg daemonchk.cgi mini_epn new_mini_epn core dst *.o + rm -f mini_epn new_mini_epn core dst *.o rm -f */*/*~ rm -f */*~ rm -f *~ @@ -63,20 +56,12 @@ devclean: distclean install: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CGIDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR) - for f in $(CGIS); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(DESTDIR)$(CGIDIR); done - for f in $(UTILS); do $(INSTALL) -m 775 $(INSTALL_OPTS) $$f $(DESTDIR)$(BINDIR); done + $(INSTALL) -m 775 -d $(DESTDIR)$(BINDIR) + for f in $(UTILS); do $(INSTALL) -m 775 $$f $(DESTDIR)$(BINDIR); done ############################################################################## # rules and dependencies for actual target programs -daemonchk.cgi: daemonchk.o $(CGI_O) $(CGI_H) $(COMMON_H) - $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< $(CGI_O) - -daemonchk.o: daemonchk.c - $(CC) $(CFLAGS) -c -o $@ $< -I$(SRC_INCLUDE) - mini_epn: mini_epn.c perl -MExtUtils::Embed -e xsinit $(CC) $(CFLAGS) -c perlxsi.c `perl -MExtUtils::Embed -e ccopts` @@ -90,16 +75,3 @@ $(CC) $(CFLAGS) $(LDFLAGS) perlxsi.o new_mini_epn.o `perl -MExtUtils::Embed -e ccopts -e ldopts` -o $@ dst: dst.c $(CC) $(CFLAGS) -o $@ $< - - -############################################################################## -# dependencies - -$(CGI_O): $(CGI_C) - cd $(SRC_CGI) && make $(CGI_O) - -############################################################################## -# implicit rules - -%.cgi : %.c - $(CC) $(CFLAGS) $(LDFLAGS) $< $(CGI_O) -o $@ diff -uNr icinga-core-1.14.0/daemon-init.in icinga-core-1.14.2/daemon-init.in --- icinga-core-1.14.0/daemon-init.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/daemon-init.in 2017-12-20 15:45:58.000000000 +0100 @@ -27,6 +27,7 @@ IcingaGroup=@icinga_grp@ IcingaChkFile=@ICINGACHKFILE@ IcingaPrecacheFallback=0 +IcingaPrecache=0 # load extra environment variables if [ -f /etc/sysconfig/icinga ]; then @@ -199,7 +200,15 @@ case "$1" in start) - if test $IcingaPrecacheFallback != 1; then + if test $IcingaPrecache != 0; then + chk_config "CONFIG ERROR! Start aborted. See $IcingaChkFile for details." precache + + if test $? != 0; then + exit 6 + fi + + start precache + elif test $IcingaPrecacheFallback != 1; then chk_config "CONFIG ERROR! Start aborted. See $IcingaChkFile for details." if test $? != 0; then @@ -239,10 +248,10 @@ # new IcingaRunFile, allowing multiple icinga daemons # to (sooner or later) run - John Sellens printf 'Waiting for icinga to exit .' - for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15; do + for i in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17; do if status_icinga; then printf '.' - sleep 1 + sleep $(echo $i | awk '{printf "%.2f \n", $1/10}') else break fi @@ -282,7 +291,13 @@ ;; restart) - if test $IcingaPrecacheFallback != 1; then + if test $IcingaPrecache != 0; then + chk_config " CONFIG ERROR! Restart aborted. See $IcingaChkFile for details." precache + + if test $? != 0; then + exit 6 + fi + elif test $IcingaPrecacheFallback != 1; then chk_config " CONFIG ERROR! Restart aborted. See $IcingaChkFile for details." if test $? != 0; then @@ -291,7 +306,11 @@ fi $0 stop - start + if test $IcingaPrecache != 0; then + start precache + else + start + fi ;; reload|force-reload) diff -uNr icinga-core-1.14.0/html/main.html icinga-core-1.14.2/html/main.html --- icinga-core-1.14.0/html/main.html 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/html/main.html 2017-12-20 15:45:58.000000000 +0100 @@ -18,9 +18,9 @@ </div> <div id="currentversioninfo"> -<div class="version">Version 1.14.0</div> -<div class="releasedate">December 22, 2016</div> -<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.14.0</a></div> +<div class="version">Version 1.14.2</div> +<div class="releasedate">December 20, 2017</div> +<div class="whatsnew"><a href="docs/en/whatsnew.html">Read what's new in Icinga 1.14.2</a></div> </div> <div id="developer"> diff -uNr icinga-core-1.14.0/html/Makefile.in icinga-core-1.14.2/html/Makefile.in --- icinga-core-1.14.0/html/Makefile.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/html/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -35,93 +35,86 @@ devclean: distclean install: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/media - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/stylesheets - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/stylesheets - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/js - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/en - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/de - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/docs/images/flags - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos/equipment - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos/hardware - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos/other - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/images/logos/vendors - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui/themes - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base/images - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui/ui - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui/ui/minified - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/jquery-ui-addon - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/js - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/ssi - $(INSTALL) -m 444 $(INSTALL_OPTS) log/.htaccess $(DESTDIR)$(CGILOGDIR) - $(INSTALL) -m 644 $(INSTALL_OPTS) log/index.htm $(DESTDIR)$(CGILOGDIR) - $(INSTALL) -m 664 $(INSTALL_OPTS) robots.txt $(DESTDIR)$(HTMLDIR) - $(INSTALL) -m 664 $(INSTALL_OPTS) docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/media + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/stylesheets + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs/stylesheets + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs/js + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs/en + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs/de + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs/images + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/docs/images/flags + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/images + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/images/logos + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/images/logos/equipment + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/images/logos/hardware + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/images/logos/other + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/images/logos/vendors + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui/themes + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base/images + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui/ui + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui/ui/minified + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/jquery-ui-addon + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/js + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/ssi + $(INSTALL) -m 444 log/.htaccess $(DESTDIR)$(CGILOGDIR) + $(INSTALL) -m 644 log/index.htm $(DESTDIR)$(CGILOGDIR) + $(INSTALL) -m 664 robots.txt $(DESTDIR)$(HTMLDIR) + $(INSTALL) -m 664 docs/robots.txt $(DESTDIR)$(HTMLDIR)/docs for file in *.html; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR); done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR); done for file in stylesheets/*.css; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/stylesheets; done for file in docs/*.html; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs; done for file in docs/js/*.js; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/js; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs/js; done for file in docs/stylesheets/*.css; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/stylesheets; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs/stylesheets; done for file in docs/en/*.html; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/en; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs/en; done for file in docs/de/*.html; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/de; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs/de; done for file in docs/images/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/images; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs/images; done for file in docs/images/flags/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/docs/images/flags; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/docs/images/flags; done for file in images/*.png; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images; done for file in images/*.jpg; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images; done for file in images/*.gif; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images; done for file in images/*.ico; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images; done for file in images/logos/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images/logos; done for file in images/logos/equipment/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos/equipment; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images/logos/equipment; done for file in images/logos/hardware/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos/hardware; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images/logos/hardware; done for file in images/logos/other/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos/other; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images/logos/other; done for file in images/logos/vendors/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/images/logos/vendors; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/images/logos/vendors; done for file in jquery-ui/ui/minified/*.js; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/jquery-ui/ui/minified; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/jquery-ui/ui/minified; done for file in jquery-ui/themes/base/*.css; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base; done for file in jquery-ui/themes/base/images/*.png; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base/images; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/jquery-ui/themes/base/images; done for file in jquery-ui-addon/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/jquery-ui-addon; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/jquery-ui-addon; done for file in js/*.js; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/js; done + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/js; done install-dev-docu: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/doxygen - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(HTMLDIR)/doxygen/html + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/doxygen + $(INSTALL) -m 775 -d $(DESTDIR)$(HTMLDIR)/doxygen/html #for file in doxygen/*.*; \ - #do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/doxygen; done + #do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/doxygen; done for file in doxygen/html/*.*; \ - do $(INSTALL) -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(HTMLDIR)/doxygen/html; done - -install-unstripped: - $(MAKE) install - - - - + do $(INSTALL) -m 664 $$file $(DESTDIR)$(HTMLDIR)/doxygen/html; done diff -uNr icinga-core-1.14.0/icinga.spec icinga-core-1.14.2/icinga.spec --- icinga-core-1.14.0/icinga.spec 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/icinga.spec 2017-12-20 15:45:58.000000000 +0100 @@ -54,7 +54,7 @@ Summary: Open Source host, service and network monitoring program Name: icinga -Version: 1.14.0 +Version: 1.14.2 Release: %{revision}%{?dist} License: GPLv2 Group: Applications/System diff -uNr icinga-core-1.14.0/include/common.h icinga-core-1.14.2/include/common.h --- icinga-core-1.14.0/include/common.h 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/include/common.h 2017-12-20 15:45:58.000000000 +0100 @@ -27,8 +27,8 @@ #define PROGRAM_NAME "Icinga" #define PROGRAM_NAME_UC "ICINGA" #define PROGRAM_NAME_LC "icinga" -#define PROGRAM_VERSION "1.14.0" -#define PROGRAM_MODIFICATION_DATE "12-22-2016" +#define PROGRAM_VERSION "1.14.2" +#define PROGRAM_MODIFICATION_DATE "12-20-2017" /*#define DEBUG_CHECK_IPC 1 */ /*#define DEBUG_CHECK_IPC2 1*/ diff -uNr icinga-core-1.14.0/include/icinga.h icinga-core-1.14.2/include/icinga.h --- icinga-core-1.14.0/include/icinga.h 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/include/icinga.h 2017-12-20 15:45:58.000000000 +0100 @@ -117,6 +117,8 @@ #define DEFAULT_ENABLE_FLAP_DETECTION 0 /* don't enable flap detection */ #define DEFAULT_PROCESS_PERFORMANCE_DATA 0 /* don't process performance data */ #define DEFAULT_CHECK_SERVICE_FRESHNESS 1 /* check service result freshness */ +#define DEFAULT_LOG_STALE_SERVICES 1 /* log stale services messages */ +#define DEFAULT_LOG_STALE_HOSTS 1 /* log stale hosts messages */ #define DEFAULT_CHECK_HOST_FRESHNESS 0 /* don't check host result freshness */ #define DEFAULT_AUTO_RESCHEDULE_CHECKS 0 /* don't auto-reschedule host and service checks */ #define DEFAULT_TRANSLATE_PASSIVE_HOST_CHECKS 0 /* should we translate DOWN/UNREACHABLE passive host checks? */ diff -uNr icinga-core-1.14.0/Makefile.in icinga-core-1.14.2/Makefile.in --- icinga-core-1.14.0/Makefile.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -89,7 +89,7 @@ ############################### # Global ############################### -ICINGA_VERSION=1.14.0 +ICINGA_VERSION=1.14.2 CP=@CP@ @@ -368,24 +368,14 @@ cd $(SRC_CGI) && $(MAKE) $@ cd $(SRC_HTM) && $(MAKE) $@ - $(MAKE) install-basic - -install-unstripped: - cd $(SRC_BASE) && $(MAKE) $@ - cd $(SRC_CGI) && $(MAKE) $@ - cd $(SRC_HTM) && $(MAKE) $@ - - $(MAKE) install-basic - -install-basic: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(STATEDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBEXECDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(STATEDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(LIBEXECDIR) $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR) $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CHECKRESULTDIR) if [ $(INSTALLPERLSTUFF) = yes ]; then \ - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(P1FILELOC); \ - $(INSTALL) -m 664 $(INSTALL_OPTS) p1.pl $(DESTDIR)$(P1FILELOC); \ + $(INSTALL) -m 775 -d $(DESTDIR)$(P1FILELOC); \ + $(INSTALL) -m 664 p1.pl $(DESTDIR)$(P1FILELOC); \ fi; @echo "" @@ -427,30 +417,30 @@ @echo "" install-cgiconf: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR) + $(INSTALL) -b -m 664 sample-config/cgi.cfg $(DESTDIR)$(CFGDIR)/cgi.cfg install-config: install-cgiconf - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/conf.d - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/modules - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg - $(INSTALL) -b -m 660 $(INSTALL_OPTS) sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/notifications.cfg $(DESTDIR)$(CFGDIR)/objects/notifications.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/livestatus.cfg $(DESTDIR)$(CFGDIR)/modules/livestatus.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/mod_gearman.cfg $(DESTDIR)$(CFGDIR)/modules/mod_gearman.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/pnp4nagios.cfg $(DESTDIR)$(CFGDIR)/modules/pnp4nagios.cfg - $(INSTALL) -b -m 664 $(INSTALL_OPTS) sample-config/modules/flapjack.cfg $(DESTDIR)$(CFGDIR)/modules/flapjack.cfg + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR)/objects + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR)/conf.d + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR)/modules + $(INSTALL) -b -m 664 sample-config/icinga.cfg $(DESTDIR)$(CFGDIR)/icinga.cfg + $(INSTALL) -b -m 660 sample-config/resource.cfg $(DESTDIR)$(CFGDIR)/resource.cfg + $(INSTALL) -b -m 664 sample-config/template-object/templates.cfg $(DESTDIR)$(CFGDIR)/objects/templates.cfg + $(INSTALL) -b -m 664 sample-config/template-object/commands.cfg $(DESTDIR)$(CFGDIR)/objects/commands.cfg + $(INSTALL) -b -m 664 sample-config/template-object/contacts.cfg $(DESTDIR)$(CFGDIR)/objects/contacts.cfg + $(INSTALL) -b -m 664 sample-config/template-object/notifications.cfg $(DESTDIR)$(CFGDIR)/objects/notifications.cfg + $(INSTALL) -b -m 664 sample-config/template-object/timeperiods.cfg $(DESTDIR)$(CFGDIR)/objects/timeperiods.cfg + $(INSTALL) -b -m 664 sample-config/template-object/localhost.cfg $(DESTDIR)$(CFGDIR)/objects/localhost.cfg + $(INSTALL) -b -m 664 sample-config/template-object/windows.cfg $(DESTDIR)$(CFGDIR)/objects/windows.cfg + $(INSTALL) -b -m 664 sample-config/template-object/printer.cfg $(DESTDIR)$(CFGDIR)/objects/printer.cfg + $(INSTALL) -b -m 664 sample-config/template-object/switch.cfg $(DESTDIR)$(CFGDIR)/objects/switch.cfg + $(INSTALL) -b -m 664 sample-config/modules/livestatus.cfg $(DESTDIR)$(CFGDIR)/modules/livestatus.cfg + $(INSTALL) -b -m 664 sample-config/modules/mod_gearman.cfg $(DESTDIR)$(CFGDIR)/modules/mod_gearman.cfg + $(INSTALL) -b -m 664 sample-config/modules/pnp4nagios.cfg $(DESTDIR)$(CFGDIR)/modules/pnp4nagios.cfg + $(INSTALL) -b -m 664 sample-config/modules/flapjack.cfg $(DESTDIR)$(CFGDIR)/modules/flapjack.cfg @echo "" @echo "*** Config files installed ***" @@ -461,14 +451,14 @@ @echo "" install-testconfig: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/tests + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR)/tests for file in tests/etc/*.cfg; \ - do $(INSTALL) -b -m 664 $(INSTALL_OPTS) $$file $(DESTDIR)$(CFGDIR)/tests; done + do $(INSTALL) -b -m 664 $$file $(DESTDIR)$(CFGDIR)/tests; done install-webconf: $(MKDIR) -p -m 775 $(DESTDIR)$(HTTPD_CONF) - $(INSTALL) -b -m 644 $(INSTALL_OPTS) sample-config/httpd.conf $(DESTDIR)$(HTTPDCONFFILE) + $(INSTALL) -b -m 644 sample-config/httpd.conf $(DESTDIR)$(HTTPDCONFFILE) @if [ x$(APACHE24_DEBIAN) = xyes ]; then \ echo " Debian Apache 2.4 detected. " ;\ echo " Run 'a2enconf icinga' and 'service apache2 reload'" ;\ @@ -480,7 +470,8 @@ install-webconf-auth: $(MKDIR) -p -m 775 $(DESTDIR)$(HTTPD_CONF) - $(INSTALL) -b -m 644 $(INSTALL_OPTS) icinga.htpasswd $(DESTDIR)$(HTTPAUTHFILE) + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR) + $(INSTALL) -b -m 644 icinga.htpasswd $(DESTDIR)$(HTTPAUTHFILE) @echo "" @echo "*** Icinga http auth file installed ***" @@ -538,27 +529,27 @@ @echo "" install-eventhandlers: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1 - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/submit_check_result $(DESTDIR)$(EVENTHANDLERDIR)/submit_check_result - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/disable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/disable_active_service_checks - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/enable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/enable_active_service_checks - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/disable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/disable_notifications - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/enable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/enable_notifications - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/obsessive_svc_handler - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/submit_check_result_via_nsca - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/redundancy-scenario1/handle-master-host-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-host-event - $(INSTALL) -b -m 774 $(INSTALL_OPTS) contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-proc-event + $(INSTALL) -m 775 -d $(DESTDIR)$(EVENTHANDLERDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring + $(INSTALL) -m 775 -d $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1 + $(INSTALL) -b -m 775 contrib/eventhandlers/submit_check_result $(DESTDIR)$(EVENTHANDLERDIR)/submit_check_result + $(INSTALL) -b -m 775 contrib/eventhandlers/disable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/disable_active_service_checks + $(INSTALL) -b -m 775 contrib/eventhandlers/enable_active_service_checks $(DESTDIR)$(EVENTHANDLERDIR)/enable_active_service_checks + $(INSTALL) -b -m 775 contrib/eventhandlers/disable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/disable_notifications + $(INSTALL) -b -m 775 contrib/eventhandlers/enable_notifications $(DESTDIR)$(EVENTHANDLERDIR)/enable_notifications + $(INSTALL) -b -m 775 contrib/eventhandlers/distributed-monitoring/obsessive_svc_handler $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/obsessive_svc_handler + $(INSTALL) -b -m 775 contrib/eventhandlers/distributed-monitoring/submit_check_result_via_nsca $(DESTDIR)$(EVENTHANDLERDIR)/distributed-monitoring/submit_check_result_via_nsca + $(INSTALL) -b -m 775 contrib/eventhandlers/redundancy-scenario1/handle-master-host-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-host-event + $(INSTALL) -b -m 775 contrib/eventhandlers/redundancy-scenario1/handle-master-proc-event $(DESTDIR)$(EVENTHANDLERDIR)/redundancy-scenario1/handle-master-proc-event @echo "" @echo "*** Sample Eventhandlers installed ***" @echo "" install-downtimes: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(DOWNTIMESDIR) - $(INSTALL) -b -m 774 $(INSTALL_OPTS) tools/downtimes/sched_down.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_down.pl - $(INSTALL) -b -m 774 $(INSTALL_OPTS) tools/downtimes/sched_conv.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_conv.pl + $(INSTALL) -m 775 -d $(DESTDIR)$(DOWNTIMESDIR) + $(INSTALL) -b -m 775 tools/downtimes/sched_down.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_down.pl + $(INSTALL) -b -m 775 tools/downtimes/sched_conv.pl $(DESTDIR)$(DOWNTIMESDIR)/sched_conv.pl @echo "" @echo "*** Recurring downtimes scripts installed ***" @@ -573,7 +564,7 @@ install-classicui-standalone: install-cgis install-html # make sure we keep all the needed dirs for data - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(STATEDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(STATEDIR) $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR) $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LOGDIR)/archives $(INSTALL) -m 775 $(COMMAND_OPTS) -d $(DESTDIR)$(EXTCMDFILEDIR) diff -uNr icinga-core-1.14.0/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.13.0.sql icinga-core-1.14.2/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.13.0.sql --- icinga-core-1.14.0/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.13.0.sql 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/module/idoutils/db/pgsql/upgrade/pgsql-upgrade-1.13.0.sql 2017-12-20 15:45:58.000000000 +0100 @@ -11,8 +11,11 @@ -- #7765 drop unique constraint -- ----------------------------------------- -ALTER TABLE icinga_servicedependencies DROP CONSTRAINT uq_servicedependencies; -ALTER TABLE icinga_hostdependencies DROP CONSTRAINT uq_hostdependencies; +ALTER TABLE icinga_servicedependencies DROP CONSTRAINT IF EXISTS icinga_servicedependencies_instance_id_key; +ALTER TABLE icinga_hostdependencies DROP CONSTRAINT IF EXISTS icinga_hostdependencies_instance_id_key; + +ALTER TABLE icinga_servicedependencies DROP CONSTRAINT IF EXISTS UQ_servicedependencies; +ALTER TABLE icinga_hostdependencies DROP CONSTRAINT IF EXISTS UQ_hostdependencies; CREATE INDEX idx_servicedependencies ON icinga_servicedependencies(instance_id,config_type,service_object_id,dependent_service_object_id,dependency_type,inherits_parent,fail_on_ok,fail_on_warning,fail_on_unknown,fail_on_critical); CREATE INDEX idx_hostdependencies ON icinga_hostdependencies(instance_id,config_type,host_object_id,dependent_host_object_id,dependency_type,inherits_parent,fail_on_up,fail_on_down,fail_on_unreachable); diff -uNr icinga-core-1.14.0/module/idoutils/include/common.h icinga-core-1.14.2/module/idoutils/include/common.h --- icinga-core-1.14.0/module/idoutils/include/common.h 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/module/idoutils/include/common.h 2017-12-20 15:45:58.000000000 +0100 @@ -22,8 +22,8 @@ #define LOG2IDO_NAME "LOG2IDO" /* only one space for update-version matching */ -#define IDO_DATE "12-22-2016" -#define IDO_VERSION "1.14.0" +#define IDO_DATE "12-20-2017" +#define IDO_VERSION "1.14.2" #define IDO_SCHEMA_VERSION "1.13.0" diff -uNr icinga-core-1.14.0/module/idoutils/Makefile.in icinga-core-1.14.2/module/idoutils/Makefile.in --- icinga-core-1.14.0/module/idoutils/Makefile.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/module/idoutils/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -54,11 +54,11 @@ install: cd $(SRC_BASE) && $(MAKE) $@ - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/objects - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(CFGDIR)/modules - $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/ido2db.cfg-sample $(DESTDIR)$(CFGDIR) - $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/idomod.cfg-sample $(DESTDIR)$(CFGDIR) - $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/idoutils.cfg-sample $(DESTDIR)$(CFGDIR)/modules - $(INSTALL) -b -m 664 $(INSTALL_OPTS) config/ido2db_check_proc.cfg $(DESTDIR)$(CFGDIR)/objects/ido2db_check_proc.cfg + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR)/objects + $(INSTALL) -m 775 -d $(DESTDIR)$(CFGDIR)/modules + $(INSTALL) -b -m 664 config/ido2db.cfg-sample $(DESTDIR)$(CFGDIR) + $(INSTALL) -b -m 664 config/idomod.cfg-sample $(DESTDIR)$(CFGDIR) + $(INSTALL) -b -m 664 config/idoutils.cfg-sample $(DESTDIR)$(CFGDIR)/modules + $(INSTALL) -b -m 664 config/ido2db_check_proc.cfg $(DESTDIR)$(CFGDIR)/objects/ido2db_check_proc.cfg diff -uNr icinga-core-1.14.0/module/idoutils/src/Makefile.in icinga-core-1.14.2/module/idoutils/src/Makefile.in --- icinga-core-1.14.0/module/idoutils/src/Makefile.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/module/idoutils/src/Makefile.in 2017-12-20 15:45:58.000000000 +0100 @@ -113,9 +113,9 @@ devclean: distclean install: - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(BINDIR) - $(INSTALL) -m 775 $(INSTALL_OPTS) -d $(DESTDIR)$(LIBDIR) - $(INSTALL) -m 755 $(INSTALL_OPTS) ido2db $(DESTDIR)$(BINDIR) - $(INSTALL) -m 755 $(INSTALL_OPTS) log2ido $(DESTDIR)$(BINDIR) - $(INSTALL) -m 755 $(INSTALL_OPTS) idomod.so $(DESTDIR)$(LIBDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(BINDIR) + $(INSTALL) -m 775 -d $(DESTDIR)$(LIBDIR) + $(INSTALL) -m 755 ido2db $(DESTDIR)$(BINDIR) + $(INSTALL) -m 755 log2ido $(DESTDIR)$(BINDIR) + $(INSTALL) -m 755 idomod.so $(DESTDIR)$(LIBDIR) diff -uNr icinga-core-1.14.0/README icinga-core-1.14.2/README --- icinga-core-1.14.0/README 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/README 2017-12-20 15:45:58.000000000 +0100 @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/Icinga/icinga-core.svg?branch=master)](https://travis-ci.org/Icinga/icinga-core) + # Icinga 1.x ![Icinga Logo](https://www.icinga.org/wp-content/uploads/2014/06/icinga_logo.png) diff -uNr icinga-core-1.14.0/README.md icinga-core-1.14.2/README.md --- icinga-core-1.14.0/README.md 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/README.md 2017-12-20 15:45:58.000000000 +0100 @@ -1,3 +1,5 @@ +[![Build Status](https://travis-ci.org/Icinga/icinga-core.svg?branch=master)](https://travis-ci.org/Icinga/icinga-core) + # Icinga 1.x ![Icinga Logo](https://www.icinga.org/wp-content/uploads/2014/06/icinga_logo.png) diff -uNr icinga-core-1.14.0/sample-config/icinga.cfg.in icinga-core-1.14.2/sample-config/icinga.cfg.in --- icinga-core-1.14.0/sample-config/icinga.cfg.in 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/sample-config/icinga.cfg.in 2017-12-20 15:45:58.000000000 +0100 @@ -1156,6 +1156,23 @@ +# STALE SERVICES LOGGING OPTION +# If you don't want notifications to be logged, set this value to 0. +# If notifications should be logged, set the value to 1. + +log_stale_services=1 + + + +# STALE HOSTS LOGGING OPTION +# If you don't want notifications to be logged, set this value to 0. +# If notifications should be logged, set the value to 1. + +log_stale_hosts=1 + + + + # SERVICE FRESHNESS CHECK INTERVAL # This setting determines how often (in seconds) Icinga will # check the "freshness" of service check results. If you have diff -uNr icinga-core-1.14.0/tools/downtimes/sched_down.pl icinga-core-1.14.2/tools/downtimes/sched_down.pl --- icinga-core-1.14.0/tools/downtimes/sched_down.pl 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/tools/downtimes/sched_down.pl 2017-12-20 15:45:58.000000000 +0100 @@ -963,7 +963,7 @@ $extcmd = "SCHEDULE_HOSTGROUP_SVC_DOWNTIME;$h;$data"; add_cmd (\@$cmd,$h,$key2,$extcmd); } else { # one or more services defined - next if (already_planned (\@member,"HG",1,$key,$key2,$duration)); + return 1 if (already_planned (\@member,"HG",1,$key,$key2,$duration)); for my $idx (0..$#member) { if (exists $sObject{"$member[$idx]"}->{lc($s)}) { $extcmd = "SCHEDULE_SVC_DOWNTIME;$member[$idx];$s;$data"; diff -uNr icinga-core-1.14.0/.travis.yml icinga-core-1.14.2/.travis.yml --- icinga-core-1.14.0/.travis.yml 1970-01-01 01:00:00.000000000 +0100 +++ icinga-core-1.14.2/.travis.yml 2017-12-20 15:45:58.000000000 +0100 @@ -0,0 +1,22 @@ +sudo: false + +language: c + +compiler: + - gcc + +addons: + apt_packages: + - build-essential + - libgd2-xpm-dev + - libjpeg-dev + - libpng12-dev + - libmysqlclient-dev + - libdbi-dev + - libdbd-mysql + +before_script: + - ./configure --with-init-dir=/etc/init.d --with-plugin-dir=/usr/lib64/nagios/plugins --with-icinga-user=$(id -u -n) --with-icinga-group=$(id -g -n) --with-command-group=$(id -g -n) --with-web-user=$(id -g -n) --with-web-group=$(id -g -n) --prefix=/tmp/icinga1 + +script: + - make all && make install install-config && /tmp/icinga1/bin/icinga -v /tmp/icinga1/etc/icinga.cfg diff -uNr icinga-core-1.14.0/update-version icinga-core-1.14.2/update-version --- icinga-core-1.14.0/update-version 2016-12-22 22:40:50.000000000 +0100 +++ icinga-core-1.14.2/update-version 2017-12-20 15:45:58.000000000 +0100 @@ -10,10 +10,10 @@ fi # Current version number -CURRENTVERSION=1.14.0 +CURRENTVERSION=1.14.2 # Last date -LASTDATE=12-22-2016 +LASTDATE=12-20-2017 if [ "x$1" = "x" ] then @@ -50,7 +50,7 @@ # Update version number in Makefile.in perl -i -p -e "s/ICINGA_VERSION=.*/ICINGA_VERSION=$newversion/;" Makefile.in # needs to be done in current Makefile too (not dependant on configure!) -perl -i -p -e "s/ICINGA_VERSION=.*/ICINGA_VERSION=$newversion/;" Makefile +#perl -i -p -e "s/ICINGA_VERSION=.*/ICINGA_VERSION=$newversion/;" Makefile # Update version number and release date in main HTML page perl -i -p -e "s/>Version .*</>Version $newversion</;" html/main.html