[Plugin] Network Stats


dorgan

Recommended Posts

Thank you.  Will check it out now :D

 

I am seeing this:

Untitled.png.5d5278183ab64a7d54282d17a8dc5cf5.png

 

Looks like there should be images on the left but I am not seeing them and nothing is coming up in the graph.  I dont know what the graph should look like so thats why I am posting this here.  On the plus side, it does appear to install without error.  :D

 

______________________________

 

Looks like I just needed to wait about 5 minutes for it to poll the data and add it.  Works fine!  Thank you!

 

Untitled.thumb.png.f48aa998d7bd02ab10e38c24db636316.png

Edited by danktankk
added new data
Link to comment
54 minutes ago, danktankk said:

Looks like I just needed to wait about 5 minutes for it to poll the data and add it.  Works fine!  Thank you!

Yeah one of these days I'll get around to writing a custom parser and image creator and not use the built in image generator, as it really doesn't look that great.

Link to comment
  • 3 weeks later...

I have added the ability to add pretty much any interface to be tracked.  I have also added the ability to add an alias to an interface that is used on the graphs.  I have found some information on how identify which veth interface maps to a given docker container, but it does not seem consistent, if someone knows an easy way, then maybe I can add this to the interface.

Settings-Page_2020-04-15.thumb.png.8d9f83c89b994a7f4fecf3a08c51ef25.png

 

Stats-Page_2020-04-15.thumb.png.dae2dd2ec31dfa1a0fd9ef62775139a7.png

Link to comment
I have added the ability to add pretty much any interface to be tracked.  I have also added the ability to add an alias to an interface that is used on the graphs.  I have found some information on how identify which veth interface maps to a given docker container, but it does not seem consistent, if someone knows an easy way, then maybe I can add this to the interface.imageproxy.php?img=&key=e5eec7c5c933ca16a412eab237de08e8def36275b4556b62c7e9c01c21a98843
Settings-Page_2020-04-15.thumb.png.8d9f83c89b994a7f4fecf3a08c51ef25.png
 
Stats-Page_2020-04-15.thumb.png.dae2dd2ec31dfa1a0fd9ef62775139a7.png
That looks amazing, I wish I could help. But I don't know much. I'll see the update soon and start using it

Sent from my Pixel 2 XL using Tapatalk

Link to comment
5 hours ago, cinereus said:

There's two broken links:

 

/plugins/networkstats/vnstat.php?i=bond0&s=y

/plugins/networkstats/vnstat.php?i=bond0&style=3&dh=h

If you just installed the plugin, it takes a couple minutes for it to gather data and display images.  But after a couple minutes it should show.

Link to comment
2 hours ago, cinereus said:

Yes.

 

image.png.20696874dda5cd77afc004eee4ace937.png

that is the most recent version... Hmm ok can you please do the following.  From the command line show me the output of the vnstat command, and also regarding the urls showing as broken, can you right click in your browser and open the link/image in a new tab, and then add &debug=1 to the url and show me the output of that as well.

Link to comment
/plugins/networkstats/vnstat.php?i=bond0&s=y&debug=1

vnstati -s -i bond0 -o /tmp/phpKevsWr



/plugins/networkstats/vnstat.php?i=bond0&style=3&dh=h

vnstati --style 3 -h -i bond0 -o /tmp/phpo2hUAX

 

That's very cool. Is the debug parameter universal?

 

root@fs:~# vnstat

                      rx      /      tx      /     total    /   estimated
 docker0: Not enough data available yet.
 erspan0: Not enough data available yet.
 eth0:
       Apr '20      1.57 GiB  /    2.44 GiB  /    4.00 GiB  /    5.24 GiB
     yesterday     69.28 MiB  /  106.30 MiB  /  175.58 MiB
         today      1.50 GiB  /    2.33 GiB  /    3.83 GiB  /    4.21 GiB

 eth1: Not enough data available yet.
 gre0: Not enough data available yet.
 gretap0: Not enough data available yet.
 ip_vti0: Not enough data available yet.
 lo: Not enough data available yet.
 tunl0: Not enough data available yet.
 veth00073b1: Not enough data available yet.
 veth0e1f563: Not enough data available yet.
 veth0e6806b: Not enough data available yet.
 veth1477f2e: Not enough data available yet.
 veth1cbc675: Not enough data available yet.
 veth2400941: Not enough data available yet.
 veth24aac09: Not enough data available yet.
 veth2692dbc: Not enough data available yet.
 veth2fdba7b: Not enough data available yet.
 veth551d1c1: Not enough data available yet.
 veth5ca9984: Not enough data available yet.
 veth5dd187d: Not enough data available yet.
 veth6c1dd40: Not enough data available yet.
 veth743f3bb: Not enough data available yet.
 veth8040f42: Not enough data available yet.
 vetha19bdfc: Not enough data available yet.
 vethab2bc05: Not enough data available yet.
 vethb31a5b1: Not enough data available yet.
 vethc20780b: Not enough data available yet.
 vethc3e5264: Not enough data available yet.
 vethd58d01f: Not enough data available yet.
 vethd973cb3: Not enough data available yet.
 vethe1c5d7d: Not enough data available yet.
 vethe3ce0c6: Not enough data available yet.
 vethee32d42: Not enough data available yet.
 vethf2f531e: Not enough data available yet.
 vethf56c2fd: Not enough data available yet.
 vethf5fb3a8: Not enough data available yet.
 vethfcd68fe: Not enough data available yet.
 virbr0: Not enough data available yet.

 

Link to comment
1 minute ago, cinereus said:

 


root@fs:~# vnstat

                      rx      /      tx      /     total    /   estimated
 docker0: Not enough data available yet.
 erspan0: Not enough data available yet.
 eth0:
       Apr '20      1.57 GiB  /    2.44 GiB  /    4.00 GiB  /    5.24 GiB
     yesterday     69.28 MiB  /  106.30 MiB  /  175.58 MiB
         today      1.50 GiB  /    2.33 GiB  /    3.83 GiB  /    4.21 GiB

 eth1: Not enough data available yet.
 gre0: Not enough data available yet.
 gretap0: Not enough data available yet.
 ip_vti0: Not enough data available yet.
 lo: Not enough data available yet.
 tunl0: Not enough data available yet.
 veth00073b1: Not enough data available yet.
 veth0e1f563: Not enough data available yet.
 veth0e6806b: Not enough data available yet.
 veth1477f2e: Not enough data available yet.
 veth1cbc675: Not enough data available yet.
 veth2400941: Not enough data available yet.
 veth24aac09: Not enough data available yet.
 veth2692dbc: Not enough data available yet.
 veth2fdba7b: Not enough data available yet.
 veth551d1c1: Not enough data available yet.
 veth5ca9984: Not enough data available yet.
 veth5dd187d: Not enough data available yet.
 veth6c1dd40: Not enough data available yet.
 veth743f3bb: Not enough data available yet.
 veth8040f42: Not enough data available yet.
 vetha19bdfc: Not enough data available yet.
 vethab2bc05: Not enough data available yet.
 vethb31a5b1: Not enough data available yet.
 vethc20780b: Not enough data available yet.
 vethc3e5264: Not enough data available yet.
 vethd58d01f: Not enough data available yet.
 vethd973cb3: Not enough data available yet.
 vethe1c5d7d: Not enough data available yet.
 vethe3ce0c6: Not enough data available yet.
 vethee32d42: Not enough data available yet.
 vethf2f531e: Not enough data available yet.
 vethf56c2fd: Not enough data available yet.
 vethf5fb3a8: Not enough data available yet.
 vethfcd68fe: Not enough data available yet.
 virbr0: Not enough data available yet.

 

Looking at this, it doesnt look like you have a bond0 interface.  What i would suggest is going into settings and doing the following:

If you have a bond0, remove it, hit save, add it then hit save again
if you do NOT have a bond0 try just hitting save and see if that gets rid of it.

  • Thanks 1
Link to comment
1 hour ago, dorgan said:

Looking at this, it doesnt look like you have a bond0 interface. 


if you do NOT have a bond0 try just hitting save and see if that gets rid of it.

Thanks. That's what I though (I did have one previously if that helps you debug).

 

Your suggestion did the job! :)

Link to comment
  • 1 month later...
  • 4 weeks later...
  • 2 weeks later...
On 4/15/2020 at 6:54 PM, dorgan said:

I have added the ability to add pretty much any interface to be tracked.  I have also added the ability to add an alias to an interface that is used on the graphs.  I have found some information on how identify which veth interface maps to a given docker container, but it does not seem consistent, if someone knows an easy way, then maybe I can add this to the interface.imageproxy.php?img=&key=e5eec7c5c933ca16

Hi, thanks for the plugin. This post https://forums.docker.com/t/relationship-between-interface-vethxxxxx-and-container/12872/25 explains how to correlate "vethxxxxx" interfaces and "docker".
This post also have some script that might  help you on the development.

 

Link to comment
  • 4 weeks later...

I have began having an odd problem where my Network Stats are not working.  They say

"vnstat service must berunning STARTED to view network stats."

 

So I checked:

/etc/rc.d/rc.vnstat start

 

received: 

Error: Not enough free diskspace available in "/var/lib/vnstat/", exiting.

 

My array/cache/ has plenty of space far beyond any need this would have so I checked:

ls -l /var/lib/vnstat
total 4
-rw-r--r-- 1 root root 0 Jul 29 16:49 vnstat.db
 

Any ideas?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.