I've tried hundreds of times to try powershell script using execute program.
When the sensor is down washed over, this value is inserted into the db.
This work is well inserted, but parameter values is null....
What I have to do ?
Please help me.....
T.T
Note that the environment variable settings rewrote, and I set parameters in execute program are %device %status %down %sensor (%message)
The powershell script content is
param($message) mysql --host xx.xx.x.xxx --port 3306 xxxxx --user=xxxx --password=xxxx -e "$query"; $query="INSERT INTO em_tran (tran_phone, tran_callback, tran_status, tran_msg, tran_type) VALUES ('010-000-0000', '010-111-0007', '1', '$message', '4');"
What is wrong?
Article Comments
Attention: This article is a record of a conversation with the Paessler support team. The information in this conversation is not updated to preserve the historical record. As a result, some of the information or recommendations in this conversation might be out of date.
Try "%device %status %down %sensor (%message)" as parameters, including the quotes. Does that work? Because currently, only one parameter is passed to the script, which is %device.
Jul, 2016 - Permalink