url hostname

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
monitoreo1
Posts: 124
Joined: Wed Feb 18, 2015 10:41 am

url hostname

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: url hostname

Post by tmcdonald »

I am not sure what your question is. Can you please rephrase what you are having trouble with?
Former Nagios employee
monitoreo1
Posts: 124
Joined: Wed Feb 18, 2015 10:41 am

Re: url hostname

Post 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 .
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: url hostname

Post 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?
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
monitoreo1
Posts: 124
Joined: Wed Feb 18, 2015 10:41 am

Re: url hostname

Post 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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: url hostname

Post by tmcdonald »

Can you confirm the macro you are using?

%hostaddres% is missing the second "s".
Former Nagios employee
monitoreo1
Posts: 124
Joined: Wed Feb 18, 2015 10:41 am

Re: url hostname

Post 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
monitoreo1
Posts: 124
Joined: Wed Feb 18, 2015 10:41 am

Re: url hostname

Post 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']);

?>
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: url hostname

Post by ssax »

Do you have any rewrite rules that would remove them or are you using a framework such as CodeIgniter?
monitoreo1
Posts: 124
Joined: Wed Feb 18, 2015 10:41 am

Re: url hostname

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