Skip to content

Commit

Permalink
Merge branch 'release-4.3.2-rc1'
Browse files Browse the repository at this point in the history
  • Loading branch information
John C. Frickson committed May 9, 2017
2 parents ca3ddc2 + b865e05 commit 2e4212c
Show file tree
Hide file tree
Showing 73 changed files with 395 additions and 185 deletions.
25 changes: 22 additions & 3 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,25 @@
Nagios Core 4 Change Log
########################

4.3.2 - xxxx-xx-xx
------------------
FIXED
* Every 15sec /var/log/messages is flooded with "nagios: set_environment_var" (John Frickson)
* Changed release date to ISO format (yyyy-mm-dd) (John Frickson)
* `make all` fails if unzip is not installed (John Frickson)
* Quick Search no longer allows search by Alias (John Frickson)
* flexible downtime on a service immediately turns off notifications (John Frickson)
* Fix to allow url_encode to be called twice (Z. Liu)
* Update timeperiods.cfg.in (spelling) (Parth Laxmikant Kolekar)
* Spelling fixes (Josh Soref)
* Vent command pipe before remove to avoid deadlocks on writing end (Kai Kunstmann)
* CGI utility cgiutil.c does not process relative config file path names properly (John Frickson)
* xdata/xodtemplate.c bug in option-deprecation code (John Frickson)
* Wildcard searching causes service status links to not work properly (John Frickson)
* Quick search with no hits shows a permission denied error (John Frickson)
* Setting a service as its own parent is not caught by the sanity checker (-v) and causes a segfault (John Frickson)


4.3.1 - 2017-02-23
------------------
FIXES
Expand Down Expand Up @@ -88,7 +107,7 @@ FIXES
* Fix permissions for Host Groups reports (status.cgi) (Patrik Halfar)
* Service Parents does not appear to be functioning as intended (lev)
* Availability report mixes up scheduled and unscheduled warning percentages (Helmut Mikulcik)
* Invalid values for saved_stamp in comput_subject_downtime_times() (John Frickson)
* Invalid values for saved_stamp in compute_subject_downtime_times() (John Frickson)
* Remove deprecated "framespacing" (John Frickson)
* The nagios tarball contains two identical jquery copies (John Frickson)
* extinfo.cgi does not set content-type (most cgi's don't) (John Frickson)
Expand Down Expand Up @@ -220,12 +239,12 @@ FIXES
* Fixes to make all/html target tolerant of being run multiple times (Eric Stanley)
* For user-supplied maps, converted node group to have transform (Eric Stanley)
* Fixed issue transitioning from circular markup map to other maps (Eric Stanley)
* Fix displayForm to trigger on the buttom press (Scott Wilkerson)
* Fix displayForm to trigger on the button press (Scott Wilkerson)
* Fix fo getBBox crash on Firefox (Eric Stanley)
* Fixed map now resets zoom when form apply()'d (Eric Stanley)
* Fixed so close box on dialogs actually closes dialog (Eric Stanley)
* Corrected directive in trends display (Eric Stanley)
* Fixed minor issue with link in trends linkes (Eric Stanley)
* Fixed minor issue with link in trends links (Eric Stanley)
* Fixed issue with map displaying on Firefox (Eric Stanley)
* Added exclusions for ctags generation (Eric Stanley)
* Update map-popup.html (Scott Wilkerson)
Expand Down
4 changes: 4 additions & 0 deletions THANKS
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,10 @@ wrong, please let me know.
* Jonathan Saggau
* Jorge Sanchez
* Joseph Maiorana
* Josh Soref
* Josh Thorstad
* Justin Clarke
* Kai Kunstmann
* Kai Ung
* Karel Salavec
* Karl DeBisschop
Expand Down Expand Up @@ -235,6 +237,7 @@ wrong, please let me know.
* Nikola Vassilev
* Olivier Beytrison
* Olivier Jan
* Parth Laxmikant Kolekar
* Patrick Proy
* Patrik Halfar
* Paul Kent
Expand Down Expand Up @@ -327,3 +330,4 @@ wrong, please let me know.
* xoubih
* Yves Rubin
* Zakhar Kleyman
* Z. Liu
2 changes: 1 addition & 1 deletion UPGRADING
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nagios-4.3.0 - 2017-02-21
-------------------------

If you use "corewindow", as in
http://localhost/nagios?corewindow=www.somewere.com
http://localhost/nagios?corewindow=www.somewhere.com
note that this functionality has been disabled by default in this
release. If you still want to use it, run ./configure with the
parameter --enable-corewindow
Expand Down
2 changes: 1 addition & 1 deletion base/commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -5234,7 +5234,7 @@ void clear_service_flapping_state(service *svc) {
if (svc->is_flapping) {
log_debug_info(DEBUGL_FLAPPING, 1, "Service '%s' on host '%s' flapping state cleared.\n", svc->description, svc->host_name);
/* log a notice - this one is parsed by the history CGI */
logit(NSLOG_INFO_MESSAGE, FALSE, "SERVICE FLAPPING ALERT: %s;%s;STOPPED; Flapping state cleared for servicee. (%2.1f%% change < %2.1f%% threshold)\n", svc->host_name, svc->description, svc->percent_state_change, low_threshold);
logit(NSLOG_INFO_MESSAGE, FALSE, "SERVICE FLAPPING ALERT: %s;%s;STOPPED; Flapping state cleared for service. (%2.1f%% change < %2.1f%% threshold)\n", svc->host_name, svc->description, svc->percent_state_change, low_threshold);

#ifdef USE_EVENT_BROKER
/* send data to event broker */
Expand Down
2 changes: 1 addition & 1 deletion base/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -2222,7 +2222,7 @@ int pre_flight_circular_check(int *w, int *e) {
dep_type = temp_sd->dependency_type;
/*
* this shouldn't happen, but it can in case dependencies are
* added to services on hosts in empty hostgroups (ie, nonexistant)
* added to services on hosts in empty hostgroups (ie, nonexistent)
*/
if(dep_type < 1 || dep_type > ARRAY_SIZE(ary))
continue;
Expand Down
4 changes: 2 additions & 2 deletions base/events.c
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,7 @@ int event_execution_loop(void) {
/* keep track of the last time */
last_time = current_time;

/* update status information occassionally - NagVis watches the NDOUtils DB to see if Nagios is alive */
/* update status information occasionally - NagVis watches the NDOUtils DB to see if Nagios is alive */
if((unsigned long)(current_time - last_status_update) > 5) {
last_status_update = current_time;
update_program_status(FALSE);
Expand Down Expand Up @@ -1337,7 +1337,7 @@ int handle_timed_event(timed_event *event) {
/* The squeue internal event type, declared again here so we can manipulate the
* scheduling queue without a malloc/free for each add/remove.
* @todo: Refactor this to not depend so heavily on the event queue
* implementation, doing so efficiently may require a different sheduling queue
* implementation, doing so efficiently may require a different scheduling queue
* data structure. */
struct squeue_event {
unsigned int pos;
Expand Down
2 changes: 1 addition & 1 deletion base/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -410,7 +410,7 @@ int rotate_log_file(time_t rotation_time) {

/* HACK: If the archive exists, don't overwrite it. This is a hack
because the real problem is that some log rotations are executed
early and as a result the next log rotatation is scheduled for
early and as a result the next log rotation is scheduled for
the same time as the one that ran early */
archive_stat_result = stat(log_archive, &archive_stat);
if((0 == archive_stat_result) ||
Expand Down
4 changes: 2 additions & 2 deletions base/nagios.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ int main(int argc, char **argv) {
printf("\n***> One or more problems was encountered while processing the config files...\n");
printf("\n");
printf(" Check your configuration file(s) to ensure that they contain valid\n");
printf(" directives and data defintions. If you are upgrading from a previous\n");
printf(" directives and data definitions. If you are upgrading from a previous\n");
printf(" version of Nagios, you should be aware that some variables/definitions\n");
printf(" may have been removed or modified in this version. Make sure to read\n");
printf(" the HTML documentation regarding the config files, as well as the\n");
Expand All @@ -483,7 +483,7 @@ int main(int argc, char **argv) {
printf("\n***> One or more problems was encountered while running the pre-flight check...\n");
printf("\n");
printf(" Check your configuration file(s) to ensure that they contain valid\n");
printf(" directives and data defintions. If you are upgrading from a previous\n");
printf(" directives and data definitions. If you are upgrading from a previous\n");
printf(" version of Nagios, you should be aware that some variables/definitions\n");
printf(" may have been removed or modified in this version. Make sure to read\n");
printf(" the HTML documentation regarding the config files, as well as the\n");
Expand Down
30 changes: 15 additions & 15 deletions base/nagiostats.c
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ int main(int argc, char **argv) {
printf("\n");
printf("Output:\n");
printf(" -m, --mrtg display output in MRTG compatible format.\n");
printf(" -d, --data=VARS comma-seperated list of variables to output in MRTG\n");
printf(" -d, --data=VARS comma-separated list of variables to output in MRTG\n");
printf(" (or compatible) format. See possible values below.\n");
printf(" Percentages are rounded, times are in milliseconds.\n");
printf(" -D, --delimiter=C character to use as delimiter in MRTG output mode.\n");
Expand All @@ -318,7 +318,7 @@ int main(int argc, char **argv) {
printf(" STATUSFILEAGE string with age of status data file.\n");
printf(" STATUSFILEAGETT string with age of status data file (time_t format).\n");
printf(" NAGIOSVERSION string with Nagios version.\n");
printf(" NAGIOSPID pid number of Nagios deamon.\n");
printf(" NAGIOSPID pid number of Nagios daemon.\n");
printf(" NAGIOSVERPID string with Nagios version and PID.\n");
printf(" TOTCMDBUF total number of external command buffer slots available.\n");
printf(" USEDCMDBUF number of external command buffer slots currently in use.\n");
Expand All @@ -329,7 +329,7 @@ int main(int argc, char **argv) {
printf(" NUMSVCWARN number of services WARNING.\n");
printf(" NUMSVCUNKN number of services UNKNOWN.\n");
printf(" NUMSVCCRIT number of services CRITICAL.\n");
printf(" NUMSVCPROB number of service problems (WARNING, UNKNOWN or CRITIAL).\n");
printf(" NUMSVCPROB number of service problems (WARNING, UNKNOWN or CRITICAL).\n");
printf(" NUMSVCCHECKED number of services that have been checked since start.\n");
printf(" NUMSVCSCHEDULED number of services that are currently scheduled to be checked.\n");
printf(" NUMSVCFLAPPING number of services that are currently flapping.\n");
Expand Down Expand Up @@ -358,18 +358,18 @@ int main(int argc, char **argv) {
printf(" xxxPSVHSTLAT MIN/MAX/AVG passive host check latency (ms).\n");
printf(" xxxPSVHSTPSC MIN/MAX/AVG passive host check %% state change.\n");
printf(" xxxHSTPSC MIN/MAX/AVG host check %% state change.\n");
printf(" NUMACTHSTCHECKSxM number of total active host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMOACTHSTCHECKSxM number of on-demand active host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMCACHEDHSTCHECKSxM number of cached host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMSACTHSTCHECKSxM number of scheduled active host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMPARHSTCHECKSxM number of parallel host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMSERHSTCHECKSxM number of serial host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMPSVHSTCHECKSxM number of passive host checks occuring in last 1/5/15 minutes.\n");
printf(" NUMACTSVCCHECKSxM number of total active service checks occuring in last 1/5/15 minutes.\n");
printf(" NUMOACTSVCCHECKSxM number of on-demand active service checks occuring in last 1/5/15 minutes.\n");
printf(" NUMCACHEDSVCCHECKSxM number of cached service checks occuring in last 1/5/15 minutes.\n");
printf(" NUMSACTSVCCHECKSxM number of scheduled active service checks occuring in last 1/5/15 minutes.\n");
printf(" NUMPSVSVCCHECKSxM number of passive service checks occuring in last 1/5/15 minutes.\n");
printf(" NUMACTHSTCHECKSxM number of total active host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMOACTHSTCHECKSxM number of on-demand active host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMCACHEDHSTCHECKSxM number of cached host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMSACTHSTCHECKSxM number of scheduled active host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMPARHSTCHECKSxM number of parallel host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMSERHSTCHECKSxM number of serial host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMPSVHSTCHECKSxM number of passive host checks occurring in last 1/5/15 minutes.\n");
printf(" NUMACTSVCCHECKSxM number of total active service checks occurring in last 1/5/15 minutes.\n");
printf(" NUMOACTSVCCHECKSxM number of on-demand active service checks occurring in last 1/5/15 minutes.\n");
printf(" NUMCACHEDSVCCHECKSxM number of cached service checks occurring in last 1/5/15 minutes.\n");
printf(" NUMSACTSVCCHECKSxM number of scheduled active service checks occurring in last 1/5/15 minutes.\n");
printf(" NUMPSVSVCCHECKSxM number of passive service checks occurring in last 1/5/15 minutes.\n");
printf(" NUMEXTCMDSxM number of external commands processed in last 1/5/15 minutes.\n");

printf("\n");
Expand Down
17 changes: 9 additions & 8 deletions base/notifications.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "../include/broker.h"
#include "../include/neberrors.h"
#include "../include/workers.h"
#include "../include/downtime.h"

/*** silly helpers ****/
static contact *find_contact_by_name_or_alias(const char *name)
Expand Down Expand Up @@ -438,9 +439,9 @@ int check_service_notification_viability(service *svc, int type, int options) {



/****************************************/
/*** SPECIAL CASE FOR ACKNOWLEGEMENTS ***/
/****************************************/
/*****************************************/
/*** SPECIAL CASE FOR ACKNOWLEDGEMENTS ***/
/*****************************************/

/* acknowledgements only have to pass three general filters, although they have another test of their own... */
if(type == NOTIFICATION_ACKNOWLEDGEMENT) {
Expand Down Expand Up @@ -598,13 +599,13 @@ int check_service_notification_viability(service *svc, int type, int options) {
}

/* if this service is currently in a flex downtime period, don't send the notification */
if(svc->pending_flex_downtime > 0) {
if(svc->pending_flex_downtime > 0 && is_service_in_pending_flex_downtime(svc) == TRUE) {
log_debug_info(DEBUGL_NOTIFICATIONS, 1, "This service is starting a flex downtime, so we won't send notifications.\n");
return ERROR;
}

/* if this host is currently in a flex downtime period, don't send the notification */
if(temp_host->pending_flex_downtime > 0) {
if(temp_host->pending_flex_downtime > 0 && is_host_in_pending_flex_downtime(temp_host) == TRUE) {
log_debug_info(DEBUGL_NOTIFICATIONS, 1, "The host this service is associated with is starting a flex downtime, so we won't send notifications.\n");
return ERROR;
}
Expand Down Expand Up @@ -1360,9 +1361,9 @@ int check_host_notification_viability(host *hst, int type, int options) {



/****************************************/
/*** SPECIAL CASE FOR ACKNOWLEGEMENTS ***/
/****************************************/
/*****************************************/
/*** SPECIAL CASE FOR ACKNOWLEDGEMENTS ***/
/*****************************************/

/* acknowledgements only have to pass three general filters, although they have another test of their own... */
if(type == NOTIFICATION_ACKNOWLEDGEMENT) {
Expand Down
2 changes: 1 addition & 1 deletion base/query-handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const char *qh_strerror(int code)
switch (code) {
/* client errors */
case 400: return "Bad request";
case 401: return "Unathorized";
case 401: return "Unauthorized";
case 403: return "Forbidden (disabled by config)";
case 404: return "Not found";
case 405: return "Method not allowed";
Expand Down
15 changes: 6 additions & 9 deletions base/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include "../include/nebmodules.h"
#include "../include/workers.h"

/* global varaiables only used by the daemon */
/* global variables only used by the daemon */
char *nagios_binary_path = NULL;
char *config_file = NULL;
char *command_file;
Expand Down Expand Up @@ -872,9 +872,6 @@ int set_environment_var(char *name, char *value, int set) {

/* set the environment variable */
if(set == TRUE) {
log_debug_info(DEBUGL_EVENTS, 0, "set_environment_var '%s'='%s'\n", name, value);
syslog(LOG_DAEMON|LOG_INFO, "set_environment_var '%s'='%s'\n", name, value);

#ifdef HAVE_SETENV
setenv(name, (value == NULL) ? "" : value, 1);
#else
Expand Down Expand Up @@ -1217,7 +1214,7 @@ static void _get_next_invalid_time(time_t pref_time, time_t *invalid_time, timep
timerange *temp_timerange = _get_matching_timerange(earliest_time, tperiod);

for(; temp_timerange != NULL; temp_timerange = temp_timerange->next) {
/* ranges with start/end of zero mean exlude this day */
/* ranges with start/end of zero mean exclude this day */
if(temp_timerange->range_start == 0 && temp_timerange->range_end == 0)
continue;

Expand Down Expand Up @@ -1296,7 +1293,7 @@ void _get_next_valid_time(time_t pref_time, time_t *valid_time, timeperiod *tper
#endif

for(; temp_timerange != NULL; temp_timerange = temp_timerange->next) {
/* ranges with start/end of zero mean exlude this day */
/* ranges with start/end of zero mean exclude this day */
if(temp_timerange->range_start == 0 && temp_timerange->range_end == 0)
continue;

Expand Down Expand Up @@ -1702,7 +1699,7 @@ void my_system_sighandler(int sig) {


/* Handle the SIGXFSZ signal. A SIGXFSZ signal is received when a file exceeds
the maximum allowable size either as dictated by the fzise paramater in
the maximum allowable size either as dictated by the fzise parameter in
/etc/security/limits.conf (ulimit -f) or by the maximum size allowed by
the filesystem */
void handle_sigxfsz(int sig) {
Expand Down Expand Up @@ -1740,7 +1737,7 @@ void handle_sigxfsz(int sig) {
/* Attempt to log the error, realizing that the logging may fail
if it is the log file that is over the size limit. */
logit(NSLOG_RUNTIME_ERROR, TRUE,
"Unable to determine current resoure limits: %s\n",
"Unable to determine current resource limits: %s\n",
strerror(errno));
}

Expand Down Expand Up @@ -3083,7 +3080,7 @@ int check_for_nagios_updates(int force, int reschedule) {
if(update_uid == 0L)
update_uid = current_time;

/* update chekcs are disabled */
/* update checks are disabled */
if(check_for_updates == FALSE)
do_check = FALSE;
/* we checked for updates recently, so don't do it again */
Expand Down
2 changes: 1 addition & 1 deletion base/workers.c
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@ static int handle_worker_result(int sd, int events, void *arg)
wpjob_type_name(job->type), job->id, wp->name, error_reason);
#ifdef DEBUG
/* The log below could leak sensitive information, such as
passwords, so only enable it if you neally need it */
passwords, so only enable it if you really need it */
logit(NSLOG_RUNTIME_ERROR, TRUE, "wproc: command: %s\n", job->command);
#endif
if (job->type != WPJOB_CHECK && oj) {
Expand Down
Loading

0 comments on commit 2e4212c

Please sign in to comment.