When acknowledging a service alarm, the "Persistent Comment:" is unchecked by default. Is there a setting somewhere to make this check box checked by default?
VMware - Nagios XI 2009R1.4B
Thank you,
Jarrod
Persistent Comment Default on
-
JarrodHardy
- Posts: 18
- Joined: Wed Mar 09, 2011 5:44 pm
Persistent Comment Default on
You do not have the required permissions to view the files attached to this post.
-
tonyyarusso
- Posts: 1128
- Joined: Wed Mar 03, 2010 12:38 pm
- Location: St. Paul, MN, USA
- Contact:
Re: Persistent Comment Default on
Sadly, no. That particular view is actually coming straight out of the Nagios Core code, unlike the rest that has been replaced by XI-specific stuff. In order to change it you would need to edit a printf statement in cgi/cmd.c in the Nagios source and recompile that file.
-
JarrodHardy
- Posts: 18
- Joined: Wed Mar 09, 2011 5:44 pm
Re: Persistent Comment Default on
in the cgi/cmd.c file, would it just be changing the following 2 lines for both host and service?tonyyarusso wrote:Sadly, no. That particular view is actually coming straight out of the Nagios Core code, unlike the rest that has been replaced by XI-specific stuff. In order to change it you would need to edit a printf statement in cgi/cmd.c in the Nagios source and recompile that file.
ORIGINAL: Lines 958 & 984
Code: Select all
printf("<INPUT TYPE='checkbox' NAME='persistent' %s>",(cmd==CMD_ACKNOWLEDGE_HOST_PROBLEM)?"":"CHECKED");
printf("<INPUT TYPE='checkbox' NAME='persistent' %s",(cmd==CMD_ACKNOWLEDGE_SVC_PROBLEM)?"":"CHECKED");
Code: Select all
printf("<INPUT TYPE='checkbox' NAME='persistent' CHECKED>");
printf("<INPUT TYPE='checkbox' NAME='persistent' CHECKED>");
Thanks,
Jarrod
-
JarrodHardy
- Posts: 18
- Joined: Wed Mar 09, 2011 5:44 pm
Re: Persistent Comment Default on
I went ahead and tested this out, and it works perfectly.
ORIGINAL: Lines 958 & 984
MODIFIED: Lines 958 & 984
Then perform these steps to backup the original cmd.cgi and then make and install just the cmd.cgi with the changes:
Note: To backout just copy the cmd.cgi.orig back over the cmd.cgi
Thanks,
Jarrod
ORIGINAL: Lines 958 & 984
Code: Select all
printf("<INPUT TYPE='checkbox' NAME='persistent' %s>",(cmd==CMD_ACKNOWLEDGE_HOST_PROBLEM)?"":"CHECKED");
printf("<INPUT TYPE='checkbox' NAME='persistent' %s",(cmd==CMD_ACKNOWLEDGE_SVC_PROBLEM)?"":"CHECKED");
Code: Select all
printf("<INPUT TYPE='checkbox' NAME='persistent' CHECKED>");
printf("<INPUT TYPE='checkbox' NAME='persistent' CHECKED>");
Code: Select all
# cd /<--source code location-->/nagios-3.2.3/
# ./configure
# make cgis
# cp /usr/local/nagios/sbin/cmd.cgi /usr/local/nagios/sbin/cmd.cgi.orig
# cp cgi/cmd.cgi /usr/local/nagios/sbin/cmd.cgi
Note: To backout just copy the cmd.cgi.orig back over the cmd.cgi
Thanks,
Jarrod
Re: Persistent Comment Default on
Excellent Jarrod and I am glad this worked out and we appreciate you sharing the information as well. 