Page 1 of 2

url hostname

Posted: Mon May 04, 2015 7:07 pm
by monitoreo1
I have a question , as I get the argument in the following url hostname

http://hostip/nagiosxi/includes/compone ... t=hostname[/b]&service=myservice

We are using:
Nagios XI Version : 2014R2.6
x86_64
Red Hat Enterprise Linux Server release 7.0 (Maipo)
Gnome is not installed

Re: url hostname

Posted: Tue May 05, 2015 9:20 am
by tmcdonald
I am not sure what your question is. Can you please rephrase what you are having trouble with?

Re: url hostname

Posted: Tue May 05, 2015 11:35 am
by monitoreo1
The detail is that I have developed an action component that connects me to a page that will pass data as arguments from a textbox but not taking me hostadrres .

Re: url hostname

Posted: Tue May 05, 2015 11:43 am
by abrist
monitoreo1 wrote: The detail is that I have developed an action component that connects me to a page that will pass data as arguments from a textbox but not taking me hostadrres .
Can you please clarify more? Are you having issues accessing a specific macro in the actions component, or maybe issues with a specific hostaddress in your action?

Re: url hostname

Posted: Tue May 05, 2015 11:54 am
by monitoreo1
The idea is that from a component ejecfutar a php fromulario action that takes a parameter and that parameter is sent to a shell script host customer but have not managed to send the % hostaddres % of the shell script

Re: url hostname

Posted: Tue May 05, 2015 12:00 pm
by tmcdonald
Can you confirm the macro you are using?

%hostaddres% is missing the second "s".

Re: url hostname

Posted: Tue May 05, 2015 12:05 pm
by monitoreo1
This is my command
/usr/local/nagios/libexec/MyForm.php %hostaddress%

This is my form
https://drive.google.com/file/d/0B20mP- ... sp=sharing

Re: url hostname

Posted: Tue May 05, 2015 12:53 pm
by monitoreo1
Can't get $_GET or $_REQUEST to work

I can't figure out why all of the
following var_dump statements are returning NULL when I submit data
via the INPUT field. I can see that the variable 'value' is being
passed in the url (my address bar says "test.php?value=blah) but the
four var_dump statements print "NULL NULL NULL NULL".

<?php
var_dump ($_REQUEST);
var_dump ($_REQUEST['value']);
var_dump ($_GET);
var_dump ($_GET['value']);

?>

Re: url hostname

Posted: Tue May 05, 2015 1:10 pm
by ssax
Do you have any rewrite rules that would remove them or are you using a framework such as CodeIgniter?

Re: url hostname

Posted: Tue May 05, 2015 2:05 pm
by monitoreo1
I'm not using any framework is php.
There uan components section of the Code (The Code field can Contain optional PHP code to be EVALUATED . )
As I can add a popup to confirm an action with JavaScript in this section