Hi folks:
Is it possible to insert Javascript code in Extra Actions icon for make a dropdown menu instead a link?
The idea is add more than one link in the icon for different actions.
Thanks
Javascript - Nagios CGIs
-
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Javascript - Nagios CGIs
The only way to do this is to modify the core CGI's and then recompile Nagios, this is a standard feature on Nagios XI but not core.
Re: Javascript - Nagios CGIs
If Nagios XI is completely out of the question you could checkout V-Shell. Its a popular web frontend for Nagios Core.
http://exchange.nagios.org/directory/Ad ... ll/details
http://exchange.nagios.org/directory/Ad ... ll/details
Nicholas Scott
Former Nagios employee
Former Nagios employee
-
- Posts: 50
- Joined: Mon Feb 06, 2012 11:13 pm
Re: Javascript - Nagios CGIs
OK... Can I obtain vía PHP/HTML/JavaScript without modify CGI some variables, such IP or HOSTNAME? For example adding HTML code to SSI share files.
I tried to insert PHP code in SSI files but doesn't works
I tried to insert PHP code in SSI files but doesn't works
Re: Javascript - Nagios CGIs
Well, you could try the SSI approach, I would recommend using a PHP frontend, but if you want to go this route its availabe, here is the overview on sourceforge:
http://nagios.sourceforge.net/docs/3_0/cgiincludes.html
It will only include headers and footers, but that should do it for you.
http://nagios.sourceforge.net/docs/3_0/cgiincludes.html
It will only include headers and footers, but that should do it for you.
Nicholas Scott
Former Nagios employee
Former Nagios employee
-
- Posts: 50
- Joined: Mon Feb 06, 2012 11:13 pm
Re: Javascript - Nagios CGIs
OK, to use PHP you need create a PHP CLI script, for example:
#!/usr/bin/php
<?php
echo "<b>Nagios es pura vida</b>";
?>
But I have the dude... I want capture the hostname and create a dropdown menu in header for make ping.
#!/usr/bin/php
<?php
echo "<b>Nagios es pura vida</b>";
?>
But I have the dude... I want capture the hostname and create a dropdown menu in header for make ping.
-
- Posts: 50
- Joined: Mon Feb 06, 2012 11:13 pm
Re: Javascript - Nagios CGIs
Okis, I can make a little menu with util options with pure CSS and PHP code, I can adquire via URL the hostname.
In the image can see the look, and for demonstrative purposes I printed the hostname.
Now I need the IP, but via URL it's impossible, I have two options:
Via MK livestatus, I know how do it, but isn't standard and need additional steps
Via pure Nagios tricks... I don't know how, status.cgi, status.dat ¿? ¡¡¡Help appreciated!!!
Uploaded with ImageShack.us
In the image can see the look, and for demonstrative purposes I printed the hostname.
Now I need the IP, but via URL it's impossible, I have two options:
Via MK livestatus, I know how do it, but isn't standard and need additional steps
Via pure Nagios tricks... I don't know how, status.cgi, status.dat ¿? ¡¡¡Help appreciated!!!
Uploaded with ImageShack.us
-
- Posts: 50
- Joined: Mon Feb 06, 2012 11:13 pm
Re: Javascript - Nagios CGIs
Finally I can obtain IP via Livestatus and pure PHP code!!! thanks to LiveStatusSlave... I going to upload the script in the web comming soon.