Skip to content

Commit

Permalink
using more reliable metric for VPN bandwidth
Browse files Browse the repository at this point in the history
  • Loading branch information
patricegautier committed Oct 1, 2021
1 parent 0378af6 commit 5751dec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 85 deletions.
38 changes: 7 additions & 31 deletions zbx_export_templates.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"zabbix_export": {
"version": "5.4",
"date": "2021-09-26T21:39:09Z",
"date": "2021-10-01T20:15:14Z",
"groups": [
{
"uuid": "15155c95a3d048f4856272ae12fd42c5",
Expand Down Expand Up @@ -5118,7 +5118,7 @@
"delay": "0",
"item_prototypes": [
{
"uuid": "cad8d443b86d43ebb33c90541668565d",
"uuid": "c797de40215b4b99a2e6fec77cbf6d6e",
"name": "Remote Site Rx Bandwidth - {#REMOTE_SITE_IP}",
"type": "DEPENDENT",
"key": "remote_site_rx_bandwitdh[{#REMOTE_SITE_IP}]",
Expand All @@ -5128,19 +5128,7 @@
{
"type": "JSONPATH",
"parameters": [
"$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].rxBytes.first()"
]
},
{
"type": "CHANGE_PER_SECOND",
"parameters": [
""
]
},
{
"type": "MULTIPLIER",
"parameters": [
"8"
"$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].rxRate.first()"
]
}
],
Expand All @@ -5155,7 +5143,7 @@
]
},
{
"uuid": "f1d38f4931a640e49b8c68d027d5f968",
"uuid": "699f174819c64cf79820addab60c3a67",
"name": "Remote Site Tx Bandwidth - {#REMOTE_SITE_IP}",
"type": "DEPENDENT",
"key": "remote_site_tx_bandwitdh[{#REMOTE_SITE_IP}]",
Expand All @@ -5165,19 +5153,7 @@
{
"type": "JSONPATH",
"parameters": [
"$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].txBytes.first()"
]
},
{
"type": "CHANGE_PER_SECOND",
"parameters": [
""
]
},
{
"type": "MULTIPLIER",
"parameters": [
"8"
"$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].txRate.first()"
]
}
],
Expand All @@ -5194,8 +5170,8 @@
],
"graph_prototypes": [
{
"uuid": "3195d5951a92422bb2a2c992ab0cb348",
"name": "Remote Site Bandwidth {#REMOTE_SITE_IP}",
"uuid": "25bf1af2bd6b4629bd724b6251d197c1",
"name": "Remote Site Bandwidth - {#REMOTE_SITE_IP}",
"graph_items": [
{
"sortorder": "1",
Expand Down
38 changes: 7 additions & 31 deletions zbx_export_templates.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<zabbix_export>
<version>5.4</version>
<date>2021-09-26T21:39:07Z</date>
<date>2021-10-01T20:15:12Z</date>
<groups>
<group>
<uuid>15155c95a3d048f4856272ae12fd42c5</uuid>
Expand Down Expand Up @@ -5149,7 +5149,7 @@ Additionally,. this will fill the OS version and the MAC address in the inventor
<delay>0</delay>
<item_prototypes>
<item_prototype>
<uuid>cad8d443b86d43ebb33c90541668565d</uuid>
<uuid>c797de40215b4b99a2e6fec77cbf6d6e</uuid>
<name>Remote Site Rx Bandwidth - {#REMOTE_SITE_IP}</name>
<type>DEPENDENT</type>
<key>remote_site_rx_bandwitdh[{#REMOTE_SITE_IP}]</key>
Expand All @@ -5159,19 +5159,7 @@ Additionally,. this will fill the OS version and the MAC address in the inventor
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].rxBytes.first()</parameter>
</parameters>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<parameters>
<parameter/>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>8</parameter>
<parameter>$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].rxRate.first()</parameter>
</parameters>
</step>
</preprocessing>
Expand All @@ -5186,7 +5174,7 @@ Additionally,. this will fill the OS version and the MAC address in the inventor
</tags>
</item_prototype>
<item_prototype>
<uuid>f1d38f4931a640e49b8c68d027d5f968</uuid>
<uuid>699f174819c64cf79820addab60c3a67</uuid>
<name>Remote Site Tx Bandwidth - {#REMOTE_SITE_IP}</name>
<type>DEPENDENT</type>
<key>remote_site_tx_bandwitdh[{#REMOTE_SITE_IP}]</key>
Expand All @@ -5196,19 +5184,7 @@ Additionally,. this will fill the OS version and the MAC address in the inventor
<step>
<type>JSONPATH</type>
<parameters>
<parameter>$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].txBytes.first()</parameter>
</parameters>
</step>
<step>
<type>CHANGE_PER_SECOND</type>
<parameters>
<parameter/>
</parameters>
</step>
<step>
<type>MULTIPLIER</type>
<parameters>
<parameter>8</parameter>
<parameter>$.vpn[*].remotes[?(@.ip == '{#REMOTE_SITE_IP}')].txRate.first()</parameter>
</parameters>
</step>
</preprocessing>
Expand All @@ -5225,8 +5201,8 @@ Additionally,. this will fill the OS version and the MAC address in the inventor
</item_prototypes>
<graph_prototypes>
<graph_prototype>
<uuid>3195d5951a92422bb2a2c992ab0cb348</uuid>
<name>Remote Site Bandwidth {#REMOTE_SITE_IP}</name>
<uuid>25bf1af2bd6b4629bd724b6251d197c1</uuid>
<name>Remote Site Bandwidth - {#REMOTE_SITE_IP}</name>
<graph_items>
<graph_item>
<sortorder>1</sortorder>
Expand Down
30 changes: 7 additions & 23 deletions zbx_export_templates.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
zabbix_export:
version: '5.4'
date: '2021-09-26T21:39:05Z'
date: '2021-10-01T20:15:09Z'
groups:
-
uuid: 15155c95a3d048f4856272ae12fd42c5
Expand Down Expand Up @@ -3831,7 +3831,7 @@ zabbix_export:
delay: '0'
item_prototypes:
-
uuid: cad8d443b86d43ebb33c90541668565d
uuid: c797de40215b4b99a2e6fec77cbf6d6e
name: 'Remote Site Rx Bandwidth - {#REMOTE_SITE_IP}'
type: DEPENDENT
key: 'remote_site_rx_bandwitdh[{#REMOTE_SITE_IP}]'
Expand All @@ -3841,23 +3841,15 @@ zabbix_export:
-
type: JSONPATH
parameters:
- '$.vpn[*].remotes[?(@.ip == ''{#REMOTE_SITE_IP}'')].rxBytes.first()'
-
type: CHANGE_PER_SECOND
parameters:
- ''
-
type: MULTIPLIER
parameters:
- '8'
- '$.vpn[*].remotes[?(@.ip == ''{#REMOTE_SITE_IP}'')].rxRate.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: f1d38f4931a640e49b8c68d027d5f968
uuid: 699f174819c64cf79820addab60c3a67
name: 'Remote Site Tx Bandwidth - {#REMOTE_SITE_IP}'
type: DEPENDENT
key: 'remote_site_tx_bandwitdh[{#REMOTE_SITE_IP}]'
Expand All @@ -3867,15 +3859,7 @@ zabbix_export:
-
type: JSONPATH
parameters:
- '$.vpn[*].remotes[?(@.ip == ''{#REMOTE_SITE_IP}'')].txBytes.first()'
-
type: CHANGE_PER_SECOND
parameters:
- ''
-
type: MULTIPLIER
parameters:
- '8'
- '$.vpn[*].remotes[?(@.ip == ''{#REMOTE_SITE_IP}'')].txRate.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:
Expand All @@ -3884,8 +3868,8 @@ zabbix_export:
value: Traffic
graph_prototypes:
-
uuid: 3195d5951a92422bb2a2c992ab0cb348
name: 'Remote Site Bandwidth {#REMOTE_SITE_IP}'
uuid: 25bf1af2bd6b4629bd724b6251d197c1
name: 'Remote Site Bandwidth - {#REMOTE_SITE_IP}'
graph_items:
-
sortorder: '1'
Expand Down

0 comments on commit 5751dec

Please sign in to comment.