Page 1 of 1

Customizing Nagios Web Front End

Posted: Mon Oct 12, 2015 9:22 am
by neworderfac33
Good afternoon,

I have been asked if it is possible to customize the web front end in such a way that only the "Host Groups" view is available (to prevent people from clicking on all the other views)

I suspect that this isn't possible without some modification to the Nagios Core application itself, but I'd be happy to be proved wrong!

Thanks in advance

Pete

Re: Customizing Nagios Web Front End

Posted: Mon Oct 12, 2015 9:58 am
by hsmith
I don't know of a 'clean' way. However....


Disclaimer: You probably can / will break something by editing this:

Code: Select all

/usr/local/nagios/share/side.php 



I'll just leave it there in case :shock:

Re: Customizing Nagios Web Front End

Posted: Mon Oct 12, 2015 10:25 am
by neworderfac33
My God. It's full of stars..!

Re: Customizing Nagios Web Front End

Posted: Mon Oct 12, 2015 10:33 am
by tmcdonald
Not 100% what you're looking at, but it should be full of PHP and HTML code.

Re: Customizing Nagios Web Front End

Posted: Tue Oct 13, 2015 3:43 am
by neworderfac33
Actually, that's EXACTLY what i was looking at.
I commented out the sections that I wanted by prefixing the code with !-- and ending it with -- thus:

Code: Select all

<li><a href="<?php echo $cfg["cgi_base_url"];?>/statusmap.cgi?host=all" target="<?php echo $link_target;?>">Map</a></li>
became:

Code: Select all

<!--li><a href="<?php echo $cfg["cgi_base_url"];?>/statusmap.cgi?host=all" target="<?php echo $link_target;?>">Map</a></li-->
I'm going to have a go with main.php now, to see what I can break in there!

Thanks very much indeed - this thread can now be closed.

Pete

Re: Customizing Nagios Web Front End

Posted: Tue Oct 13, 2015 9:40 am
by hsmith
Glad to hear you didn't break it too bad :)