Adding a line to GUI
Michael Friedrich
michael.friedrich at univie.ac.at
Fri Jul 16 15:06:39 CEST 2010
Honia A wrote:
> Thanks for your reply Bret.
>
> I would like the second idea (keep that message on all the pages in
> that same gray box). So I looked into that directory you mentioned
> (/usr/local/nagios/sbin) but they are all the compiled cgi files. When
> I opened them with UltraEdit and Notepad, they were not editable, the
> lines look something like this (below).
>
> Is there any way I could edit them or may be there are pre-compiled
> versions of the files which I could edit?
you have to edit the appropriate .c files and then recompile the cgis
out of them. since this a generic box, it's only defined once.
$ grep -r display_info_table *
points to cgi/cgiutils.c
Within this function you will see a bunch of html code within printf
calls. There you can edit/add your preferred line.
e.g. adding below
if(current_authdata!=NULL)
printf("Logged in as
<i>%s</i><BR>\n",(!strcmp(current_authdata->username,""))?"?":current_authdata->username);
this
printf("<i><font color=red>beware of the nagios root, don't
change anything!</font></i><BR>\n");
After that, run make clean && make cgis && sudo make install-cgis
Should do the trick ;-)
Kind regards,
Michael
--
DI (FH) Michael Friedrich
michael.friedrich at univie.ac.at
Tel: +43 1 4277 14359
Vienna University Computer Center
Universitaetsstrasse 7 A-1010 Vienna, Austria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100716/a0c14007/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
-------------- next part --------------
_______________________________________________
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