Apr 252014
 

When I acknowledge a service problem on Nagios, I do not want to send a notification that it has been acknowledge. This patch, against Nagios 3.5.1 changes the default from CHECKED to not checked.

--- cgi/cmd.c~	2013-08-30 17:46:14.000000000 +0000
+++ cgi/cmd.c	2014-04-25 14:21:18.581749115 +0000
@@ -966,7 +966,7 @@
 				printf("<input type="checkbox" checked="checked" name="sticky_ack" />");
 				printf("
\n");
 				printf("
Send Notification:<b>");
-				printf("<input type="checkbox" checked="checked" name="send_notification" />");
+				printf("<input type="checkbox" name="send_notification" />");
 				printf("</b>
\n");
 				}
 			printf("
Persistent%s:<b>", (cmd == CMD_ACKNOWLEDGE_HOST_PROBLEM) ? " Comment" : "");
@@ -992,7 +992,7 @@
 				printf("<input type="checkbox" checked="checked" name="sticky_ack" />");
 				printf("</b>
\n");
 				printf("
Send Notification:<b>");
-				printf("<input type="checkbox" checked="checked" name="send_notification" />");
+				printf("<input type="checkbox" name="send_notification" />");
 				printf("</b>
\n");
 				}
 			printf("
Persistent%s:<b>", (cmd == CMD_ACKNOWLEDGE_SVC_PROBLEM) ? " Comment" : "");


With credit to Marc Powell for his suggestion.

After that initial success, I went one step further and supplied a default comment of ‘OK’. Acknowledging a service problem is now three clicks. The full patch is here.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive