以下のオブジェクトは、discoveryruleprototype
API に直接関連しています。
The low-level discovery rule prototype object has the following properties.
Property | Type | Description |
---|---|---|
itemid | ID | ID of the LLD rule prototype. Property behavior: - read-only - required for update operations |
ruleid | ID | ID of the parent LLD rule/LLD rule prototype. Property behavior: - read-only - required for create operations |
delay | string | Update interval of the LLD rule prototype. Accepts seconds or time unit with suffix (e.g., 30s, 1m, 2h, 1d) and, optionally, one or more custom intervals, all separated by semicolons. Custom intervals can be a mix of flexible and scheduling intervals. Accepts user macros. If used, the value must be a single macro. Multiple macros or macros mixed with text are not supported. Flexible intervals may be written as two macros separated by a forward slash (e.g., {$FLEX_INTERVAL}/{$FLEX_PERIOD} ).Example: 1h;wd1-5h9-18;{$Macro1}/1-7,00:00-24:00;0/6-7,12:00-24:00;{$Macro2}/{$Macro3} Property behavior: - required if type is set to "Zabbix agent" (0), "Simple check" (3), "Zabbix internal" (5), "External check" (10), "Database monitor" (11), "IPMI agent" (12), "SSH agent" (13), "TELNET agent" (14), "JMX agent" (16), "HTTP agent" (19), "SNMP agent" (20), "Script" (21), "Browser" (22), or if type is set to "Zabbix agent (active)" (7) and key_ does not contain "mqtt.get" |
hostid | ID | ID of the host that the LLD rule prototype belongs to. Property behavior: - constant - required for create operations |
interfaceid | ID | ID of the LLD rule prototype's host interface. Property behavior: - required if LLD rule prototype belongs to host and type is set to "Zabbix agent", "IPMI agent", "JMX agent", or "SNMP agent"- supported if LLD rule prototype belongs to host and type is set to "Simple check", "External check", "SSH agent", "TELNET agent", or "HTTP agent" |
key_ | string | LLD rule prototype key. At least one LLD macro is required. Property behavior: - required for create operations - read-only for inherited objects |
name | string | Name of the LLD rule prototype. Property behavior: - required for create operations - read-only for inherited objects |
type | integer | Type of the LLD rule prototype. Possible values: 0 - Zabbix agent; 2 - Zabbix trapper; 3 - Simple check; 5 - Zabbix internal; 7 - Zabbix agent (active); 10 - External check; 11 - Database monitor; 12 - IPMI agent; 13 - SSH agent; 14 - TELNET agent; 16 - JMX agent; 18 - Dependent item; 19 - HTTP agent; 20 - SNMP agent; 21 - Script; 22 - Browser; 23 - Nested. Property behavior: - required for create operations - read-only for inherited objects |
url | string | URL string. Supports user macros, {HOST.IP}, {HOST.CONN}, {HOST.DNS}, {HOST.HOST}, {HOST.NAME}, {HOST.PORT}, {ITEM.ID}, {ITEM.KEY}. Property behavior: - required if type is set to "HTTP agent"- read-only for inherited objects |
allow_traps | integer | Allow to populate value similarly to the trapper item. Possible values: 0 - (default) Do not allow to accept incoming data; 1 - Allow to accept incoming data. Property behavior: - supported if type is set to "HTTP agent" |
authtype | integer | Authentication method. Possible values if type is set to "SSH agent":0 - (default) password; 1 - public key. Possible values if type is set to "HTTP agent":0 - (default) none; 1 - basic; 2 - NTLM. Property behavior: - supported if type is set to "SSH agent" or "HTTP agent"- read-only for inherited objects (if type is set to "HTTP agent") |
description | string | Description of the LLD rule prototype. |
error | string | Error text if there are problems updating the LLD rule prototype value. Property behavior: - read-only |
follow_redirects | integer | Follow response redirects while polling data. Possible values: 0 - Do not follow redirects; 1 - (default) Follow redirects. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
headers | array | Array of headers that will be sent when performing an HTTP request. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
http_proxy | string | HTTP(S) proxy connection string. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
ipmi_sensor | string | IPMI sensor. Property behavior: - required if type is set to "IPMI agent" and key_ is not set to "ipmi.get"- supported if type is set to "IPMI agent"- read-only for inherited objects |
jmx_endpoint | string | JMX agent custom connection string. Default: service:jmx:rmi:///jndi/rmi://{HOST.CONN}:{HOST.PORT}/jmxrmi Property behavior: - supported if type is set to "JMX agent" |
lifetime | string | Time period after which items that are no longer discovered will be deleted. Accepts seconds, time unit with suffix, or a user macro. Default: 7d . |
lifetime_type | integer | Scenario to delete lost LLD resources. Possible values: 0 - (default) Delete after lifetime threshold is reached; 1 - Do not delete; 2 - Delete immediately. |
enabled_lifetime | string | Time period after which items that are no longer discovered will be disabled. Accepts seconds, time unit with suffix, or a user macro. Default: 0 . |
enabled_lifetime_type | integer | Scenario to disable lost LLD resources. Possible values: 0 - Disable after lifetime threshold is reached; 1 - Do not disable; 2 - (default) Disable immediately. |
master_itemid | ID | ID of the master item. Discovery rule cannot be master item for another discovery rule. Property behavior: - required if type is set to "Dependent item"- read-only for inherited objects |
output_format | integer | Should the response be converted to JSON. Possible values: 0 - (default) Store raw; 1 - Convert to JSON. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
params | string | Additional parameters depending on the type of the LLD rule prototype: - executed script for SSH and Telnet LLD rules; - SQL query for database monitor LLD rules; - formula for calculated LLD rules; - the script for script and browser LLD rules. Property behavior: - required if type is set to "Database monitor", "SSH agent", "TELNET agent", "Script" or "Browser"- read-only for inherited objects (if type is set to "Script" or "Browser") |
parameters | object/array | Additional parameters if type is set to "Script" or "Browser".Array of objects with name and value properties, where name must be unique.Property behavior: - supported if type is set to "Script" or "Browser"- read-only for inherited objects |
password | string | Password for authentication. Property behavior: - required if type is set to "JMX agent" and username is set- supported if type is set to "Simple check", "Database monitor", "SSH agent", "TELNET agent", or "HTTP agent"- read-only for inherited objects (if type is set to "HTTP agent") |
post_type | integer | Type of post data body stored in posts property.Possible values: 0 - (default) Raw data; 2 - JSON data; 3 - XML data. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
posts | string | HTTP(S) request body data. Property behavior: - required if type is set to "HTTP agent" and post_type is set to "JSON data" or "XML data"- supported if type is set to "HTTP agent" and post_type is set to "Raw data"- read-only for inherited objects |
privatekey | string | Name of the private key file. Property behavior: - required if type is set to "SSH agent" and authtype is set to "public key" |
publickey | string | Name of the public key file. Property behavior: - required if type is set to "SSH agent" and authtype is set to "public key" |
query_fields | array | Array of query fields that will be sent when performing an HTTP request. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
request_method | integer | Type of request method. Possible values: 0 - (default) GET; 1 - POST; 2 - PUT; 3 - HEAD. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
retrieve_mode | integer | What part of response should be stored. Possible values if request_method is set to "GET", "POST", or "PUT":0 - (default) Body; 1 - Headers; 2 - Both body and headers will be stored. Possible values if request_method is set to "HEAD":1 - Headers. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
snmp_oid | string | SNMP OID. Property behavior: - required if type is set to "SNMP agent"- read-only for inherited objects |
ssl_cert_file | string | Public SSL Key file path. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
ssl_key_file | string | Private SSL Key file path. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
ssl_key_password | string | Password for SSL Key file. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
state | integer | State of the LLD rule prototype. Possible values: 0 - (default) normal; 1 - not supported. Property behavior: - read-only |
status | integer | Status of the LLD rule prototype. Possible values: 0 - (default) enabled LLD rule prototype; 1 - disabled LLD rule prototype. |
status_codes | string | Ranges of required HTTP status codes, separated by commas. Also supports user macros as part of comma separated list. Example: 200,200-{$M},{$M},200-400 Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
templateid | ID | ID of the parent template LLD rule prototype. Property behavior: - read-only |
timeout | string | Item data polling request timeout. Accepts seconds or time unit with suffix (e.g., 30s, 1m). Also accepts user macros. Possible values range: 1-600s. Default: "" - use proxy/global settings. Property behavior: - supported if type is set to "Zabbix agent" (0), "Simple check" (3) and key_ does not start with "vmware. " and "icmpping ", "Zabbix agent (active)" (7), "External check" (10), "Database monitor" (11), "SSH agent" (13), "TELNET agent" (14), "HTTP agent" (19), "SNMP agent" (20) and snmp_oid starts with "walk[ " or "get[ ", "Script" (21), "Browser" (22)- read-only for inherited objects |
trapper_hosts | string | Allowed hosts. Property behavior: - supported if type is set to "Zabbix trapper", or if type is set to "HTTP agent" and allow_traps is set to "Allow to accept incoming data" |
username | string | Username for authentication. Property behavior: - required if type is set to "SSH agent", "TELNET agent", or if type is set to "JMX agent" and password is set- supported if type is set to "Simple check", "Database monitor", or "HTTP agent"- read-only for inherited objects (if type is set to "HTTP agent") |
uuid | string | Universal unique identifier, used for linking imported LLD rule prototypes to already existing ones. Auto-generated, if not given. Property behavior: - supported if the LLD rule prototype belongs to a template |
verify_host | integer | Whether to validate that the host name for the connection matches the one in the host's certificate. Possible values: 0 - (default) Do not validate; 1 - Validate. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
verify_peer | integer | Whether to validate that the host's certificate is authentic. Possible values: 0 - (default) Do not validate; 1 - Validate. Property behavior: - supported if type is set to "HTTP agent"- read-only for inherited objects |
ヘッダーオブジェクトには以下のプロパティがあります。
クエリフィールドオブジェクトは、URL パラメータを指定するために使用される名前と値を定義します。 以下のプロパティがあります。
LLD ルール プロトタイプ フィルター オブジェクトは、検出されたオブジェクトをフィルター処理するために使用できる条件のセットを定義します。以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
条件 | オブジェクト/配列 | 結果をフィルター処理するために使用する フィルター条件 のセット。条件は、数式内の配置順に並べ替えられます。 プロパティの動作: - 必須 |
evaltype | 整数 | フィルター条件の評価方法。 有効な値: 0 - かつ/または 1 - かつ 2 - または 3 - カスタム式。 プロパティの動作: - 必須 |
eval_formula | 文字列 | フィルター条件の評価に使用される生成された式。この式には、formulaid によって特定のフィルター条件を参照する ID が含まれます。カスタム式が指定されたフィルターの場合、eval_formula の値は formula の値と同じです。プロパティの動作: - 読み取り専用 |
formula | 文字列 | カスタム式が指定されたフィルターの条件を評価するために使用されるユーザー定義の式。式には、formulaid によって特定のフィルター条件を参照する ID が含まれている必要があります。式で使用される ID は、フィルター条件で定義されている ID と完全に一致する必要があります。条件を未使用のままにしたり省略したりすることはできません。プロパティの動作: - evaltype が「カスタム式」に設定されている場合、必須 |
LLD ルール プロトタイプ フィルタ条件オブジェクトは、LLD マクロの値に対して実行する個別のチェックを定義します。以下のプロパティがあります。
プロパティ | タイプ |
---|---|
マクロ | 文字列 |
値 | 文字列 |
formulaid | 文字列 |
operator | 整数 |
さまざまな種類の式でフィルターを使用する方法をより深く理解するには、 discoveryruleprototype.get メソッドと discoveryruleprototype.create メソッドのページにある例をご覧ください。
LLD マクロパスには以下のプロパティがあります。
The LLD rule prototype preprocessing object has the following properties.
Property | Type | Description |
---|---|---|
type | integer | The preprocessing option type. Possible values: 5 - Regular expression; 11 - XML XPath; 12 - JSONPath; 14 - Matches regular expression; 15 - Does not match regular expression; 16 - Check for error in JSON; 17 - Check for error in XML; 20 - Discard unchanged with heartbeat; 21 - JavaScript; 23 - Prometheus to JSON; 24 - CSV to JSON; 25 - Replace; 27 - XML to JSON; 28 - SNMP walk value; 29 - SNMP walk to JSON; 30 - SNMP get value. Property behavior: - required |
params | string | Additional parameters used by preprocessing option. Multiple parameters are separated by the newline (\n) character. Property behavior: - required if type is set to "Regular expression" (5), "XML XPath" (11), "JSONPath" (12), "Matches regular expression" (14), "Does not match regular expression" (15), "Check for error in JSON" (16), "Check for error in XML" (17), "Discard unchanged with heartbeat" (20), "JavaScript" (21), "Prometheus to JSON" (23), "CSV to JSON" (24), "Replace" (25), "SNMP walk value" (28), "SNMP walk to JSON" (29), or "SNMP get value" (30) |
error_handler | integer | Action type used in case of preprocessing step failure. Possible values: 0 - Error message is set by Zabbix server; 1 - Discard value; 2 - Set custom value; 3 - Set custom error message. Property behavior: - required if type is set to "Regular expression" (5), "XML XPath" (11), "JSONPath" (12), "Matches regular expression" (14), "Does not match regular expression" (15), "Check for error in JSON" (16), "Check for error in XML" (17), "Prometheus to JSON" (23), "CSV to JSON" (24), "XML to JSON" (27), "SNMP walk value" (28), "SNMP walk to JSON" (29), or "SNMP get value" (30) |
error_handler_params | string | Error handler parameters. Property behavior: - required if error_handler is set to "Set custom value" or "Set custom error message" |
The following parameters and error handlers are supported for each preprocessing type.
Preprocessing type | Name | Parameter 1 | Parameter 2 | Parameter 3 | Supported error handlers |
---|---|---|---|---|---|
5 | Regular expression | pattern1 | output2 | 0, 1, 2, 3 | |
11 | XML XPath | path3 | 0, 1, 2, 3 | ||
12 | JSONPath | path3 | 0, 1, 2, 3 | ||
14 | Matches regular expression | pattern1 | 0, 1, 2, 3 | ||
15 | Does not match regular expression | pattern1 | 0, 1, 2, 3 | ||
16 | Check for error in JSON | path3 | 0, 1, 2, 3 | ||
17 | Check for error in XML | path3 | 0, 1, 2, 3 | ||
20 | Discard unchanged with heartbeat | seconds4, 5 | |||
21 | JavaScript | script2 | |||
23 | Prometheus to JSON | pattern5, 6 | 0, 1, 2, 3 | ||
24 | CSV to JSON | character2 | character2 | 0,1 | 0, 1, 2, 3 |
25 | Replace | search string2 | replacement2 | ||
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 JSON7 | 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 regular expression
2 string
3 JSONPath or XML XPath
4 positive integer (with support of time suffixes, e.g. 30s, 1m, 2h, 1d)
5 user macro
6 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.
7 Supports multiple "Field name,OID prefix,Format records" records delimited by a new line character.
LLD ルールプロトタイプオーバーライドオブジェクトは、異なるプロトタイプ オブジェクトのプロパティをオーバーライドするために使用される一連のルール(フィルター、条件、操作)を定義します。以下のプロパティがあります。
プロパティ | タイプ |
---|---|
name | 文字列 |
step | 整数 |
stop | 整数 |
filter | オブジェクト |
operations | オブジェクト/配列 |
LLD ルールプロトタイプオーバーライドフィルターオブジェクトは、検出されたオブジェクトと一致する場合にオーバーライドを適用する条件セットを定義します。以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
条件 | オブジェクト/配列 | 検出されたオブジェクトのマッチングに使用する オーバーライドフィルター条件 のセット。条件は、数式内の配置順に並べ替えられます。 プロパティの動作: - 必須 |
evaltype | 整数 | オーバーライドフィルタ条件の評価方法 可能な値: 0 - かつ/または 1 - かつ 2 - または 3 - カスタム式。 プロパティの動作: - 必須 |
eval_formula | 文字列 | オーバーライドフィルタ条件の評価に使用される生成された式。式には、formulaid によって特定のオーバーライドフィルタ条件を参照する ID が含まれます。カスタム式を持つフィルタの場合、eval_formula の値は formula の値と同じです。プロパティの動作: - 読み取り専用 |
formula | 文字列 | カスタム式を持つオーバーライドフィルタの条件を評価するために使用されるユーザー定義式。式には、formulaid によって特定のオーバーライドフィルタ条件を参照する ID が含まれている必要があります。式で使用される ID は、オーバーライドフィルタ条件で定義されている ID と完全に一致する必要があります。条件を未使用のままにしたり省略したりすることはできません。プロパティの動作: - evaltype が "custom expression" に設定されている場合、必須 |
LLD ルール プロトタイプ オーバーライド フィルタ条件オブジェクトは、LLD マクロの値に対して実行する個別のチェックを定義します。以下のプロパティがあります。
プロパティ | タイプ |
---|---|
マクロ | 文字列 |
値 | 文字列 |
formulaid | 文字列 |
operator | 整数 |
LLD ルールのプロトタイプオーバーライド操作は、プロトタイプオブジェクトに対して実行する条件とアクションの組み合わせです。以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
操作オブジェクト | 整数 | アクションを実行する検出オブジェクトのタイプ。 有効な値: 0 - アイテムプロトタイプ。 1 - トリガープロトタイプ。 2 - グラフプロトタイプ。 3 - ホストプロトタイプ。 プロパティの動作: - 必須 |
operator | integer | 条件演算子をオーバーライドします。 可能な値: 0 - (デフォルト) 等しい; 1 - 等しくない; 2 - 含む; 3 - 含まない; 8 - 一致する; 9 - 一致しない。 |
value | string | 選択したオブジェクトに応じて、アイテム、トリガー、グラフ、またはホストプロトタイプ名に一致するパターン。 |
opstatus | object | アイテム、トリガー、およびホストプロトタイプオブジェクトの操作ステータスオブジェクトをオーバーライドします。 |
opdiscover | object | 操作検出ステータスオブジェクトをオーバーライドします(すべてのオブジェクトタイプ)。 |
opperiod | object | アイテムプロトタイプオブジェクトの操作期間(更新間隔)オブジェクトをオーバーライドします。 |
ophistory | object | アイテムプロトタイプオブジェクトの操作履歴オブジェクトをオーバーライドします。 |
optrends | object | アイテムプロトタイプオブジェクトの操作トレンドオブジェクトをオーバーライドします。 |
opseverity | object | トリガープロトタイプオブジェクトの操作重大度オブジェクトをオーバーライドします。 |
optag | object/array | トリガーおよびホストプロトタイプオブジェクトの操作タグオブジェクトをオーバーライドします。 |
optemplate | object/array | ホストプロトタイプオブジェクトの操作テンプレートオブジェクトをオーバーライドします。 |
opinventory | object | ホストプロトタイプオブジェクトの操作インベントリオブジェクトをオーバーライドします。 |
検出されたオブジェクトに設定されるLLDルールプロトタイプのオーバーライド操作ステータス。以下のプロパティがあります。
LLDルールのプロトタイプオーバーライド操作 ディスカバリ は、検出済みオブジェクトに設定されたステータスです。以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
discover | 整数 | 選択したオブジェクトの検出ステータスをオーバーライドします。 有効な値: 0 - はい、オブジェクトの検出を続行します。 1 - いいえ、新しいオブジェクトは検出されず、既存のオブジェクトは失われたものとしてマークされます。 プロパティの動作: - 必須 |
LLDルールプロトタイプのオーバーライド操作期間は、検出されたアイテムに設定される更新間隔の値です。 以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
delay | 文字列 | アイテムプロトタイプの更新間隔をオーバーライドします。 秒またはサフィックス付きの時間単位(例:30s、1m、2h、1d)を指定できます。また、オプションで1つ以上のカスタム間隔をセミコロンで区切って指定できます。カスタム間隔は、フレキシブル間隔とスケジュール間隔を組み合わせることができます。 ユーザーマクロまたは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} プロパティの動作: - 必須 |
LLDルールプロトタイプは、検出されたアイテムに設定される操作履歴値を上書きします。以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
history | 文字列 | アイテムプロトタイプの履歴を上書きします。これは、履歴データを保存する期間の単位です。ユーザーマクロとLLDマクロも使用できます。 プロパティの動作: - 必須 |
LLDルールプロトタイプの上書き操作のトレンド は、検出されたアイテムに設定されます。 以下のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
トレンド | 文字列 | アイテムプロトタイプのトレンドを上書きします。トレンドは、トレンドデータを保存する期間の単位です。ユーザーマクロとLLDマクロも使用できます。 プロパティの動作: - 必須 |
LLDルールは、検出されたトリガーに設定されているオペレーションの深刻度の値を上書きします。 次のプロパティがあります。
プロパティ | タイプ | 説明 |
---|---|---|
severity (必須) |
integer | トリガープロトタイプの重大度を上書きします。 可能な値は次のとおりです:0 - (デフォルト)未分類 1 - 情報 2 - 警告 3 - 軽度の障害<br >4 - 重度の障害 5 - 致命的な障害 |
LLDルールプロトタイプ上書き操作タグオブジェクトには、検出されたオブジェクトに設定されるタグ名と値が含まれます。以下のプロパティがあります。
検出されたホストにリンクされた LLD ルール プロトタイプ 上書き操作テンプレート オブジェクト。以下のプロパティがあります。
検出されたホストに設定される、LLDルールプロトタイプ上書き操作インベントリモードの値。以下のプロパティがあります。