Persistent Comment in Acknowledgement
Aidan Anderson
mail at aidananderson.co.uk
Mon Apr 12 16:17:59 CEST 2010
Assaf Flatto wrote:
> Aidan Anderson wrote:
>
>> Assaf Flatto wrote:
>>
>>
>>> Aidan Anderson wrote:
>>>
>>>
>>>
>>>> Hi,
>>>>
>>>> When acknowledging a host or service problem, I've noticed that the
>>>> "Persistent Comment" check box is not ticked by default in v3 whereas it
>>>> was in v2. Is there anyway of changing this behaviour so that it is
>>>> ticked by default? I can't find any options in cgi.cfg or nagios.cfg to
>>>> change this behaviour. If there is no official way to change it, does
>>>> anyone know of a hack to do this?
>>>>
>>>> regards,
>>>> Aidan
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>> you will need to make changes to the cmd.c file and recompile the cgi AFAIK.
>>>
>>>
>>> Good luck .
>>>
>>>
>>>
>>>
>>>
>>>
>> Hi Assaf,
>>
>> Thanks for the reply. I must admit, I've never messed about with C
>> source code before but I'll give it a try :)
>>
>> I assume that if I make any changes, I would need to repeat the changes
>> following any upgrades?
>>
>>
>
> Aidan
>
> If you've never delved in the C code , then i'd advise not to do any
> changes with out the help of a C programer and have a backup before any
> attempts begin .
>
> As for the upgrade issue - Of course !
> Since this is a local change , unless you plan to to the upgrade for
> the core with out the CGI's , any "local" change will be overwritten
> when you upgrade .
>
> but once you do it and get it right , doing it again on the new version
> will be much easier .
>
> Good luck
>
> Assaf
>
>
>
Hi Assaf,
I had to have a go and (surprising myself) have managed to do it. I
will remember to do this again each time I upgrade.
Below is the output of a 'diff' following my changes to cmd.c in case
anyone else is interested in making this modification. 2 changes are
required to cover host and service acknowledgements.
958c958
< printf("<INPUT TYPE='checkbox' NAME='persistent'
%s>",(cmd==CMD_ACKNOWLEDGE_HOST_PROBLEM)?"":"CHECKED");
---
> printf("<INPUT TYPE='checkbox' NAME='persistent'
CHECKED>");
984c984
< printf("<INPUT TYPE='checkbox' NAME='persistent'
%s",(cmd==CMD_ACKNOWLEDGE_SVC_PROBLEM)?"":"CHECKED");
---
> printf("<INPUT TYPE='checkbox' NAME='persistent'
CHECKED>");
Thanks again for your help Assaf.
regards,
Aidan
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null
More information about the Users
mailing list