From 0378af698f0109ad06852142b7c9cc9281c9f31d Mon Sep 17 00:00:00 2001 From: Patrice Gautier Date: Sun, 26 Sep 2021 14:41:16 -0700 Subject: [PATCH] UDMP: Adding discovery items and graphs for embedded switch port monitoring; UDMP: adding discovery of site to site VPN and associated bw monitoring --- zbx_export_templates.json | 773 +++++++++++++++++++++++++++++++------- zbx_export_templates.xml | 759 ++++++++++++++++++++++++++++++------- zbx_export_templates.yaml | 421 +++++++++++++++++++-- 3 files changed, 1629 insertions(+), 324 deletions(-) diff --git a/zbx_export_templates.json b/zbx_export_templates.json index d826cc7..fa446aa 100644 --- a/zbx_export_templates.json +++ b/zbx_export_templates.json @@ -1,7 +1,7 @@ { "zabbix_export": { "version": "5.4", - "date": "2021-08-30T22:33:56Z", + "date": "2021-09-26T21:39:09Z", "groups": [ { "uuid": "15155c95a3d048f4856272ae12fd42c5", @@ -2645,7 +2645,7 @@ "history": "0", "trends": "0", "value_type": "TEXT", - "url": "https://{HOST.NAME}:7443", + "url": "https://{HOST.NAME}", "retrieve_mode": "HEADERS" } ] @@ -4690,6 +4690,82 @@ } ] }, + { + "uuid": "ff07a3572bfa4f089c7abf60cdc45163", + "name": "Total Switch Rx Bandwidth", + "type": "DEPENDENT", + "key": "total_switch_rx_bandwidth", + "delay": "0", + "units": "bps", + "description": "Total Bandwidth Received by the 8 port switch embedded in the UDMP (ports 1-8)", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[?(@.port_idx < 9)].rx_bytes.sum()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + }, + { + "uuid": "1ef97d3bf6b84e179d80ffe44c00bb40", + "name": "Total Switch Tx Bandwidth", + "type": "DEPENDENT", + "key": "total_switch_tx_bandwidth", + "delay": "0", + "units": "bps", + "description": "Total Bandwidth Sent by the 8 port switch embedded in the UDMP (ports 1-8)", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[?(@.port_idx < 9)].tx_bytes.sum()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + }, { "uuid": "b5b81d4dab514d4680b987094da82541", "name": "Upload Bandwidth", @@ -5033,129 +5109,504 @@ "path": "$.dns_server" } ] - } - ], - "macros": [ - { - "macro": "{$UNIFI_USER}", - "value": "root", - "description": "AP Zabbix SSH Username - UDMP only supports root" - } - ] - }, - { - "uuid": "f15020131b5c4b7b96100df9faedce9c", - "template": "Unifi USG", - "name": "Unifi USG", - "description": "Link this template to USGs", - "groups": [ - { - "name": "Patrice" - }, - { - "name": "unifiZabbix" - }, - { - "name": "Unifi Zabbix Export" - } - ], - "items": [ - { - "uuid": "81d276921081468c895ca7c7d9b3e918", - "name": "CPU Utilization", - "type": "DEPENDENT", - "key": "cpu", - "delay": "0", - "value_type": "FLOAT", - "units": "%", - "preprocessing": [ - { - "type": "JSONPATH", - "parameters": [ - "$.['system-stats'].cpu" - ] - } - ], - "master_item": { - "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"USG\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" - }, - "tags": [ - { - "tag": "Application", - "value": "Host" - } - ] - }, - { - "uuid": "4412da02249643e5a550d06ec615fba8", - "name": "CPU Smooth", - "type": "CALCULATED", - "key": "cpu_smooth", - "value_type": "FLOAT", - "units": "%", - "params": "avg(//cpu,{$UNIFI_SMOOTHING_PERIOD})", - "tags": [ - { - "tag": "Application", - "value": "Host" - } - ] }, { - "uuid": "bd014f86f61b49f9986807955f0ced54", - "name": "Download Bandwidth", + "uuid": "58568f925c7c4f7bb44800d431141b69", + "name": "Site to Site VPN Discovery", "type": "DEPENDENT", - "key": "download_bandwidth", + "key": "site_to_site_vpn_discovery", "delay": "0", - "units": "bps", - "preprocessing": [ + "item_prototypes": [ { - "type": "JSONPATH", - "parameters": [ - "$.if_table.[?(@.latency > 0)].rx_bytes.first()" + "uuid": "cad8d443b86d43ebb33c90541668565d", + "name": "Remote Site Rx Bandwidth - {#REMOTE_SITE_IP}", + "type": "DEPENDENT", + "key": "remote_site_rx_bandwitdh[{#REMOTE_SITE_IP}]", + "delay": "0", + "units": "bps", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].rxBytes.first()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } ] }, { - "type": "CHANGE_PER_SECOND", - "parameters": [ - "" + "uuid": "f1d38f4931a640e49b8c68d027d5f968", + "name": "Remote Site Tx Bandwidth - {#REMOTE_SITE_IP}", + "type": "DEPENDENT", + "key": "remote_site_tx_bandwitdh[{#REMOTE_SITE_IP}]", + "delay": "0", + "units": "bps", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].txBytes.first()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } ] - }, + } + ], + "graph_prototypes": [ { - "type": "MULTIPLIER", - "parameters": [ - "8" + "uuid": "3195d5951a92422bb2a2c992ab0cb348", + "name": "Remote Site Bandwidth {#REMOTE_SITE_IP}", + "graph_items": [ + { + "sortorder": "1", + "color": "1A7C11", + "item": { + "host": "Unifi UDMP", + "key": "remote_site_rx_bandwitdh[{#REMOTE_SITE_IP}]" + } + }, + { + "sortorder": "2", + "color": "F63100", + "item": { + "host": "Unifi UDMP", + "key": "remote_site_tx_bandwitdh[{#REMOTE_SITE_IP}]" + } + } ] } ], "master_item": { - "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"USG\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" }, - "tags": [ + "lld_macro_paths": [ { - "tag": "Application", - "value": "wan" + "lld_macro": "{#REMOTE_SITE_IP}", + "path": "$.ip" } - ] - }, - { - "uuid": "06f18573d1074e1ca3e8a3410718f84c", - "name": "Download Bandwidth Smooth", - "type": "CALCULATED", - "key": "download_bandwidth_smooth", - "value_type": "FLOAT", - "units": "bps", - "params": "avg(//download_bandwidth,{$UNIFI_SMOOTHING_PERIOD})", - "tags": [ + ], + "preprocessing": [ { - "tag": "Application", - "value": "wan" + "type": "JSONPATH", + "parameters": [ + "$.vpn[*].remotes[0]" + ] } ] }, { - "uuid": "ecf022ac405d40df9eab71535db74efb", - "name": "Dropped Dowload Packets", + "uuid": "c4593426190a422dbdf3341a066c4214", + "name": "Switch Port Discovery", + "type": "DEPENDENT", + "key": "switch_port_discovery", + "delay": "0", + "item_prototypes": [ + { + "uuid": "679a3e2856dd46c6a966843c44738a5b", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} Connection Speed", + "type": "DEPENDENT", + "key": "connection_speed_[{#PORT_IDX}]", + "delay": "0", + "units": "bps", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[ ?(@.port_idx=='{#PORT_IDX}')].speed.first()" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "1000000" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + }, + { + "uuid": "1b52fd26f9654509a911f6a43d8658ab", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} Uplink", + "type": "DEPENDENT", + "key": "is_uplink_[{#PORT_IDX}]", + "delay": "0", + "trends": "0", + "value_type": "CHAR", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[ ?(@.port_idx=='{#PORT_IDX}')].is_uplink.first()" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + }, + { + "uuid": "0d02ff3c40e94f4b9c0495fafc3f9a1c", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} Rx Bandwidth", + "type": "DEPENDENT", + "key": "rx_port_[{#PORT_IDX}]", + "delay": "0", + "units": "bps", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[ ?(@.port_idx=='{#PORT_IDX}')].rx_bytes.first()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + }, + { + "uuid": "78a554f976144a7ea4db83051148a91b", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} Tx Bandwidth", + "type": "DEPENDENT", + "key": "tx_port_[{#PORT_IDX}]", + "delay": "0", + "units": "bps", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[ ?(@.port_idx=='{#PORT_IDX}')].tx_bytes.first()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + }, + { + "uuid": "c42462fcfe1e47b4abc2ca083d18d458", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} Up", + "type": "DEPENDENT", + "key": "up_[{#PORT_IDX}]", + "delay": "0", + "trends": "0", + "value_type": "CHAR", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table[ ?(@.port_idx=='{#PORT_IDX}')].up.first()" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Traffic" + } + ] + } + ], + "trigger_prototypes": [ + { + "uuid": "6e678d3587d944b8bb4a87b7a5ef5935", + "expression": "last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)>0 and last(/Unifi UDMP/up_[{#PORT_IDX}],#1)=\"true\" and ( avg(/Unifi UDMP/rx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.25 or avg(/Unifi UDMP/tx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.25 )", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} above 25%", + "priority": "INFO", + "dependencies": [ + { + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} above 50%", + "expression": "last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)>0 and last(/Unifi UDMP/up_[{#PORT_IDX}],#1)=\"true\" and ( avg(/Unifi UDMP/rx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.5 or avg(/Unifi UDMP/tx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.5 )" + } + ] + }, + { + "uuid": "14c2ce7629714ff38b1ed1fcaae6ebd3", + "expression": "last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)>0 and last(/Unifi UDMP/up_[{#PORT_IDX}],#1)=\"true\" and ( avg(/Unifi UDMP/rx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.5 or avg(/Unifi UDMP/tx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.5 )", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} above 50%", + "priority": "WARNING", + "dependencies": [ + { + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} above 75%", + "expression": "last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)>0 and last(/Unifi UDMP/up_[{#PORT_IDX}],#1)=\"true\" and ( avg(/Unifi UDMP/rx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.75 or avg(/Unifi UDMP/tx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.75 )" + } + ] + }, + { + "uuid": "37beea9d4c814e8f8818ddc65c207e3c", + "expression": "last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)>0 and last(/Unifi UDMP/up_[{#PORT_IDX}],#1)=\"true\" and ( avg(/Unifi UDMP/rx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.75 or avg(/Unifi UDMP/tx_port_[{#PORT_IDX}],{$UNIFI_ALERT_PERIOD})>last(/Unifi UDMP/connection_speed_[{#PORT_IDX}],#1)*.75 )", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} above 75%", + "priority": "AVERAGE" + } + ], + "graph_prototypes": [ + { + "uuid": "877968bc3fbb4d2daf2421e3e4b31569", + "name": "{{#PORT_IS_UPLINK}.regsub(\"true\", \"Uplink\")} {{#PORT_MEDIA}.regsub(\"SFP\", \\0)} Port {#PORT_IDX} Port I/O", + "graph_items": [ + { + "sortorder": "1", + "color": "1A7C11", + "item": { + "host": "Unifi UDMP", + "key": "rx_port_[{#PORT_IDX}]" + } + }, + { + "sortorder": "2", + "color": "F63100", + "item": { + "host": "Unifi UDMP", + "key": "tx_port_[{#PORT_IDX}]" + } + } + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"root\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"UDMP\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "lld_macro_paths": [ + { + "lld_macro": "{#LOCAL_PORT_NAME}", + "path": "$.local_port_name" + }, + { + "lld_macro": "{#PORT_IDX}", + "path": "$.port_idx" + }, + { + "lld_macro": "{#PORT_IS_UPLINK}", + "path": "$.is_uplink" + }, + { + "lld_macro": "{#PORT_MEDIA}", + "path": "$.media" + } + ], + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.port_table" + ] + } + ] + } + ], + "macros": [ + { + "macro": "{$UNIFI_USER}", + "value": "root", + "description": "AP Zabbix SSH Username - UDMP only supports root" + } + ] + }, + { + "uuid": "f15020131b5c4b7b96100df9faedce9c", + "template": "Unifi USG", + "name": "Unifi USG", + "description": "Link this template to USGs", + "groups": [ + { + "name": "Patrice" + }, + { + "name": "unifiZabbix" + }, + { + "name": "Unifi Zabbix Export" + } + ], + "items": [ + { + "uuid": "81d276921081468c895ca7c7d9b3e918", + "name": "CPU Utilization", + "type": "DEPENDENT", + "key": "cpu", + "delay": "0", + "value_type": "FLOAT", + "units": "%", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.['system-stats'].cpu" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"USG\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "Host" + } + ] + }, + { + "uuid": "4412da02249643e5a550d06ec615fba8", + "name": "CPU Smooth", + "type": "CALCULATED", + "key": "cpu_smooth", + "value_type": "FLOAT", + "units": "%", + "params": "avg(//cpu,{$UNIFI_SMOOTHING_PERIOD})", + "tags": [ + { + "tag": "Application", + "value": "Host" + } + ] + }, + { + "uuid": "bd014f86f61b49f9986807955f0ced54", + "name": "Download Bandwidth", + "type": "DEPENDENT", + "key": "download_bandwidth", + "delay": "0", + "units": "bps", + "preprocessing": [ + { + "type": "JSONPATH", + "parameters": [ + "$.if_table.[?(@.latency > 0)].rx_bytes.first()" + ] + }, + { + "type": "CHANGE_PER_SECOND", + "parameters": [ + "" + ] + }, + { + "type": "MULTIPLIER", + "parameters": [ + "8" + ] + } + ], + "master_item": { + "key": "mca-dump-short.sh[\"-d\",\"{HOST.CONN}\", \"-u\", \"{$UNIFI_USER}\", \"-i\", \"{$UNIFI_SSH_PRIV_KEY_PATH}\", \"-t\", \"USG\", \"-p\", \"{$UNIFI_SSHPASS_PASSWORD_PATH}\"]" + }, + "tags": [ + { + "tag": "Application", + "value": "wan" + } + ] + }, + { + "uuid": "06f18573d1074e1ca3e8a3410718f84c", + "name": "Download Bandwidth Smooth", + "type": "CALCULATED", + "key": "download_bandwidth_smooth", + "value_type": "FLOAT", + "units": "bps", + "params": "avg(//download_bandwidth,{$UNIFI_SMOOTHING_PERIOD})", + "tags": [ + { + "tag": "Application", + "value": "wan" + } + ] + }, + { + "uuid": "ecf022ac405d40df9eab71535db74efb", + "name": "Dropped Dowload Packets", "type": "DEPENDENT", "key": "dropped_dowload_packets", "delay": "0", @@ -5998,23 +6449,45 @@ ] }, { - "uuid": "d09d7d135dfc49d0b35e2a0ed5d2ac20", + "uuid": "97ccfef4197444c69af57ca79513fd16", "name": "Bandwidth", "graph_items": [ { "sortorder": "1", "color": "1A7C11", "item": { - "host": "Unifi USG", - "key": "download_bandwidth_smooth" + "host": "Unifi Protect NVR4", + "key": "IpExtInOctets" } }, { "sortorder": "2", "color": "F63100", "item": { - "host": "Unifi USG", - "key": "upload_bandwidth_smooth" + "host": "Unifi Protect NVR4", + "key": "incoming_bandwidth_moving_average_threshold" + } + } + ] + }, + { + "uuid": "a1b1190f8dfa4c9694f69132ea7027a2", + "name": "Bandwidth", + "graph_items": [ + { + "sortorder": "1", + "color": "1A7C11", + "item": { + "host": "Unifi UDMP", + "key": "download_bandwidth" + } + }, + { + "sortorder": "2", + "color": "F63100", + "item": { + "host": "Unifi UDMP", + "key": "upload_bandwidth" } } ] @@ -6058,45 +6531,23 @@ ] }, { - "uuid": "97ccfef4197444c69af57ca79513fd16", - "name": "Bandwidth", - "graph_items": [ - { - "sortorder": "1", - "color": "1A7C11", - "item": { - "host": "Unifi Protect NVR4", - "key": "IpExtInOctets" - } - }, - { - "sortorder": "2", - "color": "F63100", - "item": { - "host": "Unifi Protect NVR4", - "key": "incoming_bandwidth_moving_average_threshold" - } - } - ] - }, - { - "uuid": "a1b1190f8dfa4c9694f69132ea7027a2", + "uuid": "d09d7d135dfc49d0b35e2a0ed5d2ac20", "name": "Bandwidth", "graph_items": [ { "sortorder": "1", "color": "1A7C11", "item": { - "host": "Unifi UDMP", - "key": "download_bandwidth" + "host": "Unifi USG", + "key": "download_bandwidth_smooth" } }, { "sortorder": "2", "color": "F63100", "item": { - "host": "Unifi UDMP", - "key": "upload_bandwidth" + "host": "Unifi USG", + "key": "upload_bandwidth_smooth" } } ] @@ -6169,58 +6620,58 @@ ] }, { - "uuid": "347ef23ef5a94b629dabcc89b74331a0", + "uuid": "f7f3c8e61e564d0d9f8057f70d9c0072", "name": "CPU and Memory", "graph_items": [ { "sortorder": "1", "color": "1A7C11", "item": { - "host": "Unifi USG", - "key": "cpu_smooth" + "host": "Unifi UDMP", + "key": "cpu" } }, { "sortorder": "2", "color": "F63100", "item": { - "host": "Unifi USG", + "host": "Unifi UDMP", "key": "memory" } } ] }, { - "uuid": "f7f3c8e61e564d0d9f8057f70d9c0072", + "uuid": "77b6b90c95ee43ed89899a355d9449f0", "name": "CPU and Memory", "graph_items": [ { "sortorder": "1", "color": "1A7C11", "item": { - "host": "Unifi UDMP", - "key": "cpu" + "host": "Unifi Switch", + "key": "cpu_smooth" } }, { "sortorder": "2", "color": "F63100", "item": { - "host": "Unifi UDMP", + "host": "Unifi Switch", "key": "memory" } } ] }, { - "uuid": "77b6b90c95ee43ed89899a355d9449f0", + "uuid": "347ef23ef5a94b629dabcc89b74331a0", "name": "CPU and Memory", "graph_items": [ { "sortorder": "1", "color": "1A7C11", "item": { - "host": "Unifi Switch", + "host": "Unifi USG", "key": "cpu_smooth" } }, @@ -6228,7 +6679,7 @@ "sortorder": "2", "color": "F63100", "item": { - "host": "Unifi Switch", + "host": "Unifi USG", "key": "memory" } } @@ -6404,6 +6855,28 @@ } ] }, + { + "uuid": "32f787121dc94a769829896a44364785", + "name": "Total Embedded Switch Bandwidth", + "graph_items": [ + { + "sortorder": "1", + "color": "1A7C11", + "item": { + "host": "Unifi UDMP", + "key": "total_switch_rx_bandwidth" + } + }, + { + "sortorder": "2", + "color": "F63100", + "item": { + "host": "Unifi UDMP", + "key": "total_switch_tx_bandwidth" + } + } + ] + }, { "uuid": "160a7ded8ed04fbdba40c5126962be4a", "name": "Total Traffic", @@ -6415,6 +6888,14 @@ "host": "Unifi Switch", "key": "total_rx_bandwidth" } + }, + { + "sortorder": "2", + "color": "F63100", + "item": { + "host": "Unifi Switch", + "key": "total_rx_bandwidth" + } } ] }, diff --git a/zbx_export_templates.xml b/zbx_export_templates.xml index 4b82470..21d79e2 100644 --- a/zbx_export_templates.xml +++ b/zbx_export_templates.xml @@ -1,7 +1,7 @@ 5.4 - 2021-08-30T22:33:54Z + 2021-09-26T21:39:07Z 15155c95a3d048f4856272ae12fd42c5 @@ -2672,7 +2672,7 @@ avg(//IpExtInOctets,1h:now-7d) 0 0 TEXT - https://{HOST.NAME}:7443 + https://{HOST.NAME} HEADERS @@ -4721,6 +4721,82 @@ Additionally,. this will fill the OS version and the MAC address in the inventor + + ff07a3572bfa4f089c7abf60cdc45163 + Total Switch Rx Bandwidth + DEPENDENT + total_switch_rx_bandwidth + 0 + bps + Total Bandwidth Received by the 8 port switch embedded in the UDMP (ports 1-8) + + + JSONPATH + + $.port_table[?(@.port_idx < 9)].rx_bytes.sum() + + + + CHANGE_PER_SECOND + + + + + + MULTIPLIER + + 8 + + + + + mca-dump-short.sh["-d","{HOST.CONN}", "-u", "root", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "UDMP", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}"] + + + + Application + Traffic + + + + + 1ef97d3bf6b84e179d80ffe44c00bb40 + Total Switch Tx Bandwidth + DEPENDENT + total_switch_tx_bandwidth + 0 + bps + Total Bandwidth Sent by the 8 port switch embedded in the UDMP (ports 1-8) + + + JSONPATH + + $.port_table[?(@.port_idx < 9)].tx_bytes.sum() + + + + CHANGE_PER_SECOND + + + + + + MULTIPLIER + + 8 + + + + + mca-dump-short.sh["-d","{HOST.CONN}", "-u", "root", "-i", "{$UNIFI_SSH_PRIV_KEY_PATH}", "-t", "UDMP", "-p", "{$UNIFI_SSHPASS_PASSWORD_PATH}"] + + + + Application + Traffic + + + b5b81d4dab514d4680b987094da82541 Upload Bandwidth @@ -5065,111 +5141,486 @@ Additionally,. this will fill the OS version and the MAC address in the inventor - - - - {$UNIFI_USER} - root - AP Zabbix SSH Username - UDMP only supports root - - - - +