サーバー-プロキシデータ交換プロトコル
サーバー - プロキシ間のデータ交換は JSON 形式に基づいています。
リクエストおよびレスポンスメッセージは、header and data length で始まる必要があります。
パッシブプロキシ
Configuration request
The server will first send an empty proxy config request.
This request is sent every ProxyConfigFrequency (server configuration parameter) seconds.
The proxy responds with the current proxy version, session token and configuration revision. The server responds with the configuration data that need to be updated.
| name | value type | description | ||||
|---|---|---|---|---|---|---|
| server→proxy: | ||||||
| request | string | 'proxy config' | ||||
| proxy→server: | ||||||
| version | string | Proxy version (<major>.<minor>.<build>). | ||||
| session | string | Proxy configuration session token. | ||||
| config_revision | number | Proxy configuration revision. | ||||
| server→proxy: | ||||||
| full_sync | number | 1 - if full configuration data is sent; absent otherwise (optional). | ||||
| data | array | Object of table data. Absent if configuration has not been changed (optional). | ||||
| <table> | object | One or more objects with <table> data (optional, depending on changes). | ||||
| fields | array | Array of field names. | ||||
| - | string | Field name. | ||||
| data | array | Array of rows. | ||||
| - | array | Array of columns. | ||||
| - | string,number | Column value with type depending on column type in database schema. | ||||
| macro.secrets | object | Secret macro information, absent if there are no changes in vault macros (optional). | ||||
| config_revision | number | Configuration cache revision - sent with configuration data (optional). | ||||
| del_hostids | array | Array of removed hostids (optional). | ||||
| - | number | Host identifier. | ||||
| del_macro_hostids | array | Array of hostids with all macros removed (optional). | ||||
| - | number | Host identifier. | ||||
| proxy→server: | ||||||
| response | string | Request success information ('success' or 'failed'). | ||||
| version | string | Proxy version (<major>.<minor>.<build>). | ||||
Example:
server→proxy:
{
"request":"proxy config"
}
proxy→server:
{
"version": "8.0.0",
"session": "0033124949800811e5686dbfd9bcea98",
"config_revision": 0
}
server→proxy:
{
"full_sync": 1,
"data": {
"hosts": {
"fields": ["hostid", "host", "status", "ipmi_authtype", "ipmi_privilege", "ipmi_username", "ipmi_password", "name", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "tls_psk_identity", "tls_psk"],
"data": [
[10084, "Zabbix server", 0, -1, 2, "", "", "Zabbix server", 1, 1, "", "", "", ""]
]
},
"interface": {
"fields": ["interfaceid", "hostid", "main", "type", "useip", "ip", "dns", "port", "available"],
"data": [
[1, 10084, 1, 1, 1, "127.0.0.1", "", "10053", 1]
]
},
"interface_snmp": {
"fields": ["interfaceid", "version", "bulk", "community", "securityname", "securitylevel", "authpassphrase", "privpassphrase", "authprotocol", "privprotocol", "contextname"],
"data": []
},
"host_inventory": {
"fields": ["hostid", "type", "type_full", "name", "alias", "os", "os_full", "os_short", "serialno_a", "serialno_b", "tag", "asset_tag", "macaddress_a", "macaddress_b", "hardware", "hardware_full", "software", "software_full", "software_app_a", "software_app_b", "software_app_c", "software_app_d", "software_app_e", "contact", "location", "location_lat", "location_lon", "notes", "chassis", "model", "hw_arch", "vendor", "contract_number", "installer_name", "deployment_status", "url_a", "url_b", "url_c", "host_networks", "host_netmask", "host_router", "oob_ip", "oob_netmask", "oob_router", "date_hw_purchase", "date_hw_install", "date_hw_expiry", "date_hw_decomm", "site_address_a", "site_address_b", "site_address_c", "site_city", "site_state", "site_country", "site_zip", "site_rack", "site_notes", "poc_1_name", "poc_1_email", "poc_1_phone_a", "poc_1_phone_b", "poc_1_cell", "poc_1_screen", "poc_1_notes", "poc_2_name", "poc_2_email", "poc_2_phone_a", "poc_2_phone_b", "poc_2_cell", "poc_2_screen", "poc_2_notes"],
"data": [
[10084, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "56.95387", "24.22067", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
]
},
"items": {
"fields": ["itemid", "type", "snmp_oid", "hostid", "key_", "delay", "history", "status", "value_type", "trapper_hosts", "logtimefmt", "params", "ipmi_sensor", "authtype", "username", "password", "publickey", "privatekey", "flags", "interfaceid", "inventory_link", "jmx_endpoint", "master_itemid", "timeout", "url", "query_fields", "posts", "status_codes", "follow_redirects", "post_type", "http_proxy", "headers", "retrieve_mode", "request_method", "output_format", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host", "allow_traps"],
"data": [
[44161, 7, "", 10084, "agent.hostmetadata", "10s", "90d", 0, 1, "", "", "", "", 0, "", "", "", "", 0, null, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0],
[44162, 0, "", 10084, "agent.ping", "10s", "90d", 0, 3, "", "", "", "", 0, "", "", "", "", 0, 1, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0]
]
},
"item_rtdata": {
"fields": ["itemid", "lastlogsize", "mtime"],
"data": [
[44161, 0, 0],
[44162, 0, 0]
]
},
"item_preproc": {
"fields": ["item_preprocid", "itemid", "step", "type", "params", "error_handler", "error_handler_params"],
"data": []
},
"item_parameter": {
"fields": ["item_parameterid", "itemid", "name", "value"],
"data": []
},
"globalmacro": {
"fields": ["globalmacroid", "macro", "value", "type"],
"data": [
[2, "{$SNMP_COMMUNITY}", "public", 0]
]
},
"hosts_templates": {
"fields": ["hosttemplateid", "hostid", "templateid", "link_type"],
"data": []
},
"hostmacro": {
"fields": ["hostmacroid", "hostid", "macro", "value", "type", "automatic"],
"data": [
[5676, 10084, "{$M}", "AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix:Content", 2, 0]
]
},
"drules": {
"fields": ["druleid", "name", "iprange", "delay"],
"data": [
[2, "Local network", "127.0.0.1", "10s"]
]
},
"dchecks": {
"fields": ["dcheckid", "druleid", "type", "key_", "snmp_community", "ports", "snmpv3_securityname", "snmpv3_securitylevel", "snmpv3_authpassphrase", "snmpv3_privpassphrase", "uniq", "snmpv3_authprotocol", "snmpv3_privprotocol", "snmpv3_contextname", "host_source", "name_source"],
"data": [
[2, 2, 9, "system.uname", "", "10052", "", 0, "", "", 0, 0, 0, "", 1, 0]
]
},
"regexps": {
"fields": ["regexpid", "name"],
"data": [
[1, "File systems for discovery"],
[2, "Network interfaces for discovery"],
[3, "Storage devices for SNMP discovery"],
[4, "Windows service names for discovery"],
[5, "Windows service startup states for discovery"]
]
},
"expressions": {
"fields": ["expressionid", "regexpid", "expression", "expression_type", "exp_delimiter", "case_sensitive"],
"data": [
[1, 1, "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$", 3, ",", 0],
[3, 3, "^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$", 4, ",", 1],
[5, 4, "^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50727_32|clr_optimization_v4.0.30319_32)$", 4, ",", 1],
[6, 5, "^(automatic|automatic delayed)$", 3, ",", 1],
[7, 2, "^Software Loopback Interface", 4, ",", 1],
[8, 2, "^(In)?[Ll]oop[Bb]ack[0-9._]*$", 4, ",", 1],
[9, 2, "^NULL[0-9.]*$", 4, ",", 1],
[10, 2, "^[Ll]o[0-9.]*$", 4, ",", 1],
[11, 2, "^[Ss]ystem$", 4, ",", 1],
[12, 2, "^Nu[0-9.]*$", 4, ",", 1]
]
},
"settings": {
"fields": ["name", "type", "value_str", "value_int"],
"data": [
["autoreg_tls_accept", 2, "", 1],
["hk_history_global", 2, "", 0],
["snmptrap_logging", 2, "", 1],
["proxy_secrets_provider", 2, "", 0],
["hk_history", 1, "31d", 0],
["timeout_db_monitor", 1, "3s", 0],
["timeout_external_check", 1, "3s", 0],
["timeout_http_agent", 1, "3s", 0],
["timeout_simple_check", 1, "3s", 0],
["timeout_snmp_agent", 1, "3s", 0],
["timeout_ssh_agent", 1, "3s", 0],
["timeout_telnet_agent", 1, "3s", 0],
["timeout_zabbix_agent", 1, "3s", 0],
["timeout_browser", 1, "30s", 0]
]
},
"httptest": {
"fields": ["httptestid", "name", "delay", "agent", "authentication", "http_user", "http_password", "hostid", "http_proxy", "retries", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host"],
"data": []
},
"httptestitem": {
"fields": ["httptestitemid", "httptestid", "itemid", "type"],
"data": []
},
"httptest_field": {
"fields": ["httptest_fieldid", "httptestid", "type", "name", "value"],
"data": []
},
"httpstep": {
"fields": ["httpstepid", "httptestid", "name", "no", "url", "timeout", "posts", "required", "status_codes", "follow_redirects", "retrieve_mode", "post_type"],
"data": []
},
"httpstepitem": {
"fields": ["httpstepitemid", "httpstepid", "itemid", "type"],
"data": []
},
"httpstep_field": {
"fields": ["httpstep_fieldid", "httpstepid", "type", "name", "value"],
"data": []
},
"config_autoreg_tls": {
"fields": ["autoreg_tlsid", "tls_psk_identity", "tls_psk"],
"data": [
[1, "", ""]
]
}
},
"macro.secrets": {
"AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix": {
"Content": "738"
}
},
"config_revision": 2
}
proxy→server:
{
"response": "success",
"version": "8.0.0"
}
データ要求
proxy data 要求は、ホストインターフェースの可用性、履歴データ、ディスカバリデータ、および自動登録データをプロキシから取得するために使用されます。この要求は、ProxyDataFrequency(サーバー設定パラメータ)秒ごとに送信されます。
| name | value type | description | |
|---|---|---|---|
| server→proxy: | |||
| request | string | 'proxy data' | |
| proxy→server: | |||
| session | string | データセッショントークン。 | |
| interface availability | array | (optional) インターフェース可用性データオブジェクトの配列。 | |
| interfaceid | number | インターフェース識別子。 | |
| available | number | インターフェースの可用性: 0, INTERFACE_AVAILABLE_UNKNOWN - 不明 1, INTERFACE_AVAILABLE_TRUE - 利用可能 2, INTERFACE_AVAILABLE_FALSE - 利用不可 |
|
| error | string | インターフェースのエラーメッセージ、または空文字列。 | |
| history data | array | (optional) 履歴データオブジェクトの配列。 | |
| itemid | number | アイテム識別子。 | |
| clock | number | アイテム値のタイムスタンプ(秒)。 | |
| ns | number | アイテム値のタイムスタンプ(ナノ秒)。 | |
| value | string | (optional) アイテム値。 | |
| id | number | 値の識別子(昇順のカウンター、1つのデータセッション内で一意)。 | |
| timestamp | number | (optional) ログタイプアイテムのタイムスタンプ。 | |
| source | string | (optional) Eventlogアイテムのsource値。 | |
| severity | number | (optional) Eventlogアイテムのseverity値。 | |
| eventid | number | (optional) Eventlogアイテムのeventid値。 | |
| state | string | (optional) アイテムの状態: 0, ITEM_STATE_NORMAL 1, ITEM_STATE_NOTSUPPORTED |
|
| lastlogsize | number | (optional) ログタイプアイテムの最終ログサイズ。 | |
| mtime | number | (optional) ログタイプアイテムの更新時刻。 | |
| discovery data | array | (optional) ディスカバリデータオブジェクトの配列。 | |
| clock | number | ディスカバリデータのタイムスタンプ。 | |
| druleid | number | ディスカバリルール識別子。 | |
| dcheckid | number | ディスカバリチェック識別子、またはディスカバリルールデータの場合は null。 | |
| type | number | ディスカバリチェックの種類: -1 ディスカバリルールデータ 0, SVC_SSH - SSHサービスチェック 1, SVC_LDAP - LDAPサービスチェック 2, SVC_SMTP - SMTPサービスチェック 3, SVC_FTP - FTPサービスチェック 4, SVC_HTTP - HTTPサービスチェック 5, SVC_POP - POPサービスチェック 6, SVC_NNTP - NNTPサービスチェック 7, SVC_IMAP - IMAPサービスチェック 8, SVC_TCP - TCPポート可用性チェック 9, SVC_AGENT - Zabbix エージェント 10, SVC_SNMPv1 - SNMPv1 エージェント 11, SVC_SNMPv2 - SNMPv2 エージェント 12, SVC_ICMPPING - ICMP ping 13, SVC_SNMPv3 - SNMPv3 エージェント 14, SVC_HTTPS - HTTPSサービスチェック 15, SVC_TELNET - Telnet可用性チェック |
|
| ip | string | ホストのIPアドレス。 | |
| dns | string | ホストのDNS名。 | |
| port | number | (optional) サービスポート番号。 | |
| key_ | string | (optional) 種類 9 SVC_AGENT のディスカバリチェック用アイテムキー | |
| value | string | (optional) サービスから受信した値。ほとんどのサービスでは空にできます。 | |
| status | number | (optional) サービスの状態: 0, DOBJECT_STATUS_UP - サービス稼働中 1, DOBJECT_STATUS_DOWN - サービス停止中 |
|
| auto registration | array | (optional) 自動登録データオブジェクトの配列。 | |
| clock | number | 自動登録データのタイムスタンプ。 | |
| host | string | ホスト名。 | |
| ip | string | (optional) ホストのIPアドレス。 | |
| dns | string | (optional) IPアドレスから解決されたDNS名。 | |
| port | string | (optional) ホストのポート。 | |
| host_metadata | string | (optional) エージェントが送信したホストメタデータ(エージェント設定パラメータ HostMetadata または HostMetadataItem に基づく)。 | |
| tasks | array | (optional) タスクの配列。 | |
| type | number | タスクの種類: 0, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND_RESULT - リモートコマンド結果 |
|
| status | number | リモートコマンドの実行状態: 0, ZBX_TM_REMOTE_COMMAND_COMPLETED - リモートコマンドは正常に完了 1, ZBX_TM_REMOTE_COMMAND_FAILED - リモートコマンドは失敗 |
|
| error | string | (optional) エラーメッセージ。 | |
| parent_taskid | number | 親タスクID。 | |
| more | number | (optional) 1 - 送信すべき履歴データがさらにある。 | |
| clock | number | (optional) データ転送のタイムスタンプ(秒)。 | |
| ns | number | (optional) データ転送のタイムスタンプ(ナノ秒)。 | |
| version | string | プロキシのバージョン(<major>.<minor>.<build>)。 | |
| server→proxy: | |||
| response | string | 要求成功情報('success' または 'failed')。 | |
| tasks | array | (optional) タスクの配列。 | |
| type | number | タスクの種類: 1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - リモートコマンド |
|
| clock | number | タスク作成時刻。 | |
| ttl | number | タスクの有効期限(秒)。 | |
| commandtype | number | リモートコマンドの種類: 0, ZBX_SCRIPT_TYPE_CUSTOM_SCRIPT - カスタムスクリプトを使用 1, ZBX_SCRIPT_TYPE_IPMI - IPMIを使用 2, ZBX_SCRIPT_TYPE_SSH - SSHを使用 3, ZBX_SCRIPT_TYPE_TELNET - Telnetを使用 4, ZBX_SCRIPT_TYPE_GLOBAL_SCRIPT - グローバルスクリプトを使用(現在は機能的にカスタムスクリプトと同等) |
|
| command | string | 実行するリモートコマンド。 | |
| execute_on | number | カスタムスクリプトの実行先: 0, ZBX_SCRIPT_EXECUTE_ON_AGENT - エージェント上でスクリプトを実行 1, ZBX_SCRIPT_EXECUTE_ON_SERVER - サーバー上でスクリプトを実行 2, ZBX_SCRIPT_EXECUTE_ON_PROXY - プロキシ上でスクリプトを実行 |
|
| port | number | (optional) TelnetおよびSSHコマンド用のポート。 | |
| authtype | number | (optional) SSHコマンドの認証方式。 | |
| username | string | (optional) TelnetおよびSSHコマンドのユーザー名。 | |
| password | string | (optional) TelnetおよびSSHコマンドのパスワード。 | |
| publickey | string | (optional) SSHコマンドの公開鍵。 | |
| privatekey | string | (optional) SSHコマンドの秘密鍵。 | |
| parent_taskid | number | 親タスクID。 | |
| hostid | number | 対象ホストID。 | |
例:
server→proxy:
{
"request": "proxy data"
}
proxy→server:
{
"session": "12345678901234567890123456789012"
"interface availability": [
{
"interfaceid": 1,
"available": 1,
"error": ""
},
{
"interfaceid": 2,
"available": 2,
"error": "Get value from agent failed: cannot connect to [[127.0.0.1]:10049]: [111] Connection refused"
},
{
"interfaceid": 3,
"available": 1,
"error": ""
},
{
"interfaceid": 4,
"available": 1,
"error": ""
}
],
"history data":[
{
"itemid":"12345",
"clock":1478609647,
"ns":332510044,
"value":"52956612",
"id": 1
},
{
"itemid":"12346",
"clock":1478609647,
"ns":330690279,
"state":1,
"value":"Cannot find information for this network interface in /proc/net/dev.",
"id": 2
}
],
"discovery data":[
{
"clock":1478608764,
"drule":2,
"dcheck":3,
"type":12,
"ip":"10.3.0.10",
"dns":"vdebian",
"status":1
},
{
"clock":1478608764,
"drule":2,
"dcheck":null,
"type":-1,
"ip":"10.3.0.10",
"dns":"vdebian",
"status":1
}
],
"auto registration":[
{
"clock":1478608371,
"host":"Logger1",
"ip":"10.3.0.1",
"dns":"localhost",
"port":"10050"
},
{
"clock":1478608381,
"host":"Logger2",
"ip":"10.3.0.2",
"dns":"localhost",
"port":"10050"
}
],
"tasks":[
{
"type": 0,
"status": 0,
"parent_taskid": 10
},
{
"type": 0,
"status": 1,
"error": "No permissions to execute task.",
"parent_taskid": 20
}
],
"version":"8.0.0"
}
server→proxy:
{
"response": "success",
"tasks":[
{
"type": 1,
"clock": 1478608371,
"ttl": 600,
"commandtype": 2,
"command": "restart_service1.sh",
"execute_on": 2,
"port": 80,
"authtype": 0,
"username": "userA",
"password": "password1",
"publickey": "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe",
"privatekey": "lsuusFncCzWBQ7RKNUSesmQRMSGkVb1/3j+skZ6UtW+5u09lHNsj6tQ5QCqGKukO1De7zhd",
"parent_taskid": 10,
"hostid": 10070
},
{
"type": 1,
"clock": 1478608381,
"ttl": 600,
"commandtype": 1,
"command": "restart_service2.sh",
"execute_on": 0,
"authtype": 0,
"username": "",
"password": "",
"publickey": "",
"privatekey": "",
"parent_taskid": 20,
"hostid": 10084
}
]
}
タスク要求
proxy tasks の交換は、サーバーとパッシブプロキシ間でリモートコマンドタスクの配信と受領確認を行います。サーバーがタスク結果を取得するためにプロキシをポーリングすると、ProxyDataFrequency で定義された間隔で空の proxy tasks 要求を送信します。プロキシは、現在のバージョンと保留中のタスク結果(タイムスタンプを含む)を返します。サーバーはその後、response を返して受信を確認し、プロキシが実行する新しいタスクを含めることもできます。
| name | value type | description | |
|---|---|---|---|
| server→proxy: | |||
| request | string | 'proxy tasks' | |
| proxy→server: | |||
| version | string | プロキシのバージョン (<major>.<minor>.<build>). | |
| clock | number | (optional) データ転送タイムスタンプ(秒)。 | |
| ns | number | (optional) データ転送タイムスタンプ(ナノ秒)。 | |
| server→proxy: | |||
| response | string | 要求成功情報('success' または 'failed')。 | |
例:
server→proxy:
{
"request":"proxy tasks"
}
proxy→server:
{
"version":"7.0.0",
"clock":1721059872,
"ns":848141522
}
server→proxy:
{
"response":"success"
}
アクティブプロキシ
設定リクエスト
proxy config リクエストは、アクティブプロキシがプロキシ設定データを取得するために送信します。このリクエストは ProxyConfigFrequency(プロキシ設定パラメータ)秒ごとに送信されます。
| name | value type | description | ||||
|---|---|---|---|---|---|---|
| proxy→server: | ||||||
| request | string | 'proxy config' | ||||
| host | string |
プロキシ名。 | ||||
| version | string | プロキシのバージョン(<major>.<minor>.<build>)。 | ||||
| session | string | プロキシ設定セッショントークン。 | ||||
| config_revision | number | プロキシ設定リビジョン。 | ||||
| hostmap_revision | number | 現在のホストからプロキシへのマッピングリビジョン。 | ||||
| server→proxy: | ||||||
| full_sync | number | 1 - 完全な設定データが送信される場合。そうでない場合は省略されます(オプション)。 | ||||
| data | array | テーブルデータのオブジェクト。設定に変更がない場合は省略されます(オプション)。 | ||||
| <table> | object | <table> データを持つ1つ以上のオブジェクト(オプション、変更内容に依存)。 | ||||
| fields | array | フィールド名の配列。 | ||||
| - | string | フィールド名。 | ||||
| data | array | 行の配列。 | ||||
| - | array | 列の配列。 | ||||
| - | string,number | データベーススキーマの列型に応じた型の列値。 | ||||
| macro.secrets | object | 秘匿マクロ情報。vaultマクロに変更がない場合は省略されます(オプション)。 | ||||
| proxy_group | string | プロキシが属するプロキシグループの名前。 | ||||
| config_revision | number | 設定キャッシュのリビジョン。設定データとともに送信されます(オプション)。 | ||||
| del_hostids | array | 削除された hostid の配列(オプション)。 | ||||
| - | number | ホスト識別子。 | ||||
| del_macro_hostids | array | すべてのマクロが削除された hostid の配列(オプション)。 | ||||
| - | number | ホスト識別子。 | ||||
例:
proxy→server:
{
"request": "proxy config",
"host": "Zabbix proxy",
"version":"8.0.0",
"session": "fd59a09ff4e9d1fb447de1f04599bcf6",
"config_revision": 0
}
server→proxy:
{
"full_sync": 1,
"data": {
"hosts": {
"fields": ["hostid", "host", "status", "ipmi_authtype", "ipmi_privilege", "ipmi_username", "ipmi_password", "name", "tls_connect", "tls_accept", "tls_issuer", "tls_subject", "tls_psk_identity", "tls_psk"],
"data": [
[10084, "Zabbix server", 0, -1, 2, "", "", "Zabbix server", 1, 1, "", "", "", ""]
]
},
"interface": {
"fields": ["interfaceid", "hostid", "main", "type", "useip", "ip", "dns", "port", "available"],
"data": [
[1, 10084, 1, 1, 1, "127.0.0.1", "", "10053", 1]
]
},
"interface_snmp": {
"fields": ["interfaceid", "version", "bulk", "community", "securityname", "securitylevel", "authpassphrase", "privpassphrase", "authprotocol", "privprotocol", "contextname"],
"data": []
},
"host_inventory": {
"fields": ["hostid", "type", "type_full", "name", "alias", "os", "os_full", "os_short", "serialno_a", "serialno_b", "tag", "asset_tag", "macaddress_a", "macaddress_b", "hardware", "hardware_full", "software", "software_full", "software_app_a", "software_app_b", "software_app_c", "software_app_d", "software_app_e", "contact", "location", "location_lat", "location_lon", "notes", "chassis", "model", "hw_arch", "vendor", "contract_number", "installer_name", "deployment_status", "url_a", "url_b", "url_c", "host_networks", "host_netmask", "host_router", "oob_ip", "oob_netmask", "oob_router", "date_hw_purchase", "date_hw_install", "date_hw_expiry", "date_hw_decomm", "site_address_a", "site_address_b", "site_address_c", "site_city", "site_state", "site_country", "site_zip", "site_rack", "site_notes", "poc_1_name", "poc_1_email", "poc_1_phone_a", "poc_1_phone_b", "poc_1_cell", "poc_1_screen", "poc_1_notes", "poc_2_name", "poc_2_email", "poc_2_phone_a", "poc_2_phone_b", "poc_2_cell", "poc_2_screen", "poc_2_notes"],
"data": [
[10084, "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "56.95387", "24.22067", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""]
]
},
"items": {
"fields": ["itemid", "type", "snmp_oid", "hostid", "key_", "delay", "history", "status", "value_type", "trapper_hosts", "logtimefmt", "params", "ipmi_sensor", "authtype", "username", "password", "publickey", "privatekey", "flags", "interfaceid", "inventory_link", "jmx_endpoint", "master_itemid", "timeout", "url", "query_fields", "posts", "status_codes", "follow_redirects", "post_type", "http_proxy", "headers", "retrieve_mode", "request_method", "output_format", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host", "allow_traps"],
"data": [
[44161, 7, "", 10084, "agent.hostmetadata", "10s", "90d", 0, 1, "", "", "", "", 0, "", "", "", "", 0, null, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0],
[44162, 0, "", 10084, "agent.ping", "10s", "90d", 0, 3, "", "", "", "", 0, "", "", "", "", 0, 1, 0, "", null, "3s", "", "", "", "200", 1, 0, "", "", 0, 0, 0, "", "", "", 0, 0, 0]
]
},
"item_rtdata": {
"fields": ["itemid", "lastlogsize", "mtime"],
"data": [
[44161, 0, 0],
[44162, 0, 0]
]
},
"item_preproc": {
"fields": ["item_preprocid", "itemid", "step", "type", "params", "error_handler", "error_handler_params"],
"data": []
},
"item_parameter": {
"fields": ["item_parameterid", "itemid", "name", "value"],
"data": []
},
"globalmacro": {
"fields": ["globalmacroid", "macro", "value", "type"],
"data": [
[2, "{$SNMP_COMMUNITY}", "public", 0]
]
},
"hosts_templates": {
"fields": ["hosttemplateid", "hostid", "templateid", "link_type"],
"data": []
},
"hostmacro": {
"fields": ["hostmacroid", "hostid", "macro", "value", "type", "automatic"],
"data": [
[5676, 10084, "{$M}", "AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix:Content", 2, 0]
]
},
"drules": {
"fields": ["druleid", "name", "iprange", "delay"],
"data": [
[2, "Local network", "127.0.0.1", "10s"]
]
},
"dchecks": {
"fields": ["dcheckid", "druleid", "type", "key_", "snmp_community", "ports", "snmpv3_securityname", "snmpv3_securitylevel", "snmpv3_authpassphrase", "snmpv3_privpassphrase", "uniq", "snmpv3_authprotocol", "snmpv3_privprotocol", "snmpv3_contextname", "host_source", "name_source"],
"data": [
[2, 2, 9, "system.uname", "", "10052", "", 0, "", "", 0, 0, 0, "", 1, 0]
]
},
"regexps": {
"fields": ["regexpid", "name"],
"data": [
[1, "File systems for discovery"],
[2, "Network interfaces for discovery"],
[3, "Storage devices for SNMP discovery"],
[4, "Windows service names for discovery"],
[5, "Windows service startup states for discovery"]
]
},
"expressions": {
"fields": ["expressionid", "regexpid", "expression", "expression_type", "exp_delimiter", "case_sensitive"],
"data": [
[1, 1, "^(btrfs|ext2|ext3|ext4|reiser|xfs|ffs|ufs|jfs|jfs2|vxfs|hfs|apfs|refs|ntfs|fat32|zfs)$", 3, ",", 0],
[3, 3, "^(Physical memory|Virtual memory|Memory buffers|Cached memory|Swap space)$", 4, ",", 1],
[5, 4, "^(MMCSS|gupdate|SysmonLog|clr_optimization_v2.0.50727_32|clr_optimization_v4.0.30319_32)$", 4, ",", 1],
[6, 5, "^(automatic|automatic delayed)$", 3, ",", 1],
[7, 2, "^Software Loopback Interface", 4, ",", 1],
[8, 2, "^(In)?[Ll]oop[Bb]ack[0-9._]*$", 4, ",", 1],
[9, 2, "^NULL[0-9.]*$", 4, ",", 1],
[10, 2, "^[Ll]o[0-9.]*$", 4, ",", 1],
[11, 2, "^[Ss]ystem$", 4, ",", 1],
[12, 2, "^Nu[0-9.]*$", 4, ",", 1]
]
},
"settings": {
"fields": ["name", "type", "value_str", "value_int"],
"data": [
["autoreg_tls_accept", 2, "", 1],
["hk_history_global", 2, "", 0],
["snmptrap_logging", 2, "", 1],
["proxy_secrets_provider", 2, "", 0],
["hk_history", 1, "31d", 0],
["timeout_db_monitor", 1, "3s", 0],
["timeout_external_check", 1, "3s", 0],
["timeout_http_agent", 1, "3s", 0],
["timeout_simple_check", 1, "3s", 0],
["timeout_snmp_agent", 1, "3s", 0],
["timeout_ssh_agent", 1, "3s", 0],
["timeout_telnet_agent", 1, "3s", 0],
["timeout_zabbix_agent", 1, "3s", 0],
["timeout_browser", 1, "30s", 0]
]
},
"httptest": {
"fields": ["httptestid", "name", "delay", "agent", "authentication", "http_user", "http_password", "hostid", "http_proxy", "retries", "ssl_cert_file", "ssl_key_file", "ssl_key_password", "verify_peer", "verify_host"],
"data": []
},
"httptestitem": {
"fields": ["httptestitemid", "httptestid", "itemid", "type"],
"data": []
},
"httptest_field": {
"fields": ["httptest_fieldid", "httptestid", "type", "name", "value"],
"data": []
},
"httpstep": {
"fields": ["httpstepid", "httptestid", "name", "no", "url", "timeout", "posts", "required", "status_codes", "follow_redirects", "retrieve_mode", "post_type"],
"data": []
},
"httpstepitem": {
"fields": ["httpstepitemid", "httpstepid", "itemid", "type"],
"data": []
},
"httpstep_field": {
"fields": ["httpstep_fieldid", "httpstepid", "type", "name", "value"],
"data": []
},
"config_autoreg_tls": {
"fields": ["autoreg_tlsid", "tls_psk_identity", "tls_psk"],
"data": [
[1, "", ""]
]
}
},
"macro.secrets": {
"AppID=zabbix_server&Query=Safe=passwordSafe;Object=zabbix": {
"Content": "738"
}
},
"config_revision": 2
}
データ要求
proxy data 要求は、ホストインターフェースの可用性、履歴、ディスカバリ、および自動登録データを提供するためにプロキシから送信されます。
この要求は DataSenderFrequency(プロキシ設定パラメータ)秒ごとに送信されます。
アクティブプロキシは、リモートコマンドタスクのために、引き続き毎秒 Zabbix サーバーをポーリングします(空の proxy data 要求を使用)。
| name | value type | description | |
|---|---|---|---|
| proxy→server: | |||
| request | string | 'proxy data' | |
| host | string | プロキシ名。 | |
| session | string | データセッショントークン。 | |
| interface availability | array | (optional) インターフェース可用性データオブジェクトの配列。 | |
| interfaceid | number | インターフェース識別子。 | |
| available | number | インターフェースの可用性: 0, INTERFACE_AVAILABLE_UNKNOWN - 不明 1, INTERFACE_AVAILABLE_TRUE - 利用可能 2, INTERFACE_AVAILABLE_FALSE - 利用不可 |
|
| error | string | インターフェースのエラーメッセージ、または空文字列。 | |
| history data | array | (optional) 履歴データオブジェクトの配列。 | |
| itemid | number | アイテム識別子。 | |
| clock | number | アイテム値のタイムスタンプ(秒)。 | |
| ns | number | アイテム値のタイムスタンプ(ナノ秒)。 | |
| value | string | (optional) アイテム値。 | |
| id | number | 値の識別子(昇順カウンター、1つのデータセッション内で一意)。 | |
| timestamp | number | (optional) ログタイプアイテムのタイムスタンプ。 | |
| source | string | (optional) Eventlogアイテムのsource値。 | |
| severity | number | (optional) Eventlogアイテムのseverity値。 | |
| eventid | number | (optional) Eventlogアイテムのeventid値。 | |
| state | string | (optional) アイテム状態: 0, ITEM_STATE_NORMAL 1, ITEM_STATE_NOTSUPPORTED |
|
| lastlogsize | number | (optional) ログタイプアイテムの最終ログサイズ。 | |
| mtime | number | (optional) ログタイプアイテムの更新時刻。 | |
| discovery data | array | (optional) ディスカバリデータオブジェクトの配列。 | |
| clock | number | ディスカバリデータのタイムスタンプ。 | |
| druleid | number | ディスカバリルール識別子。 | |
| dcheckid | number | ディスカバリチェック識別子、またはディスカバリルールデータの場合は null。 | |
| type | number | ディスカバリチェックの種類: -1 ディスカバリルールデータ 0, SVC_SSH - SSH サービスチェック 1, SVC_LDAP - LDAP サービスチェック 2, SVC_SMTP - SMTP サービスチェック 3, SVC_FTP - FTP サービスチェック 4, SVC_HTTP - HTTP サービスチェック 5, SVC_POP - POP サービスチェック 6, SVC_NNTP - NNTP サービスチェック 7, SVC_IMAP - IMAP サービスチェック 8, SVC_TCP - TCP ポート可用性チェック 9, SVC_AGENT - Zabbix エージェント 10, SVC_SNMPv1 - SNMPv1 エージェント 11, SVC_SNMPv2 - SNMPv2 エージェント 12, SVC_ICMPPING - ICMP ping 13, SVC_SNMPv3 - SNMPv3 エージェント 14, SVC_HTTPS - HTTPS サービスチェック 15, SVC_TELNET - Telnet 可用性チェック |
|
| ip | string | ホストの IP アドレス。 | |
| dns | string | ホストの DNS 名。 | |
| port | number | (optional) サービスポート番号。 | |
| key_ | string | (optional) 種類 9 SVC_AGENT のディスカバリチェック用アイテムキー | |
| value | string | (optional) サービスから受信した値。多くのサービスでは空にできます。 | |
| status | number | (optional) サービス状態: 0, DOBJECT_STATUS_UP - サービス稼働中 1, DOBJECT_STATUS_DOWN - サービス停止中 |
|
| autoregistration | array | (optional) 自動登録データオブジェクトの配列。 | |
| clock | number | 自動登録データのタイムスタンプ。 | |
| host | string | ホスト名。 | |
| ip | string | (optional) ホストの IP アドレス。 | |
| dns | string | (optional) IP アドレスから解決された DNS 名。 | |
| port | string | (optional) ホストのポート。 | |
| host_metadata | string | (optional) エージェントが送信したホストメタデータ(HostMetadata または HostMetadataItem エージェント設定パラメータに基づく)。 | |
| tasks | array | (optional) タスクの配列。 | |
| type | number | タスク種別: 0, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND_RESULT - リモートコマンド結果 |
|
| status | number | リモートコマンド実行ステータス: 0, ZBX_TM_REMOTE_COMMAND_COMPLETED - リモートコマンドは正常に完了 1, ZBX_TM_REMOTE_COMMAND_FAILED - リモートコマンドは失敗 |
|
| error | string | (optional) エラーメッセージ。 | |
| parent_taskid | number | 親タスクID。 | |
| more | number | (optional) 1 - 送信する履歴データがさらにある | |
| clock | number | (optional) データ転送タイムスタンプ(秒)。 | |
| ns | number | (optional) データ転送タイムスタンプ(ナノ秒)。 | |
| version | string | プロキシバージョン(<major>.<minor>.<build>)。 | |
| server→proxy: | |||
| response | string | 要求成功情報('success' または 'failed')。 | |
| upload | string | 履歴データ(history、自動登録、ホスト可用性、ネットワークディスカバリ)のアップロード制御。 可能な値: enabled - 通常動作 disabled - サーバーがデータを受け付けていない(内部キャッシュの上限超過が原因の可能性あり) |
|
| tasks | array | (optional) タスクの配列。 | |
| type | number | タスク種別: 1, ZBX_TM_TASK_PROCESS_REMOTE_COMMAND - リモートコマンド |
|
| clock | number | タスク作成時刻。 | |
| ttl | number | タスクが期限切れになるまでの秒数。 | |
| commandtype | number | リモートコマンドの種類: 0, ZBX_SCRIPT_TYPE_CUSTOM_SCRIPT - カスタムスクリプトを使用 1, ZBX_SCRIPT_TYPE_IPMI - IPMI を使用 2, ZBX_SCRIPT_TYPE_SSH - SSH を使用 3, ZBX_SCRIPT_TYPE_TELNET - Telnet を使用 4, ZBX_SCRIPT_TYPE_GLOBAL_SCRIPT - グローバルスクリプトを使用(現在は機能的にカスタムスクリプトと同等) |
|
| command | string | 実行するリモートコマンド。 | |
| execute_on | number | カスタムスクリプトの実行先: 0, ZBX_SCRIPT_EXECUTE_ON_AGENT - エージェント上でスクリプトを実行 1, ZBX_SCRIPT_EXECUTE_ON_SERVER - サーバー上でスクリプトを実行 2, ZBX_SCRIPT_EXECUTE_ON_PROXY - プロキシ上でスクリプトを実行 |
|
| port | number | (optional) Telnet および SSH コマンド用のポート。 | |
| authtype | number | (optional) SSH コマンドの認証タイプ。 | |
| username | string | (optional) Telnet および SSH コマンドのユーザー名。 | |
| password | string | (optional) Telnet および SSH コマンドのパスワード。 | |
| publickey | string | (optional) SSH コマンドの公開鍵。 | |
| privatekey | string | (optional) SSH コマンドの秘密鍵。 | |
| parent_taskid | number | 親タスクID。 | |
| hostid | number | 対象ホストID。 | |
Example:
proxy→server:
{
"request": "proxy data",
"host": "Zabbix proxy",
"session": "818cdd1b537bdc5e50c09ed4969235b6",
"interface availability": [{
"interfaceid": 1,
"available": 1,
"error": ""
}],
"history data": [{
"id": 1114,
"itemid": 44162,
"clock": 1665730632,
"ns": 798953105,
"value": "1"
}, {
"id": 1115,
"itemid": 44161,
"clock": 1665730633,
"ns": 811684663,
"value": "58"
}],
"auto registration": [{
"clock": 1665730633,
"host": "Zabbix server",
"ip": "127.0.0.1",
"dns": "localhost",
"port": "10053",
"host_metadata": "58",
"tls_accepted": 1
}],
"discovery data": [{
"clock": 1665732232,
"drule": 2,
"dcheck": 2,
"ip": "127.0.0.1",
"dns": "localhost",
"port": 10052,
"status": 1
}, {
"clock": 1665732232,
"drule": 2,
"dcheck": null,
"ip": "127.0.0.1",
"dns": "localhost",
"status": 1
}],
"host data": [{
"hostid": 10084,
"active_status": 1
}],
"tasks": [{
"type": 3,
"clock": 1665730985,
"ttl": 0,
"status": -1,
"info": "Remote commands are not enabled",
"parent_taskid": 3
}],
"version": "8.0.0",
"clock": 1665730643,
"ns": 65389964
}
server→proxy:
{
"upload": "enabled",
"response": "success",
"tasks": [{
"type": 2,
"clock": 1665730986,
"ttl": 600,
"commandtype": 0,
"command": "ping -c 3 127.0.0.1; case $? in [01]) true;; *) false;; esac",
"execute_on": 2,
"port": 0,
"authtype": 0,
"username": "",
"password": "",
"publickey": "",
"privatekey": "",
"alertid": 0,
"parent_taskid": 4,
"hostid": 10084
}]
}