[Nagios-devel] patch: fix matching in service history

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] patch: fix matching in service history

Post by Guest »

--=-2qsu8b/SH7pBHneVcqkD
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

Took some time to figure out why my service history was showing entries
for servers other than the one I asked for :)

Patch against latest cvs.
--
Matthew Kent
http://magoazul.com

--=-2qsu8b/SH7pBHneVcqkD
Content-Disposition: attachment; filename=nagios-2.0a1-history_match.patch
Content-Type: text/x-patch; name=nagios-2.0a1-history_match.patch; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: 7bit

--- nagios_orig/cgi/history.c 2004-11-09 22:55:15.000000000 -0500
+++ nagios/cgi/history.c 2004-11-19 22:30:21.000000000 -0500
@@ -533,7 +533,7 @@
}
}

- printf("\n");

while(1){

@@ -839,7 +839,7 @@
else if(history_type==SERVICE_DOWNTIME_HISTORY)
sprintf(match1," SERVICE DOWNTIME ALERT: %s;%s;",host_name,svc_description);

- if(strstr(temp_buffer,match1))
+ if(strstr(temp_buffer,match1) && (history_type==SERVICE_HISTORY || history_type==SERVICE_FLAPPING_HISTORY || history_type==SERVICE_DOWNTIME_HISTORY))
display_line=TRUE;

if(display_line==TRUE){

--=-2qsu8b/SH7pBHneVcqkD--






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked