Hello community,
here is the log from the commit of package nagios
checked in at Fri Feb 9 16:58:32 CET 2007.
--------
--- nagios/nagios.changes 2007-02-01 11:58:14.000000000 +0100
+++ /mounts/work_src_done/STABLE/nagios/nagios.changes 2007-02-09 11:03:46.000000000 +0100
@@ -1,0 +2,13 @@
+Fri Feb 9 11:03:20 CET 2007 - tsieden@suse.de
+
+- update to nagios version 2.7
+ * p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of plugin that is executing
+ * Updated nagiostats with new MRTG vars for tracking buffer usage
+ * Added sample MRTG config file
+ * Minor patches to availability and status CGIs
+ * Minor documentation updates
+ * Fix for segfault during expiration or deletion of scheduled downtime
+ * Fix for scheduling immediate service check through WAP interface
+ * Fix for leading whitespace before comments in object config files
+
+-------------------------------------------------------------------
Old:
----
nagios-2.6.tar.bz2
New:
----
nagios-2.7.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ nagios.spec ++++++
--- /var/tmp/diff_new_pack.oW3480/_old 2007-02-09 16:58:23.000000000 +0100
+++ /var/tmp/diff_new_pack.oW3480/_new 2007-02-09 16:58:23.000000000 +0100
@@ -1,5 +1,5 @@
#
-# spec file for package nagios (Version 2.6)
+# spec file for package nagios (Version 2.7)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
@@ -13,8 +13,8 @@
Name: nagios
BuildRequires: apache2-devel freetype2-devel gd-devel iputils libapr-util1-devel libjpeg-devel libpng-devel mailx pcre-devel xorg-x11-devel
Summary: The Nagios Network Monitor
-Version: 2.6
-Release: 15
+Version: 2.7
+Release: 1
URL: http://www.nagios.org/
License: GNU General Public License (GPL)
Group: System/Monitoring
@@ -192,6 +192,16 @@
%config(noreplace) %{apache2_sysconfdir}/conf.d/*
%changelog -n nagios
+* Fri Feb 09 2007 - tsieden@suse.de
+- update to nagios version 2.7
+ * p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of plugin that is executing
+ * Updated nagiostats with new MRTG vars for tracking buffer usage
+ * Added sample MRTG config file
+ * Minor patches to availability and status CGIs
+ * Minor documentation updates
+ * Fix for segfault during expiration or deletion of scheduled downtime
+ * Fix for scheduling immediate service check through WAP interface
+ * Fix for leading whitespace before comments in object config files
* Thu Feb 01 2007 - olh@suse.de
- add quick-start.txt (#237372)
* Thu Feb 01 2007 - olh@suse.de
++++++ nagios-2.6.tar.bz2 -> nagios-2.7.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/commands.c new/nagios-2.7/base/commands.c
--- old/nagios-2.6/base/commands.c 2005-12-23 20:31:36.000000000 +0100
+++ new/nagios-2.7/base/commands.c 2007-01-03 03:50:40.000000000 +0100
@@ -3,7 +3,7 @@
* COMMANDS.C - External command functions for Nagios
*
* Copyright (c) 1999-2005 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 12-14-2005
+ * Last Modified: 12-26-2005
*
* License:
*
@@ -85,6 +85,7 @@
extern pthread_t worker_threads[TOTAL_WORKER_THREADS];
extern circular_buffer external_command_buffer;
+extern int external_command_buffer_slots;
@@ -154,7 +155,7 @@
free(((char **)external_command_buffer.buffer)[external_command_buffer.tail]);
/* adjust tail counter and number of items */
- external_command_buffer.tail=(external_command_buffer.tail + 1) % COMMAND_BUFFER_SLOTS;
+ external_command_buffer.tail=(external_command_buffer.tail + 1) % external_command_buffer_slots;
external_command_buffer.items--;
/* release the lock on the buffer */
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/config.c new/nagios-2.7/base/config.c
--- old/nagios-2.6/base/config.c 2005-12-27 00:18:14.000000000 +0100
+++ new/nagios-2.7/base/config.c 2007-01-19 23:02:00.000000000 +0100
@@ -2,8 +2,8 @@
*
* CONFIG.C - Configuration input and verification routines for Nagios
*
- * Copyright (c) 1999-2005 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 12-26-2005
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-19-2007
*
* License:
*
@@ -166,6 +166,8 @@
extern host **host_hashlist;
extern service **service_hashlist;
+extern int external_command_buffer_slots;
+extern int check_result_buffer_slots;
@@ -252,16 +254,16 @@
current_line=thefile->current_line;
- /* skip blank lines */
- if(input[0]=='\x0' || input[0]=='\n' || input[0]=='\r')
- continue;
-
strip(input);
/* skip comments */
if(input[0]=='#' || input[0]==';')
continue;
+ /* skip blank lines */
+ if(input[0]=='\x0' || input[0]=='\n' || input[0]=='\r')
+ continue;
+
/* skip external data directives */
if(strstr(input,"x")==input)
continue;
@@ -1401,6 +1403,12 @@
#endif
}
+ else if(!strcmp(variable,"external_command_buffer_slots"))
+ external_command_buffer_slots=atoi(value);
+
+ else if(!strcmp(variable,"check_result_buffer_slots"))
+ check_result_buffer_slots=atoi(value);
+
/*** AUTH_FILE VARIABLE USED BY EMBEDDED PERL INTERPRETER ***/
else if(!strcmp(variable,"auth_file")){
if(strlen(value)>MAX_FILENAME_LENGTH-1){
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/events.c new/nagios-2.7/base/events.c
--- old/nagios-2.6/base/events.c 2006-10-09 17:59:02.000000000 +0200
+++ new/nagios-2.7/base/events.c 2007-01-08 23:24:13.000000000 +0100
@@ -2,8 +2,8 @@
*
* EVENTS.C - Timed event functions for Nagios
*
- * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 10-09-2006
+ * Copyright (c) 1999-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-08-2007
*
* License:
*
@@ -89,6 +89,7 @@
sched_info scheduling_info;
+extern unsigned long check_result_buffer_slots;
/******************************************************************/
@@ -643,7 +644,7 @@
}
/* assume a 100% (2x) service check burst for service check reaper */
- max_reaper_interval=floor((double)SERVICE_BUFFER_SLOTS/scheduling_info.service_inter_check_delay);
+ max_reaper_interval=floor((double)check_result_buffer_slots/scheduling_info.service_inter_check_delay);
if(max_reaper_interval<2.0)
max_reaper_interval=2.0;
if(max_reaper_interval>30.0)
@@ -1287,7 +1288,7 @@
#endif
/* process scheduled downtime info */
- handle_scheduled_downtime((scheduled_downtime *)event->event_data);
+ handle_scheduled_downtime_by_id((unsigned long)event->event_data);
break;
case EVENT_SFRESHNESS_CHECK:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/nagios.c new/nagios-2.7/base/nagios.c
--- old/nagios-2.6/base/nagios.c 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.7/base/nagios.c 2007-01-19 23:02:00.000000000 +0100
@@ -3,12 +3,12 @@
* NAGIOS.C - Core Program Code For Nagios
*
* Program: Nagios
- * Version: 2.6
+ * Version: 2.7
* License: GPL
- * Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)
+ * Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
*
* First Written: 01-28-1999 (start of development)
- * Last Modified: 11-27-2006
+ * Last Modified: 01-19-2007
*
* Description:
*
@@ -207,6 +207,8 @@
circular_buffer external_command_buffer;
circular_buffer service_result_buffer;
pthread_t worker_threads[TOTAL_WORKER_THREADS];
+int external_command_buffer_slots=DEFAULT_EXTERNAL_COMMAND_BUFFER_SLOTS;
+int check_result_buffer_slots=DEFAULT_CHECK_RESULT_BUFFER_SLOTS;
@@ -284,7 +286,7 @@
if(daemon_mode==FALSE){
printf("\nNagios %s\n",PROGRAM_VERSION);
- printf("Copyright (c) 1999-2006 Ethan Galstad (http://www.nagios.org)\n");
+ printf("Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)\n");
printf("Last Modified: %s\n",PROGRAM_MODIFICATION_DATE);
printf("License: GPL\n\n");
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/nagiostats.c new/nagios-2.7/base/nagiostats.c
--- old/nagios-2.6/base/nagiostats.c 2006-11-28 03:29:05.000000000 +0100
+++ new/nagios-2.7/base/nagiostats.c 2007-01-19 23:02:00.000000000 +0100
@@ -3,11 +3,11 @@
* NAGIOSTATS.C - Displays Nagios Statistics
*
* Program: Nagiostats
- * Version: 2.6
+ * Version: 2.7
* License: GPL
- * Copyright (c) 2003-2006 Ethan Galstad (nagios@nagios.org)
+ * Copyright (c) 2003-2007 Ethan Galstad (nagios@nagios.org)
*
- * Last Modified: 11-27-2006
+ * Last Modified: 01-19-2007
*
* License:
*
@@ -49,6 +49,7 @@
time_t program_start=0L;
int status_service_entries=0;
int status_host_entries=0;
+unsigned long nagios_pid=0L;
double min_service_state_change=0.0;
int have_min_service_state_change=FALSE;
@@ -139,6 +140,13 @@
int active_hosts_checked_last_15min=0;
int active_hosts_checked_last_1hour=0;
+int total_external_command_buffer_slots=0;
+int used_external_command_buffer_slots=0;
+int high_external_command_buffer_slots=0;
+int total_check_result_buffer_slots=0;
+int used_check_result_buffer_slots=0;
+int high_check_result_buffer_slots=0;
+
int display_mrtg_values(void);
@@ -213,7 +221,7 @@
if(mrtg_mode==FALSE){
printf("\nNagios Stats %s\n",PROGRAM_VERSION);
- printf("Copyright (c) 2003-2005 Ethan Galstad (www.nagios.org)\n");
+ printf("Copyright (c) 2003-2007 Ethan Galstad (www.nagios.org)\n");
printf("Last Modified: %s\n",PROGRAM_MODIFICATION_DATE);
printf("License: GPL\n\n");
}
@@ -255,6 +263,19 @@
printf(" Percentages are rounded, times are in milliseconds.\n");
printf("\n");
printf("MRTG DATA VARIABLES (-d option):\n");
+ printf(" PROGRUNTIME string with time Nagios process has been running.\n");
+ printf(" PROGRUNTIMETT time Nagios process has been running (time_t format).\n");
+ 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(" 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");
+ printf(" HIGHCMDBUF highest number of external command buffer slots ever in use.\n");
+ printf(" TOTCHKBUF total number of check result buffer slots available.\n");
+ printf(" USEDCHKBUF number of check result buffer slots currently in use.\n");
+ printf(" HIGHCHKBUF highest number of check result buffer slots ever in use.\n");
printf(" NUMSERVICES total number of services.\n");
printf(" NUMHOSTS total number of hosts.\n");
printf(" NUMSVCOK number of services OK.\n");
@@ -284,10 +305,10 @@
printf(" xxxACTHSTPSC MIN/MAX/AVG active host check %% state change.\n");
printf(" xxxPSVHSTPSC MIN/MAX/AVG passive host check %% state change.\n");
printf(" xxxHSTPSC MIN/MAX/AVG host check %% state change.\n");
- printf(" NUMACTHSTCHKxM number of active host checks in last 1/5/15/60 minutes.\n");
- printf(" NUMPSVHSTCHKxM number of passive host checks in last 1/5/15/60 minutes.\n");
- printf(" NUMACTSVCCHKxM number of active service checks in last 1/5/15/60 minutes.\n");
- printf(" NUMPSVSVCCHKxM number of passive service checks in last 1/5/15/60 minutes.\n");
+ printf(" NUMACTHSTCHKxM number of active host checks in last 1/5/15/60 minutes.\n");
+ printf(" NUMPSVHSTCHKxM number of passive host checks in last 1/5/15/60 minutes.\n");
+ printf(" NUMACTSVCCHKxM number of active service checks in last 1/5/15/60 minutes.\n");
+ printf(" NUMPSVSVCCHKxM number of passive service checks in last 1/5/15/60 minutes.\n");
printf("\n");
printf(" Note: Replace x's in MRTG variable names with 'MIN', 'MAX', 'AVG', or the\n");
@@ -324,11 +345,58 @@
int display_mrtg_values(void){
char *temp_ptr;
+ time_t current_time;
+ unsigned long time_difference;
+ int days;
+ int hours;
+ int minutes;
+ int seconds;
+
+ time(¤t_time);
/* process all variables */
for(temp_ptr=strtok(mrtg_variables,",");temp_ptr!=NULL;temp_ptr=strtok(NULL,",")){
- if(!strcmp(temp_ptr,"NUMSERVICES"))
+ if(!strcmp(temp_ptr,"PROGRUNTIME")){
+ time_difference=(current_time-program_start);
+ get_time_breakdown(time_difference,&days,&hours,&minutes,&seconds);
+ printf("%dd %dh %dm %ds\n",days,hours,minutes,seconds);
+ }
+ else if(!strcmp(temp_ptr,"PROGRUNTIMETT")){
+ time_difference=(current_time-program_start);
+ printf("%lu\n",time_difference);
+ }
+ else if(!strcmp(temp_ptr,"STATUSFILEAGE")){
+ time_difference=(current_time-status_creation_date);
+ get_time_breakdown(time_difference,&days,&hours,&minutes,&seconds);
+ printf("%dd %dh %dm %ds\n",days,hours,minutes,seconds);
+ }
+ else if(!strcmp(temp_ptr,"STATUSFILEAGETT")){
+ time_difference=(current_time-status_creation_date);
+ printf("%lu\n",time_difference);
+ }
+ else if(!strcmp(temp_ptr,"NAGIOSVERSION"))
+ printf("%s\n",status_version);
+ else if(!strcmp(temp_ptr,"NAGIOSPID"))
+ printf("%lu\n",nagios_pid);
+ else if(!strcmp(temp_ptr,"NAGIOSVERPID"))
+ printf("Nagios %s (pid=%lu)\n",status_version,nagios_pid);
+
+
+ else if(!strcmp(temp_ptr,"TOTCMDBUF"))
+ printf("%d\n",total_external_command_buffer_slots);
+ else if(!strcmp(temp_ptr,"USEDCMDBUF"))
+ printf("%d\n",used_external_command_buffer_slots);
+ else if(!strcmp(temp_ptr,"HIGHCMDBUF"))
+ printf("%d\n",high_external_command_buffer_slots);
+ else if(!strcmp(temp_ptr,"TOTCHKBUF"))
+ printf("%d\n",total_check_result_buffer_slots);
+ else if(!strcmp(temp_ptr,"USEDCHKBUF"))
+ printf("%d\n",used_check_result_buffer_slots);
+ else if(!strcmp(temp_ptr,"HIGHCHKBUF"))
+ printf("%d\n",high_check_result_buffer_slots);
+
+ else if(!strcmp(temp_ptr,"NUMSERVICES"))
printf("%d\n",status_service_entries);
else if(!strcmp(temp_ptr,"NUMHOSTS"))
printf("%d\n",status_host_entries);
@@ -524,6 +592,9 @@
time_difference=(current_time-program_start);
get_time_breakdown(time_difference,&days,&hours,&minutes,&seconds);
printf("Program Running Time: %dd %dh %dm %ds\n",days,hours,minutes,seconds);
+ printf("Nagios PID: %lu\n",nagios_pid);
+ printf("Used/High/Total Command Buffers: %d / %d / %d\n",used_external_command_buffer_slots,high_external_command_buffer_slots,total_external_command_buffer_slots);
+ printf("Used/High/Total Check Result Buffers: %d / %d / %d\n",used_check_result_buffer_slots,high_check_result_buffer_slots,total_check_result_buffer_slots);
printf("\n");
printf("Total Services: %d\n",status_service_entries);
printf("Services Checked: %d\n",services_checked);
@@ -897,6 +968,20 @@
case STATUS_PROGRAM_DATA:
if(!strcmp(var,"program_start"))
program_start=strtoul(val,NULL,10);
+ else if(!strcmp(var,"total_external_command_buffer_slots"))
+ total_external_command_buffer_slots=atoi(val);
+ else if(!strcmp(var,"used_external_command_buffer_slots"))
+ used_external_command_buffer_slots=atoi(val);
+ else if(!strcmp(var,"high_external_command_buffer_slots"))
+ high_external_command_buffer_slots=atoi(val);
+ else if(!strcmp(var,"total_check_result_buffer_slots"))
+ total_check_result_buffer_slots=atoi(val);
+ else if(!strcmp(var,"used_check_result_buffer_slots"))
+ used_check_result_buffer_slots=atoi(val);
+ else if(!strcmp(var,"high_check_result_buffer_slots"))
+ high_check_result_buffer_slots=atoi(val);
+ else if(!strcmp(var,"nagios_pid"))
+ nagios_pid=strtoul(val,NULL,10);
break;
case STATUS_HOST_DATA:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/sehandlers.c new/nagios-2.7/base/sehandlers.c
--- old/nagios-2.6/base/sehandlers.c 2005-12-23 20:31:36.000000000 +0100
+++ new/nagios-2.7/base/sehandlers.c 2006-12-12 19:57:20.000000000 +0100
@@ -2,8 +2,8 @@
*
* SEHANDLERS.C - Service and host event and state handlers for Nagios
*
- * Copyright (c) 1999-2004 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 12-19-2004
+ * Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 12-12-2006
*
* License:
*
@@ -558,6 +558,8 @@
#ifdef USE_EVENT_BROKER
/* send event data to broker */
+ end_time.tv_sec=0L;
+ end_time.tv_usec=0L;
broker_event_handler(NEBTYPE_EVENTHANDLER_START,NEBFLAG_NONE,NEBATTR_NONE,HOST_EVENTHANDLER,(void *)hst,hst->current_state,hst->state_type,start_time,end_time,exectime,event_handler_timeout,early_timeout,result,hst->event_handler,NULL,NULL,NULL);
#endif
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/base/utils.c new/nagios-2.7/base/utils.c
--- old/nagios-2.6/base/utils.c 2006-10-28 00:58:20.000000000 +0200
+++ new/nagios-2.7/base/utils.c 2007-01-03 03:50:41.000000000 +0100
@@ -3,7 +3,7 @@
* UTILS.C - Miscellaneous utility functions for Nagios
*
* Copyright (c) 1999-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 10-27-2006
+ * Last Modified: 12-26-2006
*
* License:
*
@@ -209,6 +209,8 @@
extern circular_buffer external_command_buffer;
extern circular_buffer service_result_buffer;
extern circular_buffer event_broker_buffer;
+extern int external_command_buffer_slots;
+extern int check_result_buffer_slots;
/* from GNU defines errno as a macro, since it's a per-thread variable */
#ifndef errno
@@ -3807,7 +3809,7 @@
service_result_buffer.buffer[service_result_buffer.tail]=NULL;
/* adjust tail counter and number of items */
- service_result_buffer.tail=(service_result_buffer.tail + 1) % SERVICE_BUFFER_SLOTS;
+ service_result_buffer.tail=(service_result_buffer.tail + 1) % check_result_buffer_slots;
service_result_buffer.items--;
result=0;
@@ -4621,8 +4623,9 @@
service_result_buffer.head=0;
service_result_buffer.tail=0;
service_result_buffer.items=0;
+ service_result_buffer.high=0;
service_result_buffer.overflow=0L;
- service_result_buffer.buffer=(void **)malloc(SERVICE_BUFFER_SLOTS*sizeof(service_message **));
+ service_result_buffer.buffer=(void **)malloc(check_result_buffer_slots*sizeof(service_message **));
if(service_result_buffer.buffer==NULL)
return ERROR;
@@ -4668,7 +4671,7 @@
int x;
/* release memory allocated to circular buffer */
- for(x=service_result_buffer.tail;x!=service_result_buffer.head;x=(x+1) % SERVICE_BUFFER_SLOTS){
+ for(x=service_result_buffer.tail;x!=service_result_buffer.head;x=(x+1) % check_result_buffer_slots){
free(((service_message **)service_result_buffer.buffer)[x]);
((service_message **)service_result_buffer.buffer)[x]=NULL;
}
@@ -4687,8 +4690,9 @@
external_command_buffer.head=0;
external_command_buffer.tail=0;
external_command_buffer.items=0;
+ external_command_buffer.high=0;
external_command_buffer.overflow=0L;
- external_command_buffer.buffer=(void **)malloc(COMMAND_BUFFER_SLOTS*sizeof(char **));
+ external_command_buffer.buffer=(void **)malloc(external_command_buffer_slots*sizeof(char **));
if(external_command_buffer.buffer==NULL)
return ERROR;
@@ -4734,7 +4738,7 @@
int x;
/* release memory allocated to circular buffer */
- for(x=external_command_buffer.tail;x!=external_command_buffer.head;x=(x+1) % COMMAND_BUFFER_SLOTS){
+ for(x=external_command_buffer.tail;x!=external_command_buffer.head;x=(x+1) % external_command_buffer_slots){
free(((char **)external_command_buffer.buffer)[x]);
((char **)external_command_buffer.buffer)[x]=NULL;
}
@@ -4814,7 +4818,7 @@
pthread_mutex_unlock(&service_result_buffer.buffer_lock);
/* process data in the pipe (one message max) if there's some free space in the circular buffer */
- if(buffer_itemsservice_result_buffer.high)
+ service_result_buffer.high=service_result_buffer.items;
/* release lock on buffer */
pthread_mutex_unlock(&service_result_buffer.buffer_lock);
@@ -4951,11 +4957,11 @@
pthread_mutex_unlock(&external_command_buffer.buffer_lock);
#ifdef DEBUG_CFWT
- printf("(CFWT) BUFFER ITEMS: %d/%d\n",buffer_items,COMMAND_BUFFER_SLOTS);
+ printf("(CFWT) BUFFER ITEMS: %d/%d\n",buffer_items,external_command_buffer_slots);
#endif
/* process all commands in the file (named pipe) if there's some space in the buffer */
- if(buffer_itemsexternal_command_buffer.high)
+ external_command_buffer.high=external_command_buffer.items;
}
/* buffer was full */
@@ -5438,6 +5446,9 @@
process_performance_data=DEFAULT_PROCESS_PERFORMANCE_DATA;
+ external_command_buffer_slots=DEFAULT_EXTERNAL_COMMAND_BUFFER_SLOTS;
+ check_result_buffer_slots=DEFAULT_CHECK_RESULT_BUFFER_SLOTS;
+
date_format=DATE_FORMAT_US;
for(x=0;xnotifications_enabled==FALSE)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/Changelog new/nagios-2.7/Changelog
--- old/nagios-2.6/Changelog 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.7/Changelog 2007-01-19 23:01:59.000000000 +0100
@@ -3,6 +3,19 @@
#####################
+2.7 - 01/19/2007
+----------------
+* p1.pl now sets environment var (NAGIOS_PLUGIN) to indicate patch of plugin that is executing
+* Updated nagiostats with new MRTG vars for tracking buffer usage
+* Added sample MRTG config file
+* Minor patches to availability and status CGIs
+* Minor documentation updates
+* Fix for segfault during expiration or deletion of scheduled downtime
+* Fix for scheduling immediate service check through WAP interface
+* Fix for leading whitespace before comments in object config files
+
+
+
2.6 - 11/27/2006
----------------
* Fix for unscheduled triggered downtime entries
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/common/downtime.c new/nagios-2.7/common/downtime.c
--- old/nagios-2.6/common/downtime.c 2006-08-02 02:18:06.000000000 +0200
+++ new/nagios-2.7/common/downtime.c 2007-01-08 23:24:13.000000000 +0100
@@ -2,8 +2,8 @@
*
* DOWNTIME.C - Scheduled downtime functions for Nagios
*
- * Copyright (c) 2000-2005 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 08-01-2005
+ * Copyright (c) 2000-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-08-2007
*
* License:
*
@@ -118,7 +118,6 @@
/* unschedules a host or service downtime */
int unschedule_downtime(int type,unsigned long downtime_id){
scheduled_downtime *temp_downtime;
- scheduled_downtime *event_downtime;
host *hst=NULL;
service *svc=NULL;
timed_event *temp_event;
@@ -193,10 +192,7 @@
for(temp_event=event_list_high;temp_event!=NULL;temp_event=temp_event->next){
if(temp_event->event_type!=EVENT_SCHEDULED_DOWNTIME)
continue;
- event_downtime=(scheduled_downtime *)temp_event->event_data;
- if(event_downtime->type!=temp_downtime->type)
- continue;
- if(event_downtime->downtime_id==downtime_id)
+ if(((unsigned long)temp_event->event_data)==downtime_id)
break;
}
if(temp_event!=NULL)
@@ -277,12 +273,27 @@
/* only non-triggered downtime is scheduled... */
if(temp_downtime->triggered_by==0)
- schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,temp_downtime->start_time,FALSE,0,NULL,FALSE,(void *)temp_downtime,NULL);
+ schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,temp_downtime->start_time,FALSE,0,NULL,FALSE,(void *)temp_downtime->downtime_id,NULL);
return OK;
}
+
+/* handles scheduled downtime (id passed from timed event queue) */
+int handle_scheduled_downtime_by_id(unsigned long downtime_id){
+ scheduled_downtime *temp_downtime=NULL;
+
+ /* find the downtime entry */
+ if((temp_downtime=find_downtime(ANY_DOWNTIME,downtime_id))==NULL)
+ return ERROR;
+
+ /* handle the downtime */
+ return handle_scheduled_downtime(temp_downtime);
+ }
+
+
+
/* handles scheduled host or service downtime */
int handle_scheduled_downtime(scheduled_downtime *temp_downtime){
char buffer[MAX_INPUT_BUFFER];
@@ -389,17 +400,17 @@
}
}
- /* delete downtime entry from the log */
- if(temp_downtime->type==HOST_DOWNTIME)
- delete_host_downtime(temp_downtime->downtime_id);
- else
- delete_service_downtime(temp_downtime->downtime_id);
-
/* handle (stop) downtime that is triggered by this one */
for(this_downtime=scheduled_downtime_list;this_downtime!=NULL;this_downtime=this_downtime->next){
if(this_downtime->triggered_by==temp_downtime->downtime_id)
handle_scheduled_downtime(this_downtime);
}
+
+ /* delete downtime entry from the log */
+ if(temp_downtime->type==HOST_DOWNTIME)
+ delete_host_downtime(temp_downtime->downtime_id);
+ else
+ delete_service_downtime(temp_downtime->downtime_id);
}
/* else we are just starting the scheduled downtime */
@@ -446,7 +457,7 @@
event_time=(time_t)((unsigned long)time(NULL)+temp_downtime->duration);
else
event_time=temp_downtime->end_time;
- schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,event_time,FALSE,0,NULL,FALSE,(void *)temp_downtime,NULL);
+ schedule_new_event(EVENT_SCHEDULED_DOWNTIME,TRUE,event_time,FALSE,0,NULL,FALSE,(void *)temp_downtime->downtime_id,NULL);
/* handle (start) downtime that is triggered by this one */
for(this_downtime=scheduled_downtime_list;this_downtime!=NULL;this_downtime=this_downtime->next){
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/configure new/nagios-2.7/configure
--- old/nagios-2.6/configure 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.7/configure 2007-01-19 23:01:59.000000000 +0100
@@ -1311,9 +1311,9 @@
PKG_NAME=nagios
-PKG_VERSION="2.6"
+PKG_VERSION="2.7"
PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="11-27-2006"
+PKG_REL_DATE="01-19-2007"
ac_aux_dir=
for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
@@ -7721,6 +7721,7 @@
perl subst sample-config/cgi.cfg
perl subst sample-config/resource.cfg
perl subst sample-config/httpd.conf
+perl subst sample-config/mrtg.cfg
perl subst sample-config/template-object/localhost.cfg
perl subst sample-config/template-object/commands.cfg
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/configure.in new/nagios-2.7/configure.in
--- old/nagios-2.6/configure.in 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.7/configure.in 2007-01-19 23:01:59.000000000 +0100
@@ -9,9 +9,9 @@
AC_PREFIX_DEFAULT(/usr/local/nagios)
PKG_NAME=nagios
-PKG_VERSION="2.6"
+PKG_VERSION="2.7"
PKG_HOME_URL="http://www.nagios.org/"
-PKG_REL_DATE="11-27-2006"
+PKG_REL_DATE="01-19-2007"
dnl Figure out how to invoke "install" and what install options to use.
AC_PROG_INSTALL
@@ -674,6 +674,7 @@
perl subst sample-config/cgi.cfg
perl subst sample-config/resource.cfg
perl subst sample-config/httpd.conf
+perl subst sample-config/mrtg.cfg
perl subst sample-config/template-object/localhost.cfg
perl subst sample-config/template-object/commands.cfg
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/html/docs/checkscheduling.html new/nagios-2.7/html/docs/checkscheduling.html
--- old/nagios-2.6/html/docs/checkscheduling.html 2004-10-31 05:16:04.000000000 +0100
+++ new/nagios-2.7/html/docs/checkscheduling.html 2006-12-21 18:16:24.000000000 +0100
@@ -73,7 +73,7 @@
<p>
<ul>
-<li><a href="configmain.html#inter_check_delay_method"><i>inter_check_delay_method</i></a>
+<li><a href="configmain.html#service_inter_check_delay_method"><i>service_inter_check_delay_method</i></a>
<li><a href="configmain.html#service_interleave_factor"><i>service_interleave_factor</i></a>
<li><a href="configmain.html#max_concurrent_checks"><i>max_concurrent_checks</i></a>
<li><a href="configmain.html#service_reaper_frequency"><i>service_reaper_frequency</i></a>
@@ -108,11 +108,11 @@
</p>
<p>
-As mentioned before, Nagios attempts to equalize the load placed on the machine that is running Nagios by equally spacing out initial service checks. The spacing between consecutive service checks is called the inter-check delay. By giving a value to the <a href="configmain.html#inter_check_delay_method">inter_check_delay_method</a> variable in the main config file, you can modify how this delay is calculated. I will discuss how the "smart" calculation works, as this is the setting you will want to use for normal operation.
+As mentioned before, Nagios attempts to equalize the load placed on the machine that is running Nagios by equally spacing out initial service checks. The spacing between consecutive service checks is called the inter-check delay. By giving a value to the <a href="configmain.html#service_inter_check_delay_method">service_inter_check_delay_method</a> variable in the main config file, you can modify how this delay is calculated. I will discuss how the "smart" calculation works, as this is the setting you will want to use for normal operation.
</p>
<p>
-When using the "smart" setting of the <i>inter_check_delay_method</i> variable, Nagios will calculate an inter-check delay value by using the following calculation:
+When using the "smart" setting of the <i>service_inter_check_delay_method</i> variable, Nagios will calculate an inter-check delay value by using the following calculation:
</p>
<p>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/html/docs/configmain.html new/nagios-2.7/html/docs/configmain.html
--- old/nagios-2.6/html/docs/configmain.html 2006-10-28 06:37:48.000000000 +0200
+++ new/nagios-2.7/html/docs/configmain.html 2006-12-21 18:16:24.000000000 +0100
@@ -1300,7 +1300,7 @@
</p>
<p>
-This variable determines whether or not Nagios will log <a href="extcommands.html">external commands</a> that it receives from the <a href="#command_file">external command file</a>. Note: This option does not control whether or not <a href="passivechecks.html">passive service checks</a> (which are a type of external command) get logged. To enable or disable logging of passive checks, use the <a href="#log_passive_service_checks">log_passive_service_checks</a> option.
+This variable determines whether or not Nagios will log <a href="extcommands.html">external commands</a> that it receives from the <a href="#command_file">external command file</a>. Note: This option does not control whether or not <a href="passivechecks.html">passive service checks</a> (which are a type of external command) get logged. To enable or disable logging of passive checks, use the <a href="#log_passive_checks">log_passive_checks</a> option.
</p>
<p>
<ul>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/html/docs/xodtemplate.html new/nagios-2.7/html/docs/xodtemplate.html
--- old/nagios-2.6/html/docs/xodtemplate.html 2006-11-28 03:29:05.000000000 +0100
+++ new/nagios-2.7/html/docs/xodtemplate.html 2006-12-26 19:33:22.000000000 +0100
@@ -603,7 +603,7 @@
</td>
</tr>
<tr>
-<td valign="top"><strong>event_handler_enabled</strong>:</td>
+<td valign="top"><strong>event_handler_enabled <a href="#retention_notes" class="RetentionNotes">*</a></strong>:</td>
<td>
This directive is used to determine whether or not the event handler for this service is enabled. Values: 0 = disable service event handler, 1 = enable service event handler.
</td>
@@ -797,8 +797,8 @@
<tr><td></td><td class="Required">service_notification_period</td><td class="Required"><i>timeperiod_name</i></td></tr>
<tr><td></td><td class="Required">host_notification_options</td><td class="Required">[d,u,r,f,n]</td></tr>
<tr><td></td><td class="Required">service_notification_options</td><td class="Required">[w,u,c,r,f,n]</td></tr>
-<tr><td></td><td class="Required">host_notification_commands</td><td class="Optional"><i>command_name</i></td></tr>
-<tr><td></td><td class="Required">service_notification_commands</td><td class="Optional"><i>command_name</i></td></tr>
+<tr><td></td><td class="Required">host_notification_commands</td><td class="Required"><i>command_name</i></td></tr>
+<tr><td></td><td class="Required">service_notification_commands</td><td class="Required"><i>command_name</i></td></tr>
<tr><td></td><td class="Optional">email</td><td class="Optional"><i>email_address</i></td></tr>
<tr><td></td><td class="Optional">pager</td><td class="Optional"><i>pager_number or pager_email_gateway</i></td></tr>
<tr><td></td><td class="Optional">address<i>x</i></td><td class="Optional"><i>additional_contact_address</i></td></tr>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/html/main.html new/nagios-2.7/html/main.html
--- old/nagios-2.6/html/main.html 2006-11-28 03:29:05.000000000 +0100
+++ new/nagios-2.7/html/main.html 2007-01-19 23:02:01.000000000 +0100
@@ -35,8 +35,8 @@
<P>
<div align=center>
-<div align=center CLASS="version">Version 2.6</div>
-<div align=center CLASS="releaseDate">November 27, 2006</div>
+<div align=center CLASS="version">Version 2.7</div>
+<div align=center CLASS="releaseDate">January 19, 2007</div>
</div>
</P>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/include/common.h new/nagios-2.7/include/common.h
--- old/nagios-2.6/include/common.h 2006-11-28 03:29:05.000000000 +0100
+++ new/nagios-2.7/include/common.h 2007-01-19 23:02:01.000000000 +0100
@@ -21,8 +21,8 @@
************************************************************************/
-#define PROGRAM_VERSION "2.6"
-#define PROGRAM_MODIFICATION_DATE "11-27-2006"
+#define PROGRAM_VERSION "2.7"
+#define PROGRAM_MODIFICATION_DATE "01-19-2007"
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/include/downtime.h new/nagios-2.7/include/downtime.h
--- old/nagios-2.6/include/downtime.h 2005-11-26 04:52:07.000000000 +0100
+++ new/nagios-2.7/include/downtime.h 2007-01-08 23:24:13.000000000 +0100
@@ -2,8 +2,8 @@
*
* DOWNTIME.H - Header file for scheduled downtime functions
*
- * Copyright (c) 2001-2005 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 11-25-2005
+ * Copyright (c) 2001-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-08-2007
*
* License:
*
@@ -76,6 +76,7 @@
int register_downtime(int,unsigned long);
int handle_scheduled_downtime(scheduled_downtime *);
+int handle_scheduled_downtime_by_id(unsigned long);
int check_pending_flex_host_downtime(host *);
int check_pending_flex_service_downtime(service *);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/include/nagios.h.in new/nagios-2.7/include/nagios.h.in
--- old/nagios-2.6/include/nagios.h.in 2006-10-27 02:06:42.000000000 +0200
+++ new/nagios-2.7/include/nagios.h.in 2007-01-08 23:24:13.000000000 +0100
@@ -2,7 +2,7 @@
*
* Nagios Main Header File
* Written By: Ethan Galstad (nagios@nagios.org)
- * Last Modified: 10-26-2006
+ * Last Modified: 01-08-2007
*
* 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
@@ -441,25 +441,13 @@
}passive_check_result;
-/* SCHEDULED_DOWNTIME_ENTRY structure */
-typedef struct scheduled_downtime_entry_struct{
- int type;
- void *object;
- time_t start_time;
- time_t end_time;
- int is_in_effect;
- int fixed;
- unsigned long duration;
- int comment_id;
- }scheduled_downtime_entry;
-
-
/* CIRCULAR_BUFFER structure - used by worker threads */
typedef struct circular_buffer_struct{
void **buffer;
int tail;
int head;
int items;
+ int high; /* highest number of items that has ever been stored in buffer */
unsigned long overflow;
pthread_mutex_t buffer_lock;
}circular_buffer;
@@ -479,8 +467,8 @@
/* slots in circular buffers */
-#define COMMAND_BUFFER_SLOTS 1024
-#define SERVICE_BUFFER_SLOTS 1024
+#define DEFAULT_EXTERNAL_COMMAND_BUFFER_SLOTS 4096
+#define DEFAULT_CHECK_RESULT_BUFFER_SLOTS 4096
/* worker threads */
#define TOTAL_WORKER_THREADS 2
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/nagios.spec new/nagios-2.7/nagios.spec
--- old/nagios-2.6/nagios.spec 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.7/nagios.spec 2007-01-19 23:01:59.000000000 +0100
@@ -1,5 +1,5 @@
%define name nagios
-%define version 2.6
+%define version 2.7
%define release 1.fc4.test
%define nsusr nagios
%define nsgrp nagios
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/p1.pl new/nagios-2.7/p1.pl
--- old/nagios-2.6/p1.pl 2006-03-22 00:32:46.000000000 +0100
+++ new/nagios-2.7/p1.pl 2006-12-13 16:14:26.000000000 +0100
@@ -188,6 +188,7 @@
sub hndlr {
\@ARGV = \@_ ;
local \$^W = 1 ;
+ \$ENV{NAGIOS_PLUGIN} = '$filename' ;
# <<< START of PLUGIN (first line of plugin is line 8 in the text) >>>
$sub
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/sample-config/mrtg.cfg.in new/nagios-2.7/sample-config/mrtg.cfg.in
--- old/nagios-2.6/sample-config/mrtg.cfg.in 1970-01-01 01:00:00.000000000 +0100
+++ new/nagios-2.7/sample-config/mrtg.cfg.in 2007-01-03 03:50:42.000000000 +0100
@@ -0,0 +1,116 @@
+###################################################################
+# MRTG Graphs: Nagios @VERSION@ Statistics
+#
+# You can add the following entries to your MRTG config file to
+# begin graphing several Nagios statistics which can be useful for
+# debugging and trending purposes. The nagiostats binary (which is
+# included as part of the Nagios distribution) is used to generate
+# the data.
+###################################################################
+
+# Service Latency and Execution Time
+Target[nagios-a]: `@bindir@/nagiostats --mrtg --data=AVGACTSVCLAT,AVGACTSVCEXT,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-a]: 100000
+Title[nagios-a]: Average Service Check Latency and Execution Time
+PageTop[nagios-a]: <H1>Average Service Check Latency and Execution Time</H1>
+Options[nagios-a]: growright,gauge,nopercent
+YLegend[nagios-a]: Milliseconds
+ShortLegend[nagios-a]:
+LegendI[nagios-a]: Latency:
+LegendO[nagios-a]: Execution Time:
+Legend1[nagios-a]: Latency
+Legend2[nagios-a]: Execution Time
+Legend3[nagios-a]: Maximal 5 Minute Latency
+Legend4[nagios-a]: Maximal 5 Minute Execution Time
+
+# Service Percent State Change
+Target[nagios-b]: `@bindir@/nagiostats --mrtg --data=AVGACTSVCPSC,AVGPSVSVCPSC,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-b]: 100
+Title[nagios-b]: Average Service Check State Change
+PageTop[nagios-b]: <H1>Average Service Check State Change</H1>
+Options[nagios-b]: growright,gauge,nopercent
+YLegend[nagios-b]: Percent
+ShortLegend[nagios-b]:
+LegendI[nagios-b]: Active Check % Change:
+LegendO[nagios-b]: Passive Check % Change:
+Legend1[nagios-b]: State Change
+Legend2[nagios-b]: State Change
+Legend3[nagios-b]: Maximal 5 Minute State Change
+Legend4[nagios-b]: Maximal 5 Minute State Change
+
+# Host Latency and Execution Time
+Target[nagios-c]: `@bindir@/nagiostats --mrtg --data=AVGACTHSTLAT,AVGACTHSTEXT,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-c]: 100000
+Title[nagios-c]: Average Host Check Latency and Execution Time
+PageTop[nagios-c]: <H1>Average Host Check Latency and Execution Time</H1>
+Options[nagios-c]: growright,gauge,nopercent
+YLegend[nagios-c]: Milliseconds
+ShortLegend[nagios-c]:
+LegendI[nagios-c]: Latency:
+LegendO[nagios-c]: Execution Time:
+Legend1[nagios-c]: Latency
+Legend2[nagios-c]: Execution Time
+Legend3[nagios-c]: Maximal 5 Minute Latency
+Legend4[nagios-c]: Maximal 5 Minute Execution Time
+
+# Host Percent State Change
+Target[nagios-d]: `@bindir@/nagiostats --mrtg --data=AVGACTHSTPSC,AVGPSVHSTPSC,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-d]: 100
+Title[nagios-d]: Average Host Check State Change
+PageTop[nagios-d]: <H1>Average Host Check State Change</H1>
+Options[nagios-d]: growright,gauge,nopercent
+YLegend[nagios-d]: Percent
+ShortLegend[nagios-d]:
+LegendI[nagios-d]: Active Check % Change:
+LegendO[nagios-d]: Passive Check % Change:
+Legend1[nagios-d]: State Change
+Legend2[nagios-d]: State Change
+Legend3[nagios-d]: Maximal 5 Minute State Change
+Legend4[nagios-d]: Maximal 5 Minute State Change
+
+# Hosts/Services Actively Checked in Last 5 Minutes
+Target[nagios-e]: `@bindir@/nagiostats --mrtg --data=NUMACTHSTCHK5M,NUMACTSVCCHK5M,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-e]: 7000
+Title[nagios-e]: Objects Actively Checked in Last 5 Minutes
+PageTop[nagios-e]: <H1>Objects Actively Checked in Last 5 Minutes</H1>
+Options[nagios-e]: growright,gauge,nopercent
+YLegend[nagios-e]: Percent
+ShortLegend[nagios-e]:
+LegendI[nagios-e]: Hosts:
+LegendO[nagios-e]: Services:
+
+# Hosts/Services Passively Checked in Last 5 Minutes
+Target[nagios-f]: `@bindir@/nagiostats --mrtg --data=NUMPSVHSTCHK5M,NUMPSVSVCCHK5M,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-f]: 7000
+Title[nagios-f]: Objects Passively Checked Last 5 Minutes
+PageTop[nagios-f]: <H1>Objects Passively Checked Last 5 Minutes</H1>
+Options[nagios-f]: growright,gauge,nopercent
+YLegend[nagios-f]: Percent
+ShortLegend[nagios-f]:
+LegendI[nagios-f]: Hosts:
+LegendO[nagios-f]: Services:
+
+
+# Used/Avail External Command Buffers
+Target[nagios-g]: `@bindir@/nagiostats --mrtg --data=TOTCMDBUF,USEDCMDBUF,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-g]: 7000
+Title[nagios-g]: External Command Buffers
+PageTop[nagios-g]: <H1>External Command Buffers</H1>
+Options[nagios-g]: growright,gauge,nopercent
+YLegend[nagios-g]: Percent
+ShortLegend[nagios-g]:
+LegendI[nagios-g]: Avail:
+LegendO[nagios-g]: Used:
+
+
+# Used/Avail Check Result buffers
+Target[nagios-h]: `@bindir@/nagiostats --mrtg --data=TOTCHKBUF,USEDCHKBUF,PROGRUNTIME,NAGIOSVERPID`
+MaxBytes[nagios-h]: 7000
+Title[nagios-h]: Check Result Buffers
+PageTop[nagios-h]: <H1>Check Result Buffers</H1>
+Options[nagios-h]: growright,gauge,nopercent
+YLegend[nagios-h]: Percent
+ShortLegend[nagios-h]:
+LegendI[nagios-h]: Avail:
+LegendO[nagios-h]: Used:
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/sample-config/nagios.cfg.in new/nagios-2.7/sample-config/nagios.cfg.in
--- old/nagios-2.6/sample-config/nagios.cfg.in 2006-11-22 03:22:41.000000000 +0100
+++ new/nagios-2.7/sample-config/nagios.cfg.in 2006-12-22 02:43:20.000000000 +0100
@@ -6,7 +6,7 @@
# file. I've provided some comments here, but things may not be so
# clear without further explanation.
#
-# Last Modified: 11-21-2006
+# Last Modified: 12-21-2006
#
##############################################################################
@@ -158,6 +158,16 @@
+# EXTERNAL COMMAND BUFFER SLOTS
+# This settings is used to tweak the number of items or "slots" that
+# the Nagios daemon should allocate to the buffer that holds incoming
+# external commands before they are processed. As external commands
+# are processed by the daemon, they are removed from the buffer.
+
+external_command_buffer_slots=4096
+
+
+
# COMMENT FILE
# This is the file that Nagios will use for storing host and service
# comments.
@@ -414,6 +424,15 @@
+# CHECK RESULT BUFFER SLOTS
+# This settings is used to tweak the number of items or "slots" that
+# the Nagios daemon should allocate to the buffer that holds
+# service check results before they are processed. As check results
+# are processed by the daemon, they are removed from the buffer.
+
+check_result_buffer_slots=4096
+
+
# AUTO-RESCHEDULING OPTION
# This option determines whether or not Nagios will attempt to
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/update-version new/nagios-2.7/update-version
--- old/nagios-2.6/update-version 2006-11-28 03:29:04.000000000 +0100
+++ new/nagios-2.7/update-version 2007-01-19 23:01:59.000000000 +0100
@@ -10,10 +10,10 @@
fi
# Current version number
-CURRENTVERSION=2.6
+CURRENTVERSION=2.7
# Last date
-LASTDATE=11-27-2006
+LASTDATE=01-19-2007
if [ "x$1" = "x" ]
then
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/xdata/xodtemplate.c new/nagios-2.7/xdata/xodtemplate.c
--- old/nagios-2.6/xdata/xodtemplate.c 2006-07-10 21:20:24.000000000 +0200
+++ new/nagios-2.7/xdata/xodtemplate.c 2007-01-19 23:02:01.000000000 +0100
@@ -2,8 +2,8 @@
*
* XODTEMPLATE.C - Template-based object configuration data input routines
*
- * Copyright (c) 2001-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 07-10-2006
+ * Copyright (c) 2001-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-19-2007
*
* Description:
*
@@ -581,10 +581,6 @@
current_line++;
- /* skip empty lines */
- if(input[0]=='#' || input[0]==';' || input[0]=='\r' || input[0]=='\n')
- continue;
-
/* grab data before comment delimiter - faster than a strtok() and strncpy()... */
for(x=0;input[x]!='\x0';x++)
if(input[x]==';')
@@ -594,8 +590,8 @@
/* strip input */
strip(input);
- /* skip blank lines */
- if(input[0]=='\x0')
+ /* skip empty lines */
+ if(input[0]=='\x0' || input[0]=='#')
continue;
/* this is the start of an object definition */
@@ -5062,6 +5058,8 @@
new_servicedependency->dependent_hostgroup_name=NULL;
new_servicedependency->host_name=NULL;
new_servicedependency->dependent_host_name=NULL;
+ new_servicedependency->service_description=NULL;
+ new_servicedependency->dependent_service_description=NULL;
new_servicedependency->has_been_resolved=temp_servicedependency->has_been_resolved;
new_servicedependency->register_object=temp_servicedependency->register_object;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/nagios-2.6/xdata/xsddefault.c new/nagios-2.7/xdata/xsddefault.c
--- old/nagios-2.6/xdata/xsddefault.c 2006-05-20 21:39:34.000000000 +0200
+++ new/nagios-2.7/xdata/xsddefault.c 2007-01-03 03:50:43.000000000 +0100
@@ -2,8 +2,8 @@
*
* XSDDEFAULT.C - Default external status data input routines for Nagios
*
- * Copyright (c) 2000-2006 Ethan Galstad (nagios@nagios.org)
- * Last Modified: 05-20-2006
+ * Copyright (c) 2000-2007 Ethan Galstad (nagios@nagios.org)
+ * Last Modified: 01-02-2007
*
* License:
*
@@ -86,6 +86,11 @@
extern int process_performance_data;
extern int aggregate_status_updates;
+extern int external_command_buffer_slots;
+extern int check_result_buffer_slots;
+extern circular_buffer external_command_buffer;
+extern circular_buffer service_result_buffer;
+
extern char *macro_x[MACRO_X_COUNT];
extern host *host_list;
@@ -295,6 +300,10 @@
time_t current_time;
int fd=0;
FILE *fp=NULL;
+ int used_check_result_buffer_slots=0;
+ int high_check_result_buffer_slots=0;
+ int used_external_command_buffer_slots=0;
+ int high_external_command_buffer_slots=0;
/* open a safe temp file for output */
snprintf(xsddefault_aggregate_temp_file,sizeof(xsddefault_aggregate_temp_file)-1,"%sXXXXXX",xsddefault_temp_file);
@@ -322,6 +331,18 @@
return ERROR;
}
+ /* get number of items in the check result buffer */
+ pthread_mutex_lock(&service_result_buffer.buffer_lock);
+ used_check_result_buffer_slots=service_result_buffer.items;
+ high_check_result_buffer_slots=service_result_buffer.high;
+ pthread_mutex_unlock(&service_result_buffer.buffer_lock);
+
+ /* get number of items in the command buffer */
+ pthread_mutex_lock(&external_command_buffer.buffer_lock);
+ used_external_command_buffer_slots=external_command_buffer.items;
+ high_external_command_buffer_slots=external_command_buffer.high;
+ pthread_mutex_unlock(&external_command_buffer.buffer_lock);
+
/* write version info to status file */
fprintf(fp,"########################################\n");
fprintf(fp,"# NAGIOS STATUS FILE\n");
@@ -362,6 +383,12 @@
fprintf(fp,"\tprocess_performance_data=%d\n",process_performance_data);
fprintf(fp,"\tglobal_host_event_handler=%s\n",(global_host_event_handler==NULL)?"":global_host_event_handler);
fprintf(fp,"\tglobal_service_event_handler=%s\n",(global_service_event_handler==NULL)?"":global_service_event_handler);
+ fprintf(fp,"\ttotal_external_command_buffer_slots=%d\n",external_command_buffer_slots);
+ fprintf(fp,"\tused_external_command_buffer_slots=%d\n",used_external_command_buffer_slots);
+ fprintf(fp,"\thigh_external_command_buffer_slots=%d\n",high_external_command_buffer_slots);
+ fprintf(fp,"\ttotal_check_result_buffer_slots=%d\n",check_result_buffer_slots);
+ fprintf(fp,"\tused_check_result_buffer_slots=%d\n",used_check_result_buffer_slots);
+ fprintf(fp,"\thigh_check_result_buffer_slots=%d\n",high_check_result_buffer_slots);
fprintf(fp,"\t}\n\n");
++++++ nagios.sehandlers.end_time.patch ++++++
--- /var/tmp/diff_new_pack.oW3480/_old 2007-02-09 16:58:25.000000000 +0100
+++ /var/tmp/diff_new_pack.oW3480/_new 2007-02-09 16:58:25.000000000 +0100
@@ -86,15 +86,6 @@
int macro_options=STRIP_ILLEGAL_MACRO_CHARS|ESCAPE_MACRO_CHARS;
#ifdef DEBUG0
-@@ -558,6 +566,8 @@ int run_host_event_handler(host *hst){
-
- #ifdef USE_EVENT_BROKER
- /* send event data to broker */
-+ end_time.tv_sec=0L;
-+ end_time.tv_usec=0L;
- broker_event_handler(NEBTYPE_EVENTHANDLER_START,NEBFLAG_NONE,NEBATTR_NONE,HOST_EVENTHANDLER,(void *)hst,hst->current_state,hst->state_type,start_time,end_time,exectime,event_handler_timeout,early_timeout,result,hst->event_handler,NULL,NULL,NULL);
- #endif
-
@@ -592,10 +602,10 @@ int run_host_event_handler(host *hst){
write_to_logs_and_console(temp_buffer,NSLOG_EVENT_HANDLER | NSLOG_RUNTIME_WARNING,TRUE);
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org