if (FAIL == zbx_es_execute_command(script, param, timeout, &result, script_error, sizeof(script_error), NULL))
const char title_message[] = "zabbix_js";
const char syslog_app_name[] = "zabbix_js";
const char *usage_message[] = {
"-s script-file", "-p input-param", "[-l log-level]", "[-t timeout]", NULL,
"-s script-file", "-i input-file", "[-l log-level]", "[-t timeout]", NULL,
unsigned char program_type;
#define JS_TIMEOUT_MAX 60
#define JS_TIMEOUT_DEF ZBX_ES_TIMEOUT
#define JS_TIMEOUT_MIN_STR ZBX_STR(JS_TIMEOUT_MIN)
#define JS_TIMEOUT_MAX_STR ZBX_STR(JS_TIMEOUT_MAX)
#define JS_TIMEOUT_DEF_STR ZBX_STR(JS_TIMEOUT_DEF)
const char *help_message[] = {
"Execute script using Zabbix embedded scripting engine.",
" -s,--script script-file Specify the filename of script to execute. Specify - for",
" -i,--input input-file Specify input parameter file name. Specify - for",
" -p,--param input-param Specify input parameter",
" -l,--loglevel log-level Specify log level",
" -t --timeout timeout Specify the timeout in seconds. Valid range: " JS_TIMEOUT_MIN_STR "-"
JS_TIMEOUT_MAX_STR " seconds",
" (default: " JS_TIMEOUT_DEF_STR " seconds)",
" -h --help Display this help message",
" -V --version Display version number",
" zabbix_js -s script-file.js -p example",