rbicelli / pfsense-zabbix-template

Zabbix Template for pfSense
Apache License 2.0
240 stars 107 forks source link

Template SpeedTest #117

Closed WesleyCRibeiro closed 2 years ago

WesleyCRibeiro commented 2 years ago

Hi

I'm using Pfsense 2.6 CE , and zabbix 6 , in speedtest tests it runs, runs normally, creates cron, no problems or alerts,

However, I noticed that when executing the first time, it stores the "real" information of the test, download, upload, ping, but when executing it again, either by scheduling or manual time, it simply duplicates the value collected the first time, see an example of the ping

image

I'm new to this scenario so if I'm saying something really silly, please forgive me, rsrs

GuillaumeHullin commented 2 years ago

No you are correct. The actual speed check is done every 8h. And the values are stored in a temp text file and are pulled based on Zabbix interval. The main reason it is like that is to prevent Zabbix timeout (because a speediest will take time).

WesleyCRibeiro commented 2 years ago

@GuillaumeHullin thanks for the clarification, really after 8 hours I had a new collection,

A doubt is it possible to "report" to zabbix so just do a collection/update every 8 hours? or change this to 1 hour (the "true" collection)

It cost!

GuillaumeHullin commented 2 years ago

@WesleyCRibeiro right now it's collected every 30min (what's on your side?)... I don't remember why exactly it was kept this low but I think it is to have a graph connected when you look from Latest Data.

rbicelli commented 2 years ago

Hello, you can vary the speedtest interval simply changing the line in pfsense_zbx.php

define('SPEEDTEST_INTERVAL', 8); //Speedtest Interval (in hours)

I'm not sure but in Zabbix 6 looks like you can pass macro values to items. If yes I will modify the script in order to get the value from a host macro I'll put in the template.

I choose to do the sppedtest every 8 hours because for my needs (and I think almost all of us) twice tests a day could deliver good insights for a wan interface.

However I'm seeing empty gaps in speedtest graph, wich I'm planning to resolve in the next release of the template.

WesleyCRibeiro commented 2 years ago

Hi yes, I was reading the script and saw this line, I followed your instructions and now we have collections every hour, Thanks!!