script_mc
Description
Executes a script and appends the results to the query.
warning
To use the script_mc source, a configured SM Remote Executor connector and Memcached server are required. It is optimal to set up the Memcached server with SM Remote Executor (or an intermediary), rather than on the Smart Monitor server itself.
Syntax
...| script_mc "<path_to_script_engine> <path_to_script>"
Required Arguments
| Parameter | Syntax | Description |
|---|---|---|
path_to_script_engine | <string> | Path to the executable file. |
path_to_script | <string> | Path to the script. |
Source Configuration
info
All source settings are stored in _cluster/settings.
"sme" : {
"core" : {
"memcached": {
"port": "11211",
"ip": "127.0.0.1"
}
}
}
Examples
Example 1
In this example, script_mc runs the script by explicitly specifying the interpreter and file path in one line.
| script_mc "python /home/user/dev/test-script/test-script.py"