Item prototypeオブジェクト
次のオブジェクトは、itemprototypeAPIに直接関連しています。
アイテムプロトタイプ
アイテムプロトタイプオブジェクトには、次のプロパティがあります。
| Property | Type | Description |
|---|---|---|
| itemid | ID | アイテムプロトタイプのIDです。 Property behavior: - read-only - 更新操作では required |
| delay | string | アイテムプロトタイプの更新間隔です。 秒、または接尾辞付きの時間単位(例: 30s, 1m, 2h, 1d)を指定できます。さらに、1つ以上のcustom intervalsを任意で指定でき、すべてセミコロンで区切ります。カスタム間隔には、柔軟間隔とスケジューリング間隔を組み合わせることができます。 ユーザーマクロとLLDマクロを指定できます。使用する場合、値は単一のマクロでなければなりません。複数のマクロや、マクロとテキストを混在させることはできません。柔軟間隔は、スラッシュで区切った2つのマクロとして記述できます(例: {$FLEX_INTERVAL}/{$FLEX_PERIOD})。例: 1h;wd1-5h9-18;{$Macro1}/1-7,00:00-24:00;0/6-7,12:00-24:00;{$Macro2}/{$Macro3}Property behavior: - type が "Zabbix エージェント" (0), "Simple check" (3), "Zabbix internal" (5), "External check" (10), "Database monitor" (11), "IPMI agent" (12), "SSH agent" (13), "TELNET agent" (14), "Calculated" (15), "JMX agent" (16), "HTTP agent" (19), "SNMP agent" (20), "Script" (21), "Browser" (22) に設定されている場合、または type が "Zabbix エージェント (active)" (7) に設定され、かつ key_ に "mqtt.get" が含まれない場合は required |
| hostid | ID | このアイテムプロトタイプが属するホストのIDです。 Property behavior: - constant - 作成操作では required |
| interfaceid | ID | このアイテムプロトタイプのホストインターフェースのIDです。 Property behavior: - アイテムプロトタイプがホストに属し、 type が "Zabbix エージェント", "IPMI agent", "JMX agent", "SNMP trap", または "SNMP agent" に設定されている場合は required- アイテムプロトタイプがホストに属し、 type が "Simple check", "External check", "SSH agent", "TELNET agent", または "HTTP agent" に設定されている場合は supported |
| key_ | string | アイテムプロトタイプのキーです。 Property behavior: - 作成操作では required - 継承オブジェクトでは read-only |
| name | string | アイテムプロトタイプの名前です。 ユーザーマクロをサポートします。 Property behavior: - 作成操作では required - 継承オブジェクトでは read-only |
| type | integer | アイテムプロトタイプのタイプです。 可能な値: 0 - Zabbix エージェント; 2 - Zabbix trapper; 3 - Simple check; 5 - Zabbix internal; 7 - Zabbix エージェント (active); 10 - External check; 11 - Database monitor; 12 - IPMI agent; 13 - SSH agent; 14 - TELNET agent; 15 - Calculated; 16 - JMX agent; 17 - SNMP trap; 18 - Dependent item; 19 - HTTP agent; 20 - SNMP agent; 21 - Script; 22 - Browser. Property behavior: - 作成操作では required - 継承オブジェクトでは read-only |
| url | string | URL文字列です。 LLDマクロ、ユーザーマクロ、{HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {HOST.PORT}, {ITEM.ID}, {ITEM.KEY} をサポートします。 Property behavior: - type が "HTTP agent" に設定されている場合は required- 継承オブジェクトでは read-only |
| value_type | integer | アイテムプロトタイプの情報のタイプです。 可能な値: 0 - numeric float; 1 - character; 2 - log; 3 - numeric unsigned; 4 - text; 5 - binary. Property behavior: - 作成操作では required - 継承オブジェクトでは read-only |
| allow_traps | integer | トラッパーアイテムと同様に値の取り込みを許可します。 0 - (default) 受信データの受け入れを許可しない; 1 - 受信データの受け入れを許可する。 Property behavior: - type が "HTTP agent" に設定されている場合は supported |
| authtype | integer | 認証方式です。type が "SSH agent" に設定されている場合の可能な値:0 - (default) password; 1 - public key. type が "HTTP agent" に設定されている場合の可能な値:0 - (default) none; 1 - basic; 2 - NTLM; 3 - Kerberos; 4 - Digest. Property behavior: - type が "SSH agent" または "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only( type が "HTTP agent" の場合) |
| description | string | アイテムプロトタイプの説明です。 |
| flags | integer | アイテムプロトタイプのOriginです。 可能な値: 2 - item prototype; 6 - discovered item prototype Property behavior: - read-only |
| follow_redirects | integer | データ取得時にレスポンスのリダイレクトを追跡するかどうかです。 可能な値: 0 - リダイレクトを追跡しない; 1 - (default) リダイレクトを追跡する。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| headers | array | HTTPリクエスト実行時に送信されるheadersの配列です。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| history | string | 履歴データを保存する期間を表す時間単位です。 ユーザーマクロとLLDマクロも指定できます。 Default: 31d. |
| http_proxy | string | HTTP(S)プロキシ接続文字列です。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| ipmi_sensor | string | IPMIセンサーです。 Property behavior: - type が "IPMI agent" に設定され、かつ key_ が "ipmi.get" に設定されていない場合は required- type が "IPMI agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| jmx_endpoint | string | JMXエージェントのカスタム接続文字列です。 Default: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi Property behavior: - type が "JMX agent" に設定されている場合は supported |
| logtimefmt | string | ログエントリ内の時刻の形式です。 Property behavior: - value_type が "log" に設定されている場合は supported- 継承オブジェクトでは read-only |
| master_itemid | ID | マスターアイテムのIDです。 Property behavior: - type が "Dependent item" に設定されている場合は required- 継承オブジェクトでは read-only |
| output_format | integer | レスポンスをJSONに変換するかどうかです。 可能な値: 0 - (default) 生データを保存する; 1 - JSONに変換する。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| params | string | アイテムプロトタイプのタイプに応じた追加パラメータです: - SSH agent および TELNET agent のアイテムプロトタイプでは実行するスクリプト; - database monitor のアイテムプロトタイプではSQLクエリ; - calculated item prototype では数式; - script および browser のアイテムプロトタイプではスクリプト。 Property behavior: - type が "Database monitor", "SSH agent", "TELNET agent", "Calculated", "Script", または "Browser" に設定されている場合は required- 継承オブジェクトでは read-only( type が "Script" または "Browser" の場合) |
| parameters | object/array | type が "Script" または "Browser" に設定されている場合の追加パラメータです。name と value プロパティを持つオブジェクトの配列で、name は一意でなければなりません。Property behavior: - type が "Script" または "Browser" に設定されている場合は supported- 継承オブジェクトでは read-only |
| password | string | 認証用パスワードです。 Property behavior: - type が "JMX agent" に設定され、username が設定されている場合は required- type が "Simple check", "SSH agent", "TELNET agent", "Database monitor", または "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only( type が "HTTP agent" の場合) |
| post_type | integer | posts プロパティに保存されるPOSTデータ本文のタイプです。可能な値: 0 - (default) 生データ; 2 - JSONデータ; 3 - XMLデータ。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| posts | string | HTTP(S)リクエスト本文データです。 Property behavior: - type が "HTTP agent" に設定され、post_type が "JSON data" または "XML data" に設定されている場合は required- type が "HTTP agent" に設定され、post_type が "Raw data" に設定されている場合は supported- 継承オブジェクトでは read-only |
| privatekey | string | 秘密鍵ファイル名です。 Property behavior: - type が "SSH agent" に設定され、authtype が "public key" に設定されている場合は required |
| publickey | string | 公開鍵ファイル名です。 Property behavior: - type が "SSH agent" に設定され、authtype が "public key" に設定されている場合は required |
| query_fields | array | HTTPリクエスト実行時に送信されるquery fieldsの配列です。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| request_method | integer | リクエストメソッドのタイプです。 可能な値: 0 - (default) GET; 1 - POST; 2 - PUT; 3 - HEAD. Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| retrieve_mode | integer | レスポンスのどの部分を保存するかです。request_method が "GET", "POST", または "PUT" に設定されている場合の可能な値:0 - (default) 本文; 1 - ヘッダー; 2 - 本文とヘッダーの両方を保存する。 request_method が "HEAD" に設定されている場合の可能な値:1 - ヘッダー. Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| snmp_oid | string | SNMP OIDです。 Property behavior: - type が "SNMP agent" に設定されている場合は required- 継承オブジェクトでは read-only |
| ssl_cert_file | string | 公開SSL鍵ファイルのパスです。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| ssl_key_file | string | 秘密SSL鍵ファイルのパスです。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| ssl_key_password | string | SSL鍵ファイルのパスワードです。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| status | integer | アイテムプロトタイプの状態です。 可能な値: 0 - (default) 有効なアイテムプロトタイプ; 1 - 無効なアイテムプロトタイプ; 3 - サポートされていないアイテムプロトタイプ。 |
| status_codes | string | 必要なHTTPステータスコードの範囲をカンマ区切りで指定します。 カンマ区切りリストの一部としてユーザーマクロまたはLLDマクロもサポートします。 例: 200,200-{$M},{$M},200-400 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| templateid | ID | 親テンプレートのアイテムプロトタイプのIDです。 Property behavior: - read-only |
| timeout | string | アイテムデータ取得リクエストのタイムアウトです。 秒、または接尾辞付きの時間単位(例: 30s, 1m)を指定できます。ユーザーマクロとLLDマクロも指定できます。 可能な値の範囲: 1-600s. Default: "" - プロキシ/グローバル設定を使用します。 Property behavior: - type が "Zabbix エージェント" (0), "Simple check" (3) で、かつ key_ が "vmware." および "icmpping" で始まらない場合、"Zabbix エージェント (active)" (7), "External check" (10), "Database monitor" (11), "SSH agent" (13), "TELNET agent" (14), "HTTP agent" (19), "SNMP agent" (20) で snmp_oid が "walk[" または "get[" で始まる場合, "Script" (21), "Browser" (22) は supported- 継承オブジェクトでは read-only |
| trapper_hosts | string | 許可されたホストです。 Property behavior: - type が "Zabbix trapper" に設定されている場合、または type が "HTTP agent" で allow_traps が "Allow to accept incoming data" に設定されている場合は supported |
| trends | string | トレンドデータを保存する期間を表す時間単位です。 ユーザーマクロとLLDマクロも指定できます。 Default: 365d. Property behavior: - value_type が "numeric float" または "numeric unsigned" に設定されている場合は supported |
| units | string | 値の単位です。 Property behavior: - value_type が "numeric float" または "numeric unsigned" に設定されている場合は supported- 継承オブジェクトでは read-only |
| username | string | 認証用ユーザー名です。 Property behavior: - type が "SSH agent" または "TELNET agent" に設定されている場合、または type が "JMX agent" で password が設定されている場合は required- type が "Simple check", "Database monitor", または "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only( type が "HTTP agent" の場合) |
| uuid | string | インポートしたアイテムプロトタイプを既存のものにリンクするために使用される、汎用一意識別子です。指定されていない場合は自動生成されます。 Property behavior: - アイテムプロトタイプがテンプレートに属する場合は supported |
| valuemapid | ID | 関連付けられた値マップのIDです。 Property behavior: - value_type が "numeric float", "character", または "numeric unsigned" に設定されている場合は supported- 継承オブジェクトでは read-only |
| verify_host | integer | 接続先ホスト名がホストの証明書内のものと一致するかを検証するかどうかです。 可能な値: 0 - (default) 検証しない; 1 - 検証する。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| verify_peer | integer | ホストの証明書が正当であるかを検証するかどうかです。 可能な値: 0 - (default) 検証しない; 1 - 検証する。 Property behavior: - type が "HTTP agent" に設定されている場合は supported- 継承オブジェクトでは read-only |
| discover | integer | アイテムプロトタイプの発見状態です。 可能な値: 0 - (default) 新しいアイテムが発見される; 1 - 新しいアイテムは発見されず、既存のアイテムは失われたものとしてマークされる。 |
HTTPヘッダー
ヘッダーオブジェクトには、以下のプロパティがあります。
HTTPクエリフィールド
クエリフィールドオブジェクトは、URLパラメータを指定するために使用される名前と値を定義します。
このオブジェクトには、以下のプロパティがあります。
アイテムプロトタイプタグ
アイテムプロトタイプタグオブジェクトには、次のプロパティがあります。
| Property | Type | Description |
|---|---|---|
| tag | string | アイテムプロトタイプタグ名。 Property behavior: - required |
| value | string | アイテムプロトタイプタグの値。 |
アイテムプロトタイプの前処理
アイテムプロトタイプの前処理オブジェクトには、次のプロパティがあります。
| Property | Type | Description |
|---|---|---|
| type | integer | 前処理オプションの種類。 可能な値: 1 - カスタム乗数; 2 - 右トリム; 3 - 左トリム; 4 - トリム; 5 - 正規表現; 6 - 真偽値から10進数へ; 7 - 8進数から10進数へ; 8 - 16進数から10進数へ; 9 - 単純な変更; 10 - 1秒あたりの変化量; 11 - XML XPath; 12 - JSONPath; 13 - 範囲内; 14 - 正規表現に一致; 15 - 正規表現に一致しない; 16 - JSONのエラーを確認; 17 - XMLのエラーを確認; 18 - 正規表現を使用してエラーを確認; 19 - 変更なしを破棄; 20 - ハートビート付きで変更なしを破棄; 21 - JavaScript; 22 - Prometheusパターン; 23 - PrometheusからJSONへ; 24 - CSVからJSONへ; 25 - 置換; 26 - サポート対象外を確認; 27 - XMLからJSONへ; 28 - SNMP walk値; 29 - SNMP walkからJSONへ; 30 - SNMP get値. Property behavior: - required |
| params | string | 前処理オプションで使用する追加パラメーター。 複数のパラメーターは改行 (\n) 文字で区切ります。 type が "Check unsupported" に設定されている場合、パラメーターは <scope>[\n<pattern>] 構文に従います。ここで、pattern は正規表現、scope は次のいずれかです:-1 - すべてのエラーに一致; \ 0 - エラーメッセージが pattern に一致するか確認; \ 1 - エラーメッセージが pattern に一致しないか確認. Property behavior: - type が "Custom multiplier" (1), "Right trim" (2), "Left trim" (3), "Trim" (4), "Regular expression" (5), "XML XPath" (11), "JSONPath" (12), "In range" (13), "Matches regular expression" (14), "Does not match regular expression" (15), "Check for error in JSON" (16), "Check for error in XML" (17), "Check for error using regular expression" (18), "Discard unchanged with heartbeat" (20), "JavaScript" (21), "Prometheus pattern" (22), "Prometheus to JSON" (23), "CSV to JSON" (24), "Replace" (25), "Check unsupported" (26), "SNMP walk value" (28), "SNMP walk to JSON" (29), または "SNMP get value" (30) に設定されている場合は required |
| error_handler | integer | 前処理ステップの失敗時に使用するアクションタイプ。 可能な値: 0 - エラーメッセージは Zabbix サーバーによって設定される; 1 - 値を破棄; 2 - カスタム値を設定; 3 - カスタムエラーメッセージを設定. type が "Check unsupported" に設定されている場合の可能な値:1 - 値を破棄; 2 - カスタム値を設定; 3 - カスタムエラーメッセージを設定. Property behavior: - type が "Custom multiplier" (1), "Regular expression" (5), "Boolean to decimal" (6), "Octal to decimal" (7), "Hexadecimal to decimal" (8), "Simple change" (9), "Change per second" (10), "XML XPath" (11), "JSONPath" (12), "In range" (13), "Matches regular expression" (14), "Does not match regular expression" (15), "Check for error in JSON" (16), "Check for error in XML" (17), "Check for error using regular expression" (18), "Prometheus pattern" (22), "Prometheus to JSON" (23), "CSV to JSON" (24), "Check unsupported" (26), "XML to JSON" (27), "SNMP walk value" (28), "SNMP walk to JSON" (29), または "SNMP get value" (30) に設定されている場合は required |
| error_handler_params | string | エラーハンドラーのパラメーター。 Property behavior: - error_handler が "Set custom value" または "Set custom error message" に設定されている場合は required |
次のパラメーターとエラーハンドラーが、各前処理タイプでサポートされています。
| Preprocessing type | Name | Parameter 1 | Parameter 2 | Parameter 3 | Supported error handlers |
|---|---|---|---|---|---|
| 1 | Custom multiplier | number1, 6 | 0, 1, 2, 3 | ||
| 2 | Right trim | list of characters2 | |||
| 3 | Left trim | list of characters2 | |||
| 4 | Trim | list of characters2 | |||
| 5 | Regular expression | pattern3 | output2 | 0, 1, 2, 3 | |
| 6 | Boolean to decimal | 0, 1, 2, 3 | |||
| 7 | Octal to decimal | 0, 1, 2, 3 | |||
| 8 | Hexadecimal to decimal | 0, 1, 2, 3 | |||
| 9 | Simple change | 0, 1, 2, 3 | |||
| 10 | Change per second | 0, 1, 2, 3 | |||
| 11 | XML XPath | path4 | 0, 1, 2, 3 | ||
| 12 | JSONPath | path4 | 0, 1, 2, 3 | ||
| 13 | In range | min1, 6 | max1, 6 | 0, 1, 2, 3 | |
| 14 | Matches regular expression | pattern3 | 0, 1, 2, 3 | ||
| 15 | Does not match regular expression | pattern3 | 0, 1, 2, 3 | ||
| 16 | Check for error in JSON | path4 | 0, 1, 2, 3 | ||
| 17 | Check for error in XML | path4 | 0, 1, 2, 3 | ||
| 18 | Check for error using regular expression | pattern3 | output2 | 0, 1, 2, 3 | |
| 19 | Discard unchanged | ||||
| 20 | Discard unchanged with heartbeat | seconds5, 6 | |||
| 21 | JavaScript | script2 | |||
| 22 | Prometheus pattern | pattern6, 7 | value, label, function |
output8, 9 | 0, 1, 2, 3 |
| 23 | Prometheus to JSON | pattern6, 7 | 0, 1, 2, 3 | ||
| 24 | CSV to JSON | character2 | character2 | 0,1 | 0, 1, 2, 3 |
| 25 | Replace | search string2 | replacement2 | ||
| 26 | Check unsupported | scope1 | pattern3, 6 | 1, 2, 3 | |
| 27 | XML to JSON | 0, 1, 2, 3 | |||
| 28 | SNMP walk value | OID2 | Format: 0 - Unchanged 1 - UTF-8 from Hex-STRING 2 - MAC from Hex-STRING 3 - Integer from BITS |
0, 1, 2, 3 | |
| 29 | SNMP walk to JSON10 | Field name2 | OID prefix2 | Format: 0 - Unchanged 1 - UTF-8 from Hex-STRING 2 - MAC from Hex-STRING 3 - Integer from BITS |
0, 1, 2, 3 |
| 30 | SNMP get value | Format: 1 - UTF-8 from Hex-STRING 2 - MAC from Hex-STRING 3 - Integer from BITS |
0, 1, 2, 3 | ||
1 integer or floating-point number
2 string
3 regular expression
4 JSONPath or XML XPath
5 positive integer (with support of time suffixes, e.g. 30s, 1m, 2h,
1d)
6 user macro, LLD macro
7 Prometheus pattern following the syntax:
<metric name>{<label name>="<label value>", ...} == <value>. Each
Prometheus pattern component (metric, label name, label value and metric
value) can be user macro or LLD macro.
8 Prometheus output following the syntax: <label name> (can be a user macro or an LLD macro) if label is selected as the
second parameter.
9 One of the aggregation functions: sum, min, max, avg, count if function is selected as the second
parameter.
10 Supports multiple "Field name,OID prefix,Format records" records delimited by a new line character.