Zabbix template updated

This commit is contained in:
Pavel Muhortov 2023-08-16 14:17:57 +03:00
parent 60b93e8dcb
commit 2c70d9c5bd
2 changed files with 9 additions and 20 deletions

27
OpenVPN_by_Zabbix_agent.yaml Normal file → Executable file
View File

@ -1,6 +1,6 @@
zabbix_export: zabbix_export:
version: '6.0' version: '6.0'
date: '2023-07-27T14:32:21Z' date: '2023-08-16T11:10:16Z'
groups: groups:
- -
uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6 uuid: a571c0d144b14fd4a87a9d9b2aa9fcd6
@ -480,8 +480,8 @@ zabbix_export:
type: ITEM type: ITEM
name: itemid name: itemid
value: value:
key: ovpn.expiration.ca
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
key: ovpn.expiration.ca
- -
type: ITEM type: ITEM
x: '6' x: '6'
@ -492,8 +492,8 @@ zabbix_export:
type: ITEM type: ITEM
name: itemid name: itemid
value: value:
key: ovpn.expiration.cert
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
key: ovpn.expiration.cert
- -
type: GRAPH_CLASSIC type: GRAPH_CLASSIC
'y': '2' 'y': '2'
@ -505,8 +505,8 @@ zabbix_export:
type: GRAPH type: GRAPH
name: graphid name: graphid
value: value:
name: 'OpenVPN certificates expiration'
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
name: 'OpenVPN certificates expiration'
- -
name: Clients name: Clients
widgets: widgets:
@ -519,8 +519,8 @@ zabbix_export:
type: ITEM type: ITEM
name: itemid name: itemid
value: value:
key: ovpn.stats.clients_count
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
key: ovpn.stats.clients_count
- -
type: ITEM type: ITEM
x: '6' x: '6'
@ -531,8 +531,8 @@ zabbix_export:
type: ITEM type: ITEM
name: itemid name: itemid
value: value:
key: ovpn.stats.clients_found
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
key: ovpn.stats.clients_found
- -
type: GRAPH_PROTOTYPE type: GRAPH_PROTOTYPE
'y': '7' 'y': '7'
@ -547,8 +547,8 @@ zabbix_export:
type: GRAPH_PROTOTYPE type: GRAPH_PROTOTYPE
name: graphid name: graphid
value: value:
name: 'OpenVPN client "{#OVPN_CLIENT_NAME}" traffic'
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
name: 'OpenVPN client "{#OVPN_CLIENT_NAME}" traffic'
- -
type: GRAPH_CLASSIC type: GRAPH_CLASSIC
'y': '2' 'y': '2'
@ -560,19 +560,8 @@ zabbix_export:
type: GRAPH type: GRAPH
name: graphid name: graphid
value: value:
name: 'OpenVPN clients sum'
host: 'OpenVPN by Zabbix agent' host: 'OpenVPN by Zabbix agent'
- name: 'OpenVPN clients sum'
type: URL
x: '11'
width: '13'
height: '12'
hide_header: 'YES'
fields:
-
type: STRING
name: url
value: '/zabbix.php?name=virtual ip&tags%5B0%5D%5Btag%5D=Application&tags%5B0%5D%5Boperator%5D=0&tags%5B0%5D%5Bvalue%5D=OpenVPN&show_tags=0&action=latest.view&kiosk=1'
triggers: triggers:
- -
uuid: 022e1211349c48a4be951588cda2dba0 uuid: 022e1211349c48a4be951588cda2dba0

View File

@ -19,7 +19,7 @@ def status(stats_file: str, client_filter: str = '.*', client_geo: bool = False)
Args: Args:
stats_file (str): path to OpenVPN status log file. stats_file (str): path to OpenVPN status log file.
client_filter (str, optional): client names filter by regex. Defaults to '.*'. client_filter (str, optional): client names filter by regex. Defaults to '.*'.
client_geo (bool, optional): check client real ip geo location Defaults to False. client_geo (bool, optional): check client real ip geo location. Defaults to False.
Returns: Returns:
dict: { dict: {