creating CGI scripts and interacting with existing ones.

Mohammed Murphy mohammed.murphy at tandberg.com
Wed Mar 31 20:19:39 CEST 2010


Thanks for the hints Marc. Unfortunately I was not clear enough about my 
requirements before so I will expound a bit more.

I only want to talk about the first issue of creating CGI scripts and 
break it down into two parts. Firstly, I would like to create a web page 
that contains the look & feel and header & footer info of the existing 
pages with my own customised web data in the middle. The important point 
is that I would like it to be automated, because (as I revealed in my 
last email) this is for an installer-type application. So for instance, 
if a Nagios user updates their Nagios system to a newer version with a 
slighly different look & feel, then the same installer-type application 
will still be able to generate the custom page appropriately. Is this 
possible?

Secondly, is the issue of linking to my custom pages from exisitng 
pages. The fact that I want it to be automated means that I require a 
way of informing Nagios that a new custom page exists so Nagios will 
provide a way for the Nagios user to access it via a link on an existing 
page. I thought about parsing and then modifying side.html, but that is 
only reliable if that is guaranteed to remain the same in all versions 
of Nagios. nBoard, for instance, requires that a new html page simply be 
added to an 'extras' directory; so I wondered if the default Nagios web 
UI had a similar mechanism.

Thanks for your time Marc. I hope I clarified my requirements a bit more.

Marc Powell wrote:
>
>
> On Tue, Mar 16, 2010 at 9:01 AM, Mohammed Murphy 
> <mohammed.murphy at tandberg.com <mailto:mohammed.murphy at tandberg.com>> 
> wrote:
>
>     Hey there,
>
>     I would like to able to write and run my own CGI scripts on the Nagios
>     server that would be run by Nagios and have its output displayed
>     as part
>     of the Nagios web interface just like the existing CGIs.
>
>
> Easy enough. Create it, put it in sbin and link to it from 
> share/side.html or wherever you want to.
>  
>
>     In addition, I would like to able to interact with the
>     pre-installed CGIs, for
>     instance, by writing a plugin that creates a data file that is then
>     used, by say, the histogram.cgi script. Is this possible?
>
>
> Sure. Anything is possible; the only question is if you are capable. 
> To do the above, you'd just need to edit histogram.c, add your 
> specific code and recompile.
>  
>
>     and if not, what other options are there for producing
>     product-specific diagrams (on
>     existing pages) using Nagios infrastructure?
>
>
> It depends on what your requirements are. Custom links on 
> share/side.html or using host/service extended info pages (notes_url) 
> would be simple and might work for you, for example. 
>
> -- 
> Marc
> formerly marc /at/ ena.com <http://ena.com>
> ------------------------------------------------------------------------
>
> ------------------------------------------------------------------------------
> 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-devel mailing list
> Nagios-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-devel
>   


------------------------------------------------------------------------------
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




More information about the Developers mailing list