Adding a line to GUI
Honia A
honia2002 at hotmail.com
Fri Jul 16 18:09:42 CEST 2010
Michael,
Thank you very much! It did the trick :-)
Regards,
h
Date: Fri, 16 Jul 2010 15:06:39 +0200
From: michael.friedrich at univie.ac.at
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Adding a line to GUI
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
_________________________________________________________________
Hotmail has tools for the New Busy. Search, chat and e-mail from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20100716/48dab14f/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