OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Traffic Stats
« previous next »
  • Print
Pages: [1]

Author Topic: Traffic Stats  (Read 9190 times)

zuperman

  • Newbie
  • *
  • Posts: 1
  • Karma: 0
    • View Profile
Traffic Stats
« on: March 23, 2017, 01:51:58 pm »
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.
Logged

slick

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Traffic Stats
« Reply #1 on: March 18, 2018, 01:29:56 pm »
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
Logged

phoenix

  • Hero Member
  • *****
  • Posts: 545
  • Karma: 58
    • View Profile
Re: Traffic Stats
« Reply #2 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.
Logged
Regards


Bill

bartjsmit

  • Hero Member
  • *****
  • Posts: 2023
  • Karma: 194
    • View Profile
Re: Traffic Stats
« Reply #3 on: March 18, 2018, 01:46:14 pm »
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...
Logged

slick

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
    • View Profile
Re: Traffic Stats
« Reply #4 on: March 18, 2018, 01:51:14 pm »
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
Logged

sudzee

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Traffic Stats
« Reply #5 on: June 20, 2018, 09:00:27 am »
+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.
Logged

marjohn56

  • Hero Member
  • *****
  • Posts: 1701
  • Karma: 179
    • View Profile
Re: Traffic Stats
« Reply #6 on: June 20, 2018, 12:25:00 pm »
Have a look at the first few lines of index.php in your vnstat folder.


You'll see this:


Code: [Select]
    require 'config.php';
    require 'localize.php';
    require 'vnstat.php';


Edit it so it looks like this:


Code: [Select]
    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.
Logged
OPNsense 24.7 - Qotom Q355G4 - ISP - Squirrel 1Gbps.

Team Rebellion Member - If we've helped you remember to applaud

sudzee

  • Newbie
  • *
  • Posts: 4
  • Karma: 0
    • View Profile
Re: Traffic Stats
« Reply #7 on: June 20, 2018, 07:45:35 pm »
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.
....

Code: [Select]
    require_once("/usr/local/www/guiconfig.inc");....

works like a charm.  Cheers!

Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • General Discussion »
  • Traffic Stats
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2