[Nagios-users] Updated RPM for Nagios 1.0

Karl DeBisschop karl at debisschop.net
Sun Jun 1 05:41:46 CEST 2003


On Fri, 2003-05-30 at 15:08, Ethan Galstad wrote:

> I was just about to release 1.1 on my day off, so this is good 
> timing.  I forgot to apply the cmd CGI patch to the 1.x branch, but 
> will do so ASAP.  FYI, the stable branch of CVS for 1.x is called 
> nagios-1-x-bugfixes.  
> 
> I believe the Postgres timestamp patch (submitted by jbearce on Nov. 
> 6th) was already applied to 1.0, although there might have been a 
> later patch that I missed.  Other than that, you got all the patches 
> since 1.0 (there weren't many). 

The spec file has been patched in CVS. 

I am getting an error in the build, however:

perl -MExtUtils::Embed -e xsinit
gcc -O3 -mcpu=pentium -I/usr/include -DHAVE_CONFIG_H -c perlxsi.c  `perl
-MExtUtils::Embed -e ccopts`
gcc -O3 -mcpu=pentium -I/usr/include -DHAVE_CONFIG_H -c mini_epn.c `perl
-MExtUtils::Embed -e ccopts`
mini_epn.c: In function `main':
mini_epn.c:116: `my_perl' undeclared (first use in this function)
mini_epn.c:116: (Each undeclared identifier is reported only once
mini_epn.c:116: for each function it appears in.)
make: *** [mini_epn] Error 1
error: Bad exit status from /tmp/rpm-tmp.53847 (%build)

This is on RH 9. I'll look into it, but if anyone recognizes the
problem, I'm not averse to hints.

RE: postgresql, you did apply 

http://sourceforge.net/mailarchive/message.php?msg_id=2450802

for 7.2 -- the patch I added was

http://sourceforge.net/mailarchive/forum.php?thread_id=1481590&forum_id=1872

for 7.3

I have it in patch form. If you want me to apply if, say the word. I'll
attached the patch as well.

--
Karl
-------------- next part --------------
# http://sourceforge.net/mailarchive/forum.php?thread_id=1481590&forum_id=1872
--- xdata/xcddb.c	2 Dec 2002 04:30:12 -0000	1.3
+++ xdata/xcddb.c	4 Jan 2003 00:02:37 -0000
@@ -711,6 +711,6 @@
 	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,persistent,entry_time,author_name,comment_data) VALUES ('%s','%d',FROM_UNIXTIME(%lu),'%s','%s')",XCDDB_HOSTCOMMENTS_TABLE,escaped_host_name,persistent,entry_time,escaped_author_name,escaped_comment_data);
 #endif
 #ifdef USE_XCDPGSQL
-	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,persistent,entry_time,author_name,comment_data) VALUES ('%s','%d',abstime(%lu),'%s','%s')",XCDDB_HOSTCOMMENTS_TABLE,escaped_host_name,persistent,entry_time,escaped_author_name,escaped_comment_data);
+	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,persistent,entry_time,author_name,comment_data) VALUES ('%s','%d',%lu::abstime::timestamp,'%s','%s')",XCDDB_HOSTCOMMENTS_TABLE,escaped_host_name,persistent,entry_time,escaped_author_name,escaped_comment_data);
 #endif
 	sql_statement[sizeof(sql_statement)-1]='\x0';

--- xdata/xcddb.c	2 Dec 2002 04:30:12 -0000	1.3
+++ xdata/xcddb.c	4 Jan 2003 00:02:37 -0000
@@ -809,6 +809,6 @@
 	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,service_description,persistent,entry_time,author_name,comment_data) VALUES ('%s','%s','%d',FROM_UNIXTIME(%lu),'%s','%s')",XCDDB_SERVICECOMMENTS_TABLE,escaped_host_name,escaped_svc_description,persistent,entry_time,escaped_author_name,escaped_comment_data);
 #endif
 #ifdef USE_XCDPGSQL
-	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,service_description,persistent,entry_time,author_name,comment_data) VALUES ('%s','%s','%d',abstime(%lu),'%s','%s')",XCDDB_SERVICECOMMENTS_TABLE,escaped_host_name,escaped_svc_description,persistent,entry_time,escaped_author_name,escaped_comment_data);
+	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,service_description,persistent,entry_time,author_name,comment_data) VALUES ('%s','%s','%d',%lu::abstime::timestamp,'%s','%s')",XCDDB_SERVICECOMMENTS_TABLE,escaped_host_name,escaped_svc_description,persistent,entry_time,escaped_author_name,escaped_comment_data);
 #endif
 	sql_statement[sizeof(sql_statement)-1]='\x0';

--- xdata/xdddb.c	2 Dec 2002 04:30:12 -0000	1.3
+++ xdata/xdddb.c	4 Jan 2003 00:02:41 -0000
@@ -751,6 +751,6 @@
 	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,entry_time,author_name,comment_data,start_time,end_time,fixed,duration) VALUES ('%s',FROM_UNIXTIME(%lu),'%s','%s',FROM_UNIXTIME(%lu),FROM_UNIXTIME(%lu),'%d','%lu')",XDDDB_HOSTDOWNTIME_TABLE,escaped_host_name,entry_time,escaped_author_name,escaped_comment_data,start_time,end_time,fixed,duration);
 #endif
 #ifdef USE_XDDPGSQL
-	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,entry_time,author_name,comment_data,start_time,end_time,fixed,duration) VALUES ('%s',abstime(%lu),'%s','%s',abstime(%lu),abstime(%lu),'%d','%lu')",XDDDB_HOSTDOWNTIME_TABLE,escaped_host_name,entry_time,escaped_author_name,escaped_comment_data,start_time,end_time,fixed,duration);
+	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,entry_time,author_name,comment_data,start_time,end_time,fixed,duration) VALUES ('%s',%lu::abstime::timestamp,'%s','%s',%lu::abstime::timestamp,%lu::abstime::timestamp,'%d','%lu')",XDDDB_HOSTDOWNTIME_TABLE,escaped_host_name,entry_time,escaped_author_name,escaped_comment_data,start_time,end_time,fixed,duration);
 #endif
 	sql_statement[sizeof(sql_statement)-1]='\x0';

--- xdata/xdddb.c	2 Dec 2002 04:30:12 -0000	1.3
+++ xdata/xdddb.c	4 Jan 2003 00:02:41 -0000
@@ -849,6 +849,6 @@
 	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,service_description,entry_time,author_name,comment_data,start_time,end_time,fixed,duration) VALUES ('%s','%s',FROM_UNIXTIME(%lu),'%s','%s',FROM_UNIXTIME(%lu),FROM_UNIXTIME(%lu),'%d','%lu')",XDDDB_SERVICEDOWNTIME_TABLE,escaped_host_name,escaped_svc_description,entry_time,escaped_author_name,escaped_comment_data,start_time,end_time,fixed,duration);
 #endif
 #ifdef USE_XDDPGSQL
-	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,service_description,entry_time,author_name,comment_data,start_time,end_time,fixed,duration) VALUES ('%s','%s',abstime(%lu),'%s','%s',abstime(%lu),abstime(%lu),'%d','%lu')",XDDDB_SERVICEDOWNTIME_TABLE,escaped_host_name,escaped_svc_description,entry_time,escaped_author_name,escaped_comment_data,start_time,end_time,fixed,duration);
+	snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,service_description,entry_time,author_name,comment_data,start_time,end_time,fixed,duration) VALUES ('%s','%s',%lu::abstime::timestamp,'%s','%s',%lu::abstime::timestamp,%lu::abstime::timestamp,'%d','%lu')",XDDDB_SERVICEDOWNTIME_TABLE,escaped_host_name,escaped_svc_description,entry_time,escaped_author_name,escaped_comment_data,start_time,end_time,fixed,duration);
 #endif
 	sql_statement[sizeof(sql_statement)-1]='\x0';

--- xdata/xsddb.c	14 Nov 2002 02:51:34 -0000	1.4
+++ xdata/xsddb.c	4 Jan 2003 00:02:44 -0000
@@ -909,6 +909,6 @@
 		snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (last_update,program_start,nagios_pid,daemon_mode,last_command_check,last_log_rotation,enable_notifications,execute_service_checks,accept_passive_service_checks,enable_event_handlers,obsess_over_services,enable_flap_detection,enable_failure_prediction,process_performance_data) VALUES (FROM_UNIXTIME(%lu),FROM_UNIXTIME(%lu),'%d','%d',FROM_UNIXTIME(%lu),FROM_UNIXTIME(%lu),'%d','%d','%d','%d','%d','%d','%d','%d')",XSDDB_PROGRAMSTATUS_TABLE,(unsigned long)current_time,(unsigned long)_program_start,_nagios_pid,_daemon_mode,(unsigned long)_last_command_check,(unsigned long)_last_log_rotation,_enable_notifications,_execute_service_checks,_accept_passive_service_checks,_enable_event_handlers,_obsess_over_services,_enable_flap_detection,_enable_failure_prediction,_process_performance_data);
 #endif
 #ifdef USE_XSDPGSQL
-		snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (last_update,program_start,nagios_pid,daemon_mode,last_command_check,last_log_rotation,enable_notifications,execute_service_checks,accept_passive_service_checks,enable_event_handlers,obsess_over_services,enable_flap_detection,enable_failure_prediction,process_performance_data) VALUES (timestamptz(%lu),timestamptz(%lu),'%d','%d',timestamptz(%lu),timestamptz(%lu),'%d','%d','%d','%d','%d','%d','%d','%d')",XSDDB_PROGRAMSTATUS_TABLE,(unsigned long)current_time,(unsigned long)_program_start,_nagios_pid,_daemon_mode,(unsigned long)_last_command_check,(unsigned long)_last_log_rotation,_enable_notifications,_execute_service_checks,_accept_passive_service_checks,_enable_event_handlers,_obsess_over_services,_enable_flap_detection,_enable_failure_prediction,_process_performance_data);
+		snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (last_update,program_start,nagios_pid,daemon_mode,last_command_check,last_log_rotation,enable_notifications,execute_service_checks,accept_passive_service_checks,enable_event_handlers,obsess_over_services,enable_flap_detection,enable_failure_prediction,process_performance_data) VALUES (%lu::abstime::timestamp,%lu::abstime::timestamp,'%d','%d',%lu::abstime::timestamp,%lu::abstime::timestamp,'%d','%d','%d','%d','%d','%d','%d','%d')",XSDDB_PROGRAMSTATUS_TABLE,(unsigned long)current_time,(unsigned long)_program_start,_nagios_pid,_daemon_mode,(unsigned long)_last_command_check,(unsigned long)_last_log_rotation,_enable_notifications,_execute_service_checks,_accept_passive_service_checks,_enable_event_handlers,_obsess_over_services,_enable_flap_detection,_enable_failure_prediction,_process_performance_data);
 #endif
 	        }

--- xdata/xsddb.c	14 Nov 2002 02:51:34 -0000	1.4
+++ xdata/xsddb.c	4 Jan 2003 00:02:44 -0000
@@ -919,6 +919,6 @@
 		snprintf(sql_statement,sizeof(sql_statement)-1,"UPDATE %s SET last_update=FROM_UNIXTIME(%lu),program_start=FROM_UNIXTIME(%lu),nagios_pid='%d',daemon_mode='%d',last_command_check=FROM_UNIXTIME(%lu),last_log_rotation=FROM_UNIXTIME(%lu),enable_notifications='%d',execute_service_checks='%d',accept_passive_service_checks='%d',enable_event_handlers='%d',obsess_over_services='%d',enable_flap_detection='%d',enable_failure_prediction='%d',process_performance_data='%d'",XSDDB_PROGRAMSTATUS_TABLE,(unsigned long)current_time,(unsigned long)_program_start,_nagios_pid,_daemon_mode,(unsigned long)_last_command_check,(unsigned long)_last_log_rotation,_enable_notifications,_execute_service_checks,_accept_passive_service_checks,_enable_event_handlers,_obsess_over_services,_enable_flap_detection,_enable_failure_prediction,_process_performance_data);
 #endif
 #ifdef USE_XSDPGSQL
-		snprintf(sql_statement,sizeof(sql_statement)-1,"UPDATE %s SET last_update=timestamptz(%lu),program_start=timestamptz(%lu),nagios_pid='%d',daemon_mode='%d',last_command_check=timestamptz(%lu),last_log_rotation=timestamptz(%lu),enable_notifications='%d',execute_service_checks='%d',accept_passive_service_checks='%d',enable_event_handlers='%d',obsess_over_services='%d',enable_flap_detection='%d',enable_failure_prediction='%d',process_performance_data='%d'",XSDDB_PROGRAMSTATUS_TABLE,(unsigned long)current_time,(unsigned long)_program_start,_nagios_pid,_daemon_mode,(unsigned long)_last_command_check,(unsigned long)_last_log_rotation,_enable_notifications,_execute_service_checks,_accept_passive_service_checks,_enable_event_handlers,_obsess_over_services,_enable_flap_detection,_enable_failure_prediction,_process_performance_data);
+		snprintf(sql_statement,sizeof(sql_statement)-1,"UPDATE %s SET last_update=%lu::abstime::timestamp,program_start=%lu::abstime::timestamp,nagios_pid='%d',daemon_mode='%d',last_command_check=%lu::abstime::timestamp,last_log_rotation=%lu::abstime::timestamp,enable_notifications='%d',execute_service_checks='%d',accept_passive_service_checks='%d',enable_event_handlers='%d',obsess_over_services='%d',enable_flap_detection='%d',enable_failure_prediction='%d',process_performance_data='%d'",XSDDB_PROGRAMSTATUS_TABLE,(unsigned long)current_time,(unsigned long)_program_start,_nagios_pid,_daemon_mode,(unsigned long)_last_command_check,(unsigned long)_last_log_rotation,_enable_notifications,_execute_service_checks,_accept_passive_service_checks,_enable_event_handlers,_obsess_over_services,_enable_flap_detection,_enable_failure_prediction,_process_performance_data);
 #endif
 	        }

--- xdata/xsddb.c	14 Nov 2002 02:51:34 -0000	1.4
+++ xdata/xsddb.c	4 Jan 2003 00:02:44 -0000
@@ -999,6 +999,6 @@
 			snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,host_status,last_update,last_check,last_state_change,problem_acknowledged,time_up,time_down,time_unreachable,last_notification,current_notification,notifications_enabled,event_handler_enabled,checks_enabled,flap_detection_enabled,is_flapping,percent_state_change,scheduled_downtime_depth,failure_prediction_enabled,process_performance_data,plugin_output) VALUES ('%s','PENDING',FROM_UNIXTIME(%lu),FROM_UNIXTIME(0),FROM_UNIXTIME(0),'0','0','0','0',FROM_UNIXTIME(0),'0','%d','%d','%d','%d','0','0.0','%d','%d','%d','(Not enough data to determine host status yet)')",XSDDB_HOSTSTATUS_TABLE,escaped_host_name,(unsigned long)last_update,notifications_enabled,event_handler_enabled,checks_enabled,flap_detection_enabled,scheduled_downtime_depth,failure_prediction_enabled,process_performance_data);
 #endif
 #ifdef USE_XSDPGSQL
-			snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,host_status,last_update,last_check,last_state_change,problem_acknowledged,time_up,time_down,time_unreachable,last_notification,current_notification,notifications_enabled,event_handler_enabled,checks_enabled,flap_detection_enabled,is_flapping,percent_state_change,scheduled_downtime_depth,failure_prediction_enabled,process_performance_data,plugin_output) VALUES ('%s','PENDING',timestamptz(%lu),timestamptz(0),timestamptz(0),'0','0','0','0',timestamptz(0),'0','%d','%d','%d','%d','0','0.0','%d','%d','%d','(Not enough data to determine host status yet)')",XSDDB_HOSTSTATUS_TABLE,escaped_host_name,(unsigned long)last_update,notifications_enabled,event_handler_enabled,checks_enabled,flap_detection_enabled,scheduled_downtime_depth,failure_prediction_enabled,process_performance_data);
+			snprintf(sql_statement,sizeof(sql_statement)-1,"INSERT INTO %s (host_name,host_status,last_update,last_check,last_state_change,problem_acknowledged,time_up,time_down,time_unreachable,last_notification,current_notification,notifications_enabled,event_handler_enabled,checks_enabled,flap_detection_enabled,is_flapping,percent_state_change,scheduled_downtime_depth,failure_prediction_enabled,process_performance_data,plugin_output) VALUES ('%s','PENDING',%lu::abstime::timestamp,0::abstime::timestamp,0::abstime::timestamp,'0','0','0','0',0::abstime::timestamp,'0','%d','%d','%d','%d','0','0.0','%d','%d','%d','(Not enough data to determine host status yet)')",XSDDB_HOSTSTATUS_TABLE,escaped_host_name,(unsigned long)last_update,notifications_enabled,event_handler_enabled,checks_enabled,flap_detection_enabled,scheduled_downtime_depth,failure_prediction_enabled,process_performance_data);
 #endif
 		        }


More information about the Developers mailing list