PDA

View Full Version : Save values from remote commands


alin
31-05-2010, 11:36
Is there a way to save (somewhere, somehow) the value/values returned by a remote command in an action?

Let's say I want to open a new ticket through a webservice. I've made up a php file that I call on a remote machine with a syntax similar to:

windows machine:c\php\php.exe "c:\documents ad settings\user\remotecall\remotecall.php" parameter1=value1 parameter2=value2

Parameter1 is open/close and the other parameters are used from authentication and some other stuff.

I would like to save the newly created ticket number returned by the remote call somewhere in zabbix. When the problem is solved I would like to call again the webservice to close the ticket. To do that I need the ticket number.

I've searched some documentation but found nothing.

Thank you.

zabbix_zen
31-05-2010, 17:07
I must have misunderstood.

You cannot possibly be asking about something like,

windows machine:c\php\php.exe "c:\documents ad settings\user\remotecall\remotecall.php ˃˃ val_list.txt" parameter1=value1 parameter2=value2

alin
31-05-2010, 18:04
windows machine:c\php\php.exe "c:\documents ad settings\user\remotecall\remotecall.php ˃˃ val_list.txt" parameter1=value1 parameter2=value2

I need something like:
{VAR1} = windows machine:c\php\php.exe "c:\documents ad settings\user\remotecall\remotecall.php" action="open" description="{trigger.name}"

When I'll call the remote command to close the opened ticket:
windows machine:c\php\php.exe "c:\documents ad settings\user\remotecall\remotecall.php" action="close" ticket="{VAR1}"

alin
03-06-2010, 12:54
How about saving the result localy, on the windows machine, and then getting the output file with the values I need?
Is there a way I can do that?