Skip to content

Commit

Permalink
Updated Speedtest and Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
rbicelli committed Apr 27, 2024
1 parent fb04b0c commit 401ca70
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 32 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@

This is a pfSense active template for Zabbix, based on Standard Agent and a php script using pfSense functions library for monitoring specific data.

Tested with pfSense 2.7.x, Zabbix 6.0.

Tested with pfSense 2.5.x, Zabbix 4.0, Zabbix 5.0, Zabbix 6.0
I'm actively maintaning only template only for the current LTS Zabbix Template. Newest features will be explicitily added on current LTS.

## What it does

Expand All @@ -19,6 +20,7 @@ Tested with pfSense 2.5.x, Zabbix 4.0, Zabbix 5.0, Zabbix 6.0
- Basic Service Discovery and Monitoring (Service Status)
- pfSense Version/Update Available
- Packages Update Available
- Certificate Discovery and Monitoring

**Template pfSense Active: OpenVPN Server User Auth**

Expand All @@ -33,6 +35,7 @@ Tested with pfSense 2.5.x, Zabbix 4.0, Zabbix 5.0, Zabbix 6.0
**Template pfSense Active: Speedtest**

- Discovery of WAN Interfaces
- Discover public IP Address/ISP Name of WAN Interfaces
- Perform speed tests and collect metrics


Expand Down
2 changes: 1 addition & 1 deletion pfsense_zbx.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

//For DHCP

//backporting php 8 functions
//Backporting php 8 functions
if (!function_exists('str_contains')){

function str_contains($haystack,$needle){
Expand Down
74 changes: 44 additions & 30 deletions zabbix6/pfsense_active_speedtest.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,60 @@
zabbix_export:
version: '6.0'
date: '2023-02-26T13:20:29Z'
date: '2024-04-27T15:16:18Z'
groups:
-
uuid: 4918b88734c54bd094cff7585b5d71fc
- uuid: 4918b88734c54bd094cff7585b5d71fc
name: 'Templates/Network Devices'
templates:
-
uuid: 1c7cba22540d4c10a5ee14c2b25223ca
- uuid: 1c7cba22540d4c10a5ee14c2b25223ca
template: 'pfSense Active Speedtest'
name: 'pfSense Active: Speedtest'
description: |
Extension for pfSense Active Template.
Executes Speedtests on WAN Interfaces.
Requires pfsense_zbx.php installed to pfSense Box.
Version 1.0.5
Version 0.24.04
https://github.com/rbicelli/pfsense-zabbix-template
groups:
-
name: 'Templates/Network Devices'
- name: 'Templates/Network Devices'
discovery_rules:
-
uuid: 40288914aa9742adb93120c367263690
- uuid: 40288914aa9742adb93120c367263690
name: 'WAN Interfaces'
type: ZABBIX_ACTIVE
key: 'pfsense.discovery[wan]'
delay: 300s
description: 'Discover WAN Interfaces'
item_prototypes:
-
uuid: a79d28cf3f3b4981b59f571117e64d24
- uuid: 07312f1cfd424a0eb65b5b45c2c2582d
name: 'Speedtest publc IP address of {#IFDESCR}'
type: ZABBIX_ACTIVE
key: 'pfsense.value[if_speedtest_value,{#IFNAME},client.ip]'
delay: 1h
trends: '0'
value_type: TEXT
description: 'Public IP Address'
tags:
- tag: Application
value: 'Network interfaces'
trigger_prototypes:
- uuid: d7f05a232f004f0b8c2a974666a31c55
expression: 'last(/pfSense Active Speedtest/pfsense.value[if_speedtest_value,{#IFNAME},client.ip],#1)<>last(/pfSense Active Speedtest/pfsense.value[if_speedtest_value,{#IFNAME},client.ip],#2)'
name: 'Publc IP address of {#IFDESCR} has changed'
priority: INFO
description: 'Public IP Address has changed.'
- uuid: b1bef62fecb840c2bf9eb081da8fa3f7
name: 'Speedtest ISP name of {#IFDESCR}'
type: ZABBIX_ACTIVE
key: 'pfsense.value[if_speedtest_value,{#IFNAME},client.isp]'
delay: 1h
trends: '0'
value_type: TEXT
description: 'ISP Name'
tags:
- tag: Application
value: 'Network interfaces'
- uuid: a79d28cf3f3b4981b59f571117e64d24
name: 'Speedtest Download on {#IFDESCR}'
type: ZABBIX_ACTIVE
key: 'pfsense.value[if_speedtest_value,{#IFNAME},download]'
Expand All @@ -40,11 +63,9 @@ zabbix_export:
units: bps
description: 'Download speed determined by Ookla Speedtest package'
tags:
-
tag: Application
- tag: Application
value: 'Network interfaces'
-
uuid: 52b640fcdf484b538f85bf32d2afbcf3
- uuid: 52b640fcdf484b538f85bf32d2afbcf3
name: 'Speedtest Ping on {#IFDESCR}'
type: ZABBIX_ACTIVE
key: 'pfsense.value[if_speedtest_value,{#IFNAME},ping]'
Expand All @@ -53,11 +74,9 @@ zabbix_export:
units: ms
description: 'Ping determined by Ookla Speedtest package'
tags:
-
tag: Application
- tag: Application
value: 'Network interfaces'
-
uuid: 4bd063f24e554832b59bfa2231d53bf1
- uuid: 4bd063f24e554832b59bfa2231d53bf1
name: 'Speedtest Upload on {#IFDESCR}'
type: ZABBIX_ACTIVE
key: 'pfsense.value[if_speedtest_value,{#IFNAME},upload]'
Expand All @@ -66,30 +85,25 @@ zabbix_export:
units: bps
description: 'Ping determined by Ookla Speedtest package'
tags:
-
tag: Application
- tag: Application
value: 'Network interfaces'
graph_prototypes:
-
uuid: 74cdea0b8136495496bb90593bd78a59
- uuid: 74cdea0b8136495496bb90593bd78a59
name: 'Speedtest metrics on {#IFDESCR}'
graph_items:
-
sortorder: '1'
- sortorder: '1'
color: 199C0D
calc_fnc: ALL
item:
host: 'pfSense Active Speedtest'
key: 'pfsense.value[if_speedtest_value,{#IFNAME},download]'
-
sortorder: '2'
- sortorder: '2'
color: FFFF00
calc_fnc: ALL
item:
host: 'pfSense Active Speedtest'
key: 'pfsense.value[if_speedtest_value,{#IFNAME},upload]'
-
sortorder: '3'
- sortorder: '3'
color: 0040FF
calc_fnc: ALL
item:
Expand Down

0 comments on commit 401ca70

Please sign in to comment.