Scheduled maintenance: Community available only in read-only mode until 6:00 AM (PT)
New Member
Posts: 7
Registered: ‎01-19-2017

UniFi Switch Port Statistics (Insights)

Hi Everyone,

I was wondering how people are finding UniFi Switch Port statistics/insights (with a UniFi controller), specifically data usage of each port?

I have a project where the end user wants to be able to review each port at the end of each month/period of time and was wondering if any users could share some feedback?

Looking at demo.ubnt.com, Insights: Switch Stats, this is all that is needed.

Is there a way for counters to only show the current month's TX/RX data?

Thanks for your time!

Member
Posts: 140
Registered: ‎10-18-2015
Kudos: 38
Solutions: 6

Re: UniFi Switch Port Statistics (Insights)

[ Edited ]

I didnt find the option to show montly stats, maybe something for the future.

 

Maybe if you go to "Statistics -> Select Switch Stats change the period you want to see.

SuperUser
Posts: 9,601
Registered: ‎01-10-2012
Kudos: 6208
Solutions: 387

Re: UniFi Switch Port Statistics (Insights)

[ Edited ]

 I just noticed this the other day - on the insights page if you pick Switch Stats then Counters there are detailed per -port stats.

 

But there is no way to filter by date!  All you can do is reset all the counters.  And then it doesn't even date/time stamp when you reset them, so good luck using that for any kind of analysis.  

 

Hopefully it's something they can flesh out because it could be pretty powerfull.  Right now it's just good for some short duration troubleshoot - not long term analysis.  


If you can spin up virtual machines pretty easily (or just have an old PC laying around) Observium is really cool and here's an appliance build of it - pretty much install and run:  https://www.turnkeylinux.org/observium 

 

Observium will give you what you are looking for and more.  I also need to get busy and finish configuring my graylog server - remote system logging is the single biggest security tool you can have.  Park and EdgeRouter light in front of it and block all but logging traffic - any hacking in your network will still get logged up until the time they disable logging on compromised devices.  But at least they wont' be able to delete/tamper with the ones on your logging server.

 

EDIT:  The guy that runs Observium is a jerk - I'd now recommend http://www.librenms.org instead. Unfortunately they don't have a Turnkeylinux install for Librenms - luckily it's pretty easy to install. And a lot more flexible than Observium to boot!

When you receive a solution to your question/issue, don't forget to mark your thread as solved and to give kudo's to the people who have helped you out!

Having wifi problems? Take a look here first: https://help.ubnt.com/hc/en-us/articles/221029967-UniFi-Debugging-Intermittent-Connectivity-Issues-on-your-UAP
New Member
Posts: 7
Registered: ‎01-19-2017

Re: UniFi Switch Port Statistics (Insights)

Thanks for your responses Eric and Stefan!

 

I couldn't find the way to change the period of stats when viewing port statistics (as Eric has stated). The ability to reset counters should suffice - the client just wants a very rough idea as to where internet usage goes.

 

Thanks for the Observium recommendation too! I'll have to look into it. There's many cool 3rd party tools out that makes network diagnostics so much easier! Just gotta find what's the best option at the time Man Happy

Ubiquiti Employee
Posts: 5,249
Registered: ‎08-08-2016
Kudos: 5985
Solutions: 360

Re: UniFi Switch Port Statistics (Insights)


@EricE wrote:

 I just noticed this the other day - on the insights page if you pick Switch Stats then Counters there are detailed per -port stats.

 

But there is no way to filter by date!  All you can do is reset all the counters.  And then it doesn't even date/time stamp when you reset them, so good luck using that for any kind of analysis.  

 


The Statistics page has a Switch Stats section that gives you per-hour throughput per port, and lets you go back into the past. More granular stats are coming. 

Veteran Member
Posts: 4,871
Registered: ‎03-11-2013
Kudos: 1585
Solutions: 94

Re: UniFi Switch Port Statistics (Insights)

[ Edited ]

@UBNT-cmb wrote:
The Statistics page has a Switch Stats section that gives you per-hour throughput per port, and lets you go back into the past. More granular stats are coming. 

Are you aware that Pentaho has a free community edition, and that it may be embedded in other software products, and it makes doing drill down and dashboards much simpler? Plus they understand statistics. Let me guess UBNT could do with an experienced developer with a background in data analytics and BI.

New Member
Posts: 1
Registered: ‎10-05-2016
Kudos: 1

Re: UniFi Switch Port Statistics (Insights)

Get into the CLI using SSH or the Debug Terminal under Configuration.

 

swctrl -d port

It will show you a bunch of statistics, but unfortunately no errors.

 

Other interesting command options:

 

swctrl -d cable 

Shows cable lengths

 

swctrl -d poe

Shows power stats

 

Good luck!

Marijn

 

SuperUser
Posts: 9,601
Registered: ‎01-10-2012
Kudos: 6208
Solutions: 387

Re: UniFi Switch Port Statistics (Insights)

@UBNT-AlexCaldas - this is the kind of stuff perfect for the CLI troubleshooting guide!

When you receive a solution to your question/issue, don't forget to mark your thread as solved and to give kudo's to the people who have helped you out!

Having wifi problems? Take a look here first: https://help.ubnt.com/hc/en-us/articles/221029967-UniFi-Debugging-Intermittent-Connectivity-Issues-on-your-UAP
Ubiquiti Employee
Posts: 1,021
Registered: ‎12-21-2015
Kudos: 392
Solutions: 27

Re: UniFi Switch Port Statistics (Insights)

Excellent @EricE, I've started a document to track these!

UBNT_Alternate_Logo.png
Help Center & Translation Projects


If you haven't read our User Guides, you haven't lived yet. Find the UniFi Controller User Guide and other product user guides on our Downloads page!

Established Member
Posts: 1,571
Registered: ‎08-20-2012
Kudos: 862
Solutions: 20

Re: UniFi Switch Port Statistics (Insights)

[ Edited ]

@UBNT-AlexCaldas wrote:

Excellent @EricE, I've started a document to track these!


Happy new year etc.

Is there any updates on this? Might 2018 be the year of the "Hitchhikers guide to the UniFi CLI" Man Happy 

Ubiquiti Employee
Posts: 1,021
Registered: ‎12-21-2015
Kudos: 392
Solutions: 27

Re: UniFi Switch Port Statistics (Insights)

Happy New Year and etc to you too @rdahlinSmiley LOL Not yet, but lots of points for the book reference!!!! Man LOL Also, 2018 is just beginning, who knows what it has in store for us.

UBNT_Alternate_Logo.png
Help Center & Translation Projects


If you haven't read our User Guides, you haven't lived yet. Find the UniFi Controller User Guide and other product user guides on our Downloads page!

Emerging Member
Posts: 74
Registered: ‎10-08-2014
Kudos: 3
Solutions: 1

Re: UniFi Switch Port Statistics (Insights)

Is there a way to view RX/TX error count on unifi switch ports yet?  Or even on an APs port?