This is a translation of the original English documentation page. Help us make it better.

8 zabbix_jsコマンド

概要

zabbix_jsは、埋め込みスクリプトのテストに使用できるコマンドラインユーティリティです。

このユーティリティは、文字列パラメータを使用してユーザースクリプトを実行し結果を出力します。スクリプトは、埋込みのzabbixスクリプトエンジンを使用して実行されます。

コンパイルまたは実行エラーの場合、zabbix_jsはエラーをstderrに出力し、コード1で終了します。

使用法

zabbix_js -s script-file -p input-param [-l log-level] [-t timeout]
       zabbix_js -s script-file -i input-file [-l log-level] [-t timeout]
       zabbix_js -h
       zabbix_js -V

zabbix_jsは、次のコマンドラインパラメーターを使用可能です。

  -s, --script script-file          実行するスクリプトのファイル名を指定します。 '-'がファイル名として指定されている場合、スクリプトはstdinから読み取られます
         -i, --input input-file            入力パラメーターのファイル名を指定してください。ファイル名として「-」が指定されている場合、入力はstdinから読み取られます。
         -p, --param input-param           入力パラメーターを指定
         -l, --loglevel log-level          ログレベル指定
         -t, --timeout timeout             タイムアウトを秒単位で指定
         -h, --help                        ヘルプの表示
         -V, --version                     バージョン番号の表示

例:

zabbix_js -s script-file.js -p example