[icinga-checkins] icinga.org: icinga-core/master: reformat last commit, update changelog, restructure AUTHORS

git at icinga.org git at icinga.org
Wed May 19 13:41:54 CEST 2010


Module: icinga-core
Branch: master
Commit: 3299a6bb604b5169e9e2be2886e3c643fae5ddba
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=3299a6bb604b5169e9e2be2886e3c643fae5ddba

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Sun May 16 21:30:04 2010 +0200

reformat last commit, update changelog, restructure AUTHORS

---

 AUTHORS       |   33 +++++++-----
 Changelog     |    2 +
 base/events.c |  153 ++++++++++++++++++++++++++++-----------------------------
 base/icinga.c |    8 ++--
 4 files changed, 100 insertions(+), 96 deletions(-)

diff --git a/AUTHORS b/AUTHORS
index b751f6f..8b5ef43 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -1,23 +1,28 @@
-Andreas Ericsson
 Bernd Arnold
-Chris Moates
-Christoph Maser
-Bill McGonigle
-DECOIT GmbH
-Duncan Ferguson
-Ethan Galstad
 Hendrik Baecker
-Jean Gabes
-Joerg Linge
 Karl DeBisschop
-Marius Hein
-Mark Young
+Andreas Ericsson
+Duncan Ferguson
 Michael Friedrich
-Michael Luebben
+Jean Gabes
+Ethan Galstad
+DECOIT GmbH
+Marius Hein
+Joerg Linge
 Opsera Ltd
+Michael Luebben
+Christoph Maser
+Bill McGonigle
 Sean Millichamp
+Chris Moates
+Steven D. Morrey
+Wolfgang Nieder
+William Preston
 Tobias Scherbaum
 Ton Voon
 Vitali Voroth
-William Preston
-Wolfgang Nieder
+Mark Young
+
+
+
+
diff --git a/Changelog b/Changelog
index 1766bf1..5754b07 100644
--- a/Changelog
+++ b/Changelog
@@ -8,6 +8,8 @@ ENHANCEMENTS
 * core: init script shows config errors option; don't remove pidfile if icinga did not stop in a timely manner
 * core: add in sync retention facility (Ton Voon, Opsera Ltd)
 * core: add new is_volatile setting of 2 for services, which respects the re-notification interval for notifications (Ton Voon)
+* core: add Icinga option -S functions much like -s but will dump the entire scheduling queue is it would run, 
+        in addition to providing the summary data (Steven (Steven D. Morrey)
 
 * cgi: add opt-in display_name from hosts/services definitions; if set, they will be shown in the classical ui
 * cgi: re-add quick search to navmenu in order to provide quick host/service lookups without idoutils/api
diff --git a/base/events.c b/base/events.c
index 76f2bd9..faf5442 100644
--- a/base/events.c
+++ b/base/events.c
@@ -614,149 +614,146 @@ void init_timing_loop(void){
 	return;
         }
 
-/*gives information about a particular event*/
-void display_event_data(timed_event* event, int priority)
-{
 
-    printf("\t\tEvent:");
+/*gives information about a particular event*/
+void display_event_data(timed_event* event, int priority){
 
+	printf("\t\tEvent:");
 
    	switch(event->event_type){
 
         case EVENT_SERVICE_CHECK:
-            printf("\t\t(service check)\n");
-            service* temp_service=(service *)event->event_data;
-            printf("\t\tService Description: %s\n",temp_service->description);
-            printf("\t\tAssociated Host:     %s\n",temp_service->host_name);
+		printf("\t\t(service check)\n");
+		service* temp_service=(service *)event->event_data;
+		printf("\t\tService Description: %s\n",temp_service->description);
+		printf("\t\tAssociated Host:     %s\n",temp_service->host_name);
         break;
 
         case EVENT_HOST_CHECK:
-            printf("\t\t(host check)\n");
-            host* temp_host=(host *)event->event_data;
-            printf("\t\tHost:     %s\n",temp_host->name);
-            /* run a host check */
+        	printf("\t\t(host check)\n");
+        	host* temp_host=(host *)event->event_data;
+        	printf("\t\tHost:     %s\n",temp_host->name);
+            	/* run a host check */
         break;
 
         case EVENT_COMMAND_CHECK:
-            printf("\t\t(external command check)\n");
+            	printf("\t\t(external command check)\n");
         break;
 
         case EVENT_LOG_ROTATION:
-            printf("\t\t(log file rotation)\n");
+            	printf("\t\t(log file rotation)\n");
         break;
 
         case EVENT_PROGRAM_SHUTDOWN:
-            printf("\t\t(program shutdown)\n");
+            	printf("\t\t(program shutdown)\n");
         break;
 
         case EVENT_PROGRAM_RESTART:
-            printf("\t\t(program restart)\n");
+            	printf("\t\t(program restart)\n");
         break;
 
         case EVENT_CHECK_REAPER:
-            printf("\t\t(service check reaper)\n");
+            	printf("\t\t(service check reaper)\n");
         break;
 
         case EVENT_ORPHAN_CHECK:
-            printf("\t\t(orphaned service check)\n");
+            	printf("\t\t(orphaned service check)\n");
         break;
 
         case EVENT_RETENTION_SAVE:
-            printf("\t\t(retention save)\n");
+            	printf("\t\t(retention save)\n");
         break;
 
         case EVENT_STATUS_SAVE:
-            printf("\t\t(status save)\n");
+            	printf("\t\t(status save)\n");
         break;
 
         case EVENT_SCHEDULED_DOWNTIME:
-            printf("\t\t(scheduled downtime)\n");
+            	printf("\t\t(scheduled downtime)\n");
         break;
 
         case EVENT_SFRESHNESS_CHECK:
-            printf("\t\t(service result freshness check)\n");
+            	printf("\t\t(service result freshness check)\n");
         break;
 
         case EVENT_HFRESHNESS_CHECK:
-            printf("\t\t(host result freshness check)\n");
+            	printf("\t\t(host result freshness check)\n");
         break;
 
         case EVENT_EXPIRE_DOWNTIME:
-            printf("\t\t(expire downtime)\n");
+            	printf("\t\t(expire downtime)\n");
         break;
 
         case EVENT_RESCHEDULE_CHECKS:
-            printf("\t\t(reschedule checks)\n");
+            	printf("\t\t(reschedule checks)\n");
         break;
 
         case EVENT_EXPIRE_COMMENT:
-            printf("\t\t(expire comment)\n");
+            	printf("\t\t(expire comment)\n");
         break;
 
         case EVENT_CHECK_PROGRAM_UPDATE:
-            printf("\t\t(check for Nagios updates)");
+            	printf("\t\t(check for Icinga updates)");
         break;
 
         case EVENT_USER_FUNCTION:
-            printf("\t\t(user function)\n");
+            	printf("\t\t(user function)\n");
         break;
 
         default:
-            printf("\t\t(Unknown!!!)\n");
+            	printf("\t\t(Unknown!!!)\n");
         break;
-    }
-    printf("\t\tPriority %s\n", (priority == 0 ?"Low":"High"));
-    printf("\t\tInterval: %lu\n",event->event_interval);
-    printf("\t\tEvent Time: %s\n",ctime(&event->run_time));
-    printf("\n\n");
+
+    	}
+
+    	printf("\t\tPriority %s\n", (priority == 0 ?"Low":"High"));
+	printf("\t\tInterval: %lu\n",event->event_interval);
+    	printf("\t\tEvent Time: %s\n",ctime(&event->run_time));
+    	printf("\n\n");
 }
 
-/* displays the service check scheduling queue */
-void display_schedule(void)
-{
-    timed_event* high_event;
-    timed_event* low_event;
-    timed_event* event;
-    int priority;
-    printf("*** The current scheduling queue is listed below ***\n");
-
-    high_event = event_list_high;
-    low_event = event_list_low;
-
-    while(high_event || low_event)
-    {
-        if(low_event && high_event)
-        {
-            if(low_event->run_time < high_event->run_time)
-            {
-                event = low_event;
-                low_event = low_event->next;
-                priority = 0;
-            }else{
-                event = high_event;
-                high_event = high_event->next;
-                priority = 1;
-            }
-        }else{
-            if(high_event)
-            {
-                event = high_event;
-                high_event = high_event->next;
-                priority =1;
-            }
-
-            if(low_event)
-            {
-                event = low_event;
-                low_event = low_event->next;
-                priority =0;
-            }
 
-        }
+/* displays the service check scheduling queue */
+void display_schedule(void){
+    	timed_event* high_event;
+    	timed_event* low_event;
+    	timed_event* event;
+    	int priority;
+    
+	printf("*** The current scheduling queue is listed below ***\n");
+
+	high_event = event_list_high;
+    	low_event = event_list_low;
+
+    	while(high_event || low_event){
+	        if(low_event && high_event){
+            		if(low_event->run_time < high_event->run_time){
+                		event = low_event;
+                		low_event = low_event->next;
+                		priority = 0;
+            		}else{
+                		event = high_event;
+                		high_event = high_event->next;
+                		priority = 1;
+            		}
+        	}else{
+            		if(high_event){
+                		event = high_event;
+                		high_event = high_event->next;
+                		priority = 1;
+            		}
+
+            		if(low_event){
+                		event = low_event;
+                		low_event = low_event->next;
+                		priority = 0;
+            		}
+        	}
+
+        	display_event_data(event, priority);
+    	}
+}
 
-        display_event_data(event, priority);
-    }
- }
 
 /* displays service check scheduling information */
 void display_scheduling_info(void){
diff --git a/base/icinga.c b/base/icinga.c
index 89ae30a..9373aa2 100644
--- a/base/icinga.c
+++ b/base/icinga.c
@@ -343,8 +343,8 @@ int main(int argc, char **argv, char **env){
 			test_scheduling=TRUE;
 			break;
 
-        case 'S': /* scheduling check and show queue*/
-            show_schedule=TRUE;
+	        case 'S': /* scheduling check and show queue*/
+        		show_schedule=TRUE;
 			test_scheduling=TRUE;
 			break;
 
@@ -598,9 +598,9 @@ int main(int argc, char **argv, char **env){
 			/* initialize the event timing loop */
 			init_timing_loop();
 
-            /* display schedule */
+			/* display schedule */
 			if(show_schedule == TRUE)
-                display_schedule();
+        	        	display_schedule();
 
 			/* display scheduling information */
 			display_scheduling_info();





More information about the icinga-checkins mailing list