Traffic Stats

Started by zuperman, March 23, 2017, 01:51:58 PM

Previous topic - Next topic
Hi,
I haven't really found a satisfying solution yet with OPNSense, but how can I quickly see the traffic/bandwith usage on a daily, monthly and hourly basis?

IPFire has a simple and nice on based on vnstat, pfsense introduced something similar (but not so fancy) - and OPNSense..?

I do not need detailes statistics on hosts, IPs, ports etc.
Simply on my WAN interfaces.

Hello,

A year ago this was made and not a single reply, vnstat (vnstati) like statistics would make this firewall even better imo.

+1

maybe there should be a pool who wants this implemented

What's wrong with using an external solution where you can get the results in the format you want? You can do that with the Telegraf plug-in sending the data to Grafana and then building your own graphs, I do.
Regards


Bill

Quote from: phoenix on March 18, 2018, 01:41:03 PM
You can do that with the Telegraf plug-in sending the data to Grafana and then building your own graphs.

Hi Bill,

That would make a great addition to the Tutorials and FAQ section of the forum

Bart...

Quote from: phoenix on March 18, 2018, 01:41:03 PM
What's wrong with using an external solution where you can get the results in the format you want? You can do that with the Telegraf plug-in sending the data to Grafana and then building your own graphs, I do.

Hello,

Thanks for your reply, there is nothing wrong with exporting data and using external devices, but why can this be done in one device? why there has to be something on top of something doing something to get what people ask for and want? this is not the first request here to have in-house per month/day/week stats.

Thanks

+1

Just moved from pfsense to opnsense.  Been lurking the project since the fork.  Its been an impressive amount of work.  Good job and thanks to all those involved.

I have installed vnstat with a gui on my setup - its pretty much duct taped on.

I installed the vnstat package from the official repo, configured/restored dbs from pfsense backup.
Grabbed a copy of https://github.com/bjd/vnstat-php-frontend  named it vnstat and put it in /usr/local/www/

https://192.168.x.1/vnstat



This bypasses authentication!


Id imagine this puts a nice big gaping security risk on the web server as unauthenticated php is running on the otherwise carefully secured opnsense webserver.  I would definitely not use this if I was accessing the front end:443 from WAN.

I find the risk bearable for myself on this network but would love to see an official plugin.

I might poke around os-helloworld plugin but thats a very a big might right now and Im not sure I've got the chops.

Have a look at the first few lines of index.php in your vnstat folder.


You'll see this:


    require 'config.php';
    require 'localize.php';
    require 'vnstat.php';



Edit it so it looks like this:


    require_once("/usr/local/www/guiconfig.inc");
    require 'config.php';
    require 'localize.php';
    require 'vnstat.php';



Now try going directly to the pages without logging in first.
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member

Quote from: marjohn56 on June 20, 2018, 12:25:00 PM
Have a look at the first few lines of index.php in your vnstat folder.
....

    require_once("/usr/local/www/guiconfig.inc");
....

works like a charm.  Cheers!