Gateway statistics location on filesystem
-
Hello,
I need to write a script that stores statistics for gateway uptime, ping delay and packet loss. Since pfSense already measures the data in a very nice way, I'd like to just reuse it rather than measuring it myself.
Does anyone know where this data is stored to be shown on the web configurator?Thanks.
-
You might want to look at Status -> Monitoring which will allow you to graph the values you are looking for. Click on the wrench to adjust time over which the graph is displayed.
-
You might want to look at Status -> Monitoring which will allow you to graph the values you are looking for. Click on the wrench to adjust time over which the graph is displayed.
Thanks, I did not know about that tab. That's pretty useful.
I'd still like to get the raw data though, I want to make it available to other people in the company without giving them access to pfSense. -
The data is in an RRD file. You can copy it off host if you need.
-
An alternative is : use Munin or comparable.
I just activated some plugins, far more exists : https://www.test-domaine.fr/munin/brit-hotel-fumel.net/pfsense.brit-hotel-fumel.net/index.html
My Munin is running on a server on the net, collecting 3 nodes, and one of them is my pfSense box. -
If you are so inclined, there are collection scripts in the dpinger distribution that will collect the statistics off host as well. Dpinger is what pfSense uses to monitor the WAN connection and collect statistics about it.
-
For anyone that could need this, statistics can be easily extracted with a PHP script calling into this function (hope it is ok to link to pfSense source code):
https://github.com/pfsense/pfsense/blob/bafd63b5d95054adcf97720a716e027cad0b17d4/src/etc/inc/gwlb.inc#L402