サーバー - プロキシ間のデータ交換はJSON形式に基づいています。
要求メッセージと応答メッセージはヘッダーとデータの長さに則って始まる必要があります。
サーバーは最初に空の proxy config リクエストを送信します。このリクエストは ProxyConfigFrequency(サーバーの設定パラメータ)秒ごとに送信されます。
プロキシは現在のプロキシバージョン、セッショントークン、および設定リビジョンで応答します。サーバーは更新が必要な設定データで応答します。
| name | value type | description | ||||
|---|---|---|---|---|---|---|
| server→proxy: | ||||||
| request | string | 'proxy config' | ||||
| proxy→server: | ||||||
| version | string | プロキシバージョン(<major>.<minor>.<build>)。 | ||||
| session | string | プロキシ設定セッショントークン。 | ||||
| config_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 | シークレットマクロ情報。ボールトマクロに変更がない場合は省略(オプション)。 | ||||
| config_revision | number | 設定キャッシュリビジョン - 設定データとともに送信(オプション)。 | ||||
| del_hostids | array | 削除されたhostidの配列(オプション)。 | ||||
| - | number | ホスト識別子。 | ||||
| del_macro_hostids | array | すべてのマクロが削除されたhostidの配列(オプション)。 | ||||
| - | number | ホスト識別子。 | ||||
| proxy→server: | ||||||
| response | string | リクエスト成功情報('success'または'failed')。 | ||||
| version | string | プロキシバージョン(<major>.<minor>.<build>)。 | ||||
例:
server→proxy:
proxy→server:
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:
proxy data リクエストは、プロキシからホストインターフェースの可用性、履歴、ディスカバリ、および自動登録データを取得するために使用されます。 このリクエストは、ProxyDataFrequency (サーバーの設定パラメータ) 秒ごとに送信されます。
| 名前 | 値の型 | 説明 | |
|---|---|---|---|
| server→proxy: | |||
| request | string | 'proxy data' | |
| proxy→server: | |||
| session | string | データセッションのトークン | |
| interface availability | array | (オプション) インターフェース可用性データオブジェクトの配列 | |
| interfaceid | number | インターフェースの識別子 | |
| available | number | インターフェースの可用性: 0, INTERFACE_AVAILABLE_UNKNOWN - 不明 1, INTERFACE_AVAILABLE_TRUE - 利用可能 2, INTERFACE_AVAILABLE_FALSE - 利用不可 |
|
| error | string | インターフェースのエラーメッセージまたは空文字列 | |
| history data | array | (オプション) 履歴データオブジェクトの配列 | |
| itemid | number | アイテムの識別子 | |
| clock | number | アイテム値のタイムスタンプ(秒) | |
| ns | number | アイテム値のタイムスタンプ(ナノ秒) | |
| value | string | (オプション) アイテムの値 | |
| id | number | 値の識別子(データセッション内で一意な昇順カウンタ) | |
| timestamp | number | (オプション) ログ型アイテムのタイムスタンプ | |
| source | string | (オプション) イベントログアイテムのソース値 | |
| severity | number | (オプション) イベントログアイテムの重大度値 | |
| eventid | number | (オプション) イベントログアイテムのeventid値 | |
| state | string | (オプション) アイテムの状態: 0, ITEM_STATE_NORMAL 1, ITEM_STATE_NOTSUPPORTED |
|
| lastlogsize | number | (オプション) ログ型アイテムの最終ログサイズ | |
| mtime | number | (オプション) ログ型アイテムの修正時刻 | |
| discovery data | array | (オプション) ディスカバリデータオブジェクトの配列 | |
| 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 | (オプション) サービスのポート番号 | |
| key_ | string | (オプション) タイプ9 SVC_AGENTのディスカバリチェック用アイテムキー | |
| value | string | (オプション) サービスから受信した値。ほとんどのサービスでは空の場合あり | |
| status | number | (オプション) サービスの状態: 0, DOBJECT_STATUS_UP - サービスUP 1, DOBJECT_STATUS_DOWN - サービスDOWN |
|
| auto registration | array | (オプション) 自動登録データオブジェクトの配列 | |
| clock | number | 自動登録データのタイムスタンプ | |
| host | string | ホスト名 | |
| ip | string | (オプション) ホストのIPアドレス | |
| dns | string | (オプション) IPアドレスから解決されたDNS名 | |
| port | string | (オプション) ホストのポート | |
| host_metadata | string | (オプション) エージェントから送信されたホストメタデータ(エージェントのHostMetadataまたはHostMetadataItem設定パラメータに基づく) | |
| tasks | array | (オプション) タスクの配列 | |
| 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 | (オプション) エラーメッセージ | |
| parent_taskid | number | 親タスクID | |
| more | number | (オプション) 1 - 送信する履歴データがさらにある | |
| clock | number | (オプション) データ転送のタイムスタンプ(秒) | |
| ns | number | (オプション) データ転送のタイムスタンプ(ナノ秒) | |
| version | string | プロキシのバージョン (<major>.<minor>.<build>) | |
| server→proxy: | |||
| response | string | リクエストの成功情報('success'または'failed') | |
| tasks | array | (オプション) タスクの配列 | |
| 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 | (オプション) TelnetおよびSSHコマンド用のポート | |
| authtype | number | (オプション) SSHコマンド用の認証タイプ | |
| username | string | (オプション) TelnetおよびSSHコマンド用のユーザー名 | |
| password | string | (オプション) TelnetおよびSSHコマンド用のパスワード | |
| publickey | string | (オプション) SSHコマンド用の公開鍵 | |
| privatekey | string | (オプション) SSHコマンド用の秘密鍵 | |
| parent_taskid | number | 親タスクID | |
| hostid | number | ターゲットホストID | |
例:
server→proxy:
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 configリクエストは、プロキシの設定データを取得するためにアクティブプロキシから送信されます。このリクエストは、ProxyConfigFrequency(プロキシ設定パラメータ)秒ごとに送信されます。
| name | value type | description | ||||
|---|---|---|---|---|---|---|
| proxy→server: | ||||||
| request | string | 'proxy config' | ||||
| host | string |
プロキシ名 | ||||
| version | string | プロキシバージョン(<major>.<minor>.<build>) | ||||
| session | string | プロキシ設定セッショントークン | ||||
| config_revision | number | プロキシ設定リビジョン | ||||
| server→proxy: | ||||||
| fullsync | number | フル設定データが送信された場合は1、それ以外は省略(オプション) | ||||
| data | array | テーブルデータのオブジェクト。設定が変更されていない場合は省略(オプション) | ||||
| <table> | object | 1つ以上の<table>データのオブジェクト(変更に応じてオプション) | ||||
| fields | array | フィールド名の配列 | ||||
| - | string | フィールド名 | ||||
| data | array | 行の配列 | ||||
| - | array | 列の配列 | ||||
| - | string,number | データベーススキーマの列タイプに応じた型の列値 | ||||
| macro.secrets | object | シークレットマクロ情報。ボールトマクロに変更がない場合は省略(オプション) | ||||
| 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(プロキシの設定パラメータ)秒ごとに送信されます。 アクティブプロキシは、リモートコマンドタスクのために(空のproxy dataリクエストで)毎秒Zabbixサーバーにポーリングし続けることに注意してください。
| 名前 | 値の型 | 説明 | |
|---|---|---|---|
| proxy→server: | |||
| request | string | 'proxy data' | |
| host | string | プロキシ名 | |
| session | string | データセッションのトークン | |
| interface availability | array | (省略可能) インターフェース可用性データオブジェクトの配列 | |
| interfaceid | number | インターフェース識別子 | |
| available | number | インターフェースの可用性: 0, INTERFACE_AVAILABLE_UNKNOWN - 不明 1, INTERFACE_AVAILABLE_TRUE - 利用可能 2, INTERFACE_AVAILABLE_FALSE - 利用不可 |
|
| error | string | インターフェースのエラーメッセージまたは空文字列 | |
| history data | array | (省略可能) 履歴データオブジェクトの配列 | |
| itemid | number | アイテム識別子 | |
| clock | number | アイテム値のタイムスタンプ(秒) | |
| ns | number | アイテム値のタイムスタンプ(ナノ秒) | |
| value | string | (省略可能) アイテム値 | |
| id | number | 値の識別子(昇順カウンタ、1つのデータセッション内で一意) | |
| timestamp | number | (省略可能) ログタイプアイテムのタイムスタンプ | |
| source | string | (省略可能) イベントログアイテムのソース値 | |
| severity | number | (省略可能) イベントログアイテムの重大度値 | |
| eventid | number | (省略可能) イベントログアイテムのeventid値 | |
| state | string | (省略可能) アイテムの状態: 0, ITEM_STATE_NORMAL 1, ITEM_STATE_NOTSUPPORTED |
|
| lastlogsize | number | (省略可能) ログタイプアイテムの最終ログサイズ | |
| mtime | number | (省略可能) ログタイプアイテムの修正時刻 | |
| discovery data | array | (省略可能) ディスカバリデータオブジェクトの配列 | |
| 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 | (省略可能) サービスのポート番号 | |
| key_ | string | (省略可能) タイプ9 SVC_AGENTのディスカバリチェック用アイテムキー | |
| value | string | (省略可能) サービスから受信した値。ほとんどのサービスでは空の場合あり | |
| status | number | (省略可能) サービスの状態: 0, DOBJECT_STATUS_UP - サービスUP 1, DOBJECT_STATUS_DOWN - サービスDOWN |
|
| autoregistration | array | (省略可能) 自動登録データオブジェクトの配列 | |
| clock | number | 自動登録データのタイムスタンプ | |
| host | string | ホスト名 | |
| ip | string | (省略可能) ホストのIPアドレス | |
| dns | string | (省略可能) IPアドレスから解決されたDNS名 | |
| port | string | (省略可能) ホストのポート | |
| host_metadata | string | (省略可能) エージェントから送信されたホストメタデータ(エージェントのHostMetadataまたはHostMetadataItem設定パラメータに基づく) | |
| tasks | array | (省略可能) タスクの配列 | |
| 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 | (省略可能) エラーメッセージ | |
| parent_taskid | number | 親タスクID | |
| more | number | (省略可能) 1 - 送信する履歴データがさらにある | |
| clock | number | (省略可能) データ転送のタイムスタンプ(秒) | |
| ns | number | (省略可能) データ転送のタイムスタンプ(ナノ秒) | |
| version | string | プロキシバージョン(<major>.<minor>.<build>) | |
| server→proxy: | |||
| response | string | リクエスト成功情報('success'または'failed') | |
| upload | string | 履歴データ(履歴、自動登録、ホスト可用性、ネットワークディスカバリ)のアップロード制御 可能な値: enabled - 通常動作 disabled - サーバーがデータを受け付けていない(内部キャッシュが上限を超えている可能性あり) |
|
| tasks | array | (省略可能) タスクの配列 | |
| 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 | (省略可能) TelnetおよびSSHコマンド用のポート | |
| authtype | number | (省略可能) SSHコマンド用の認証タイプ | |
| username | string | (省略可能) TelnetおよびSSHコマンド用のユーザー名 | |
| password | string | (省略可能) TelnetおよびSSHコマンド用のパスワード | |
| publickey | string | (省略可能) SSHコマンド用の公開鍵 | |
| privatekey | string | (省略可能) SSHコマンド用の秘密鍵 | |
| parent_taskid | number | 親タスクID | |
| hostid | number | 対象ホストID | |
例:
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
}]
}