[Plugin] Network Stats


dorgan

Recommended Posts

If you must store within appdata, then your best bet would be the default appdata location that can be found within /boot/config/docker.cfg


Definitely will update to this. What’s being stored besides the cfg is the actual data for vnstat, as keeping it in the default location was causing it to be deleted on reboot.
Link to comment
I have the 9/29/2018 version running and then did the 2018.10.06c update. Not the vnstat is no longer running. 
 
I did go to the plugin settings and tried to click "Start". No luck.

I think it’s because of the hard coded path. I’ll get a release out in the next day or so.
Link to comment
4 hours ago, Wayne66 said:

I have the 9/29/2018 version running and then did the 2018.10.06c update. Not the vnstat is no longer running. 

 

I did go to the plugin settings and tried to click "Start". No luck.

Version 2018.10.07 has been released and will use docker appdata path.  Please let me know if this gets you back into a working condition.

Link to comment

Allows to start / stop now, but it's not populating the page with anything other than 2 "broken pictures".  (let it sit for awhile).  the appdata does have *something* in the various interfaces (docker, etc) there. Beyond that, you might want to consider silencing this from being logged:

Oct  7 18:02:10 ServerA vnstatd[25705]: Traffic rate for "vnet1" higher than set maximum 10 Mbit (30->42, r0 t117), syncing.

With a line logged every 30seconds, the log will fairly quickly fill up.

Link to comment
Allows to start / stop now, but it's not populating the page with anything other than 2 "broken pictures".  (let it sit for awhile).  the appdata does have *something* in the various interfaces (docker, etc) there. Beyond that, you might want to consider silencing this from being logged:

Oct  7 18:02:10 ServerA vnstatd[25705]: Traffic rate for "vnet1" higher than set maximum 10 Mbit (30->42, r0 t117), syncing.

With a line logged every 30seconds, the log will fairly quickly fill up.

 

Takes time to populate, also go into settings and select the interfaces you want to track. I’ll work on adding some messaging and a cleaner response for that initial time.

 

I’ll look into the log settings and see what can be done there as well.

Link to comment

Nice work, just installed this and it's cool.  I got a couple of suggestions though.

 

1.  Probably need to make it clearer that a prerequisite is having Dynamix System Statistics installed, or perhaps install it as part of your own install routine.

2.  I don't use /mnt/user/appdata/ on my array.  Instead I use a SSD mounted via unassigned devices, so by installing your plugin I've now got an appdata share on my array of which the only subfolder is vnstat, so I think this should be either configurable by the user, or even grab their current appdata location with something like this.

cat /boot/config/docker.cfg | grep DOCKER_APP_CONFIG_PATH | cut -d'"' -f 2

 

Link to comment
Nice work, just installed this and it's cool.  I got a couple of suggestions though.
 
1.  Probably need to make it clearer that a prerequisite is having Dynamix System Statistics installed, or perhaps install it as part of your own install routine.
2.  I don't use /mnt/user/appdata/ on my array.  Instead I use a SSD mounted via unassigned devices, so by installing your plugin I've now got an appdata share on my array of which the only subfolder is vnstat, so I think this should be either configurable by the user, or even grab their current appdata location with something like this.
cat /boot/config/docker.cfg | grep DOCKER_APP_CONFIG_PATH | cut -d'"' -f 2

 


I am using DOCKER_APP_CONFIG_PATH in the versions I released today.

As for the other plugin, I didn’t make a requirement or anything. What happens when that’s not installed?
Link to comment
5 minutes ago, dorgan said:


I am using DOCKER_APP_CONFIG_PATH in the versions I released today.

As for the other plugin, I didn’t make a requirement or anything. What happens when that’s not installed? 

Didn't realise the first point, but now I looked I think you missed a trailing slash buddy....

2018-10-08_00-16.png.45d7a778738e0ca25203d373cf1c2080.png

https://github.com/dorgan/Unraid-networkstats/blob/master/networkstats.plg#L147

 

 

On the second point, If Dynamix System Statistics isn't installed then there's no "STATS" page.

Edited by CHBMB
Link to comment




On the second point, If Dynamix System Statistics isn't installed then there's no "STATS" page.


Dorgan just needs to include the stats.page file from the dynamix plugin so that it'll work without stats being installed (it's just a header page file that creates the tab)

Sent from my LG-D852 using Tapatalk

Link to comment
7 minutes ago, dorgan said:

does vnstat exist inside appdata, or is putting everything inside of appdatavnstat?

OK.  There's nothing inside appdata at all.  appdatavnstat has an empty subfolder with nothing in it.

 

I deleted /mnt/user/appdata/ and also /appdatavnstat and removed then reinstalled your plugin and it's recreated the /mnt/user/appdata/vnstat/ folder.  I can see in your plugin you're using a variable like I highlighted in the link above, but I might be mistaken, I can't see where the variable is defined during the plugin install.

 

root@server:/# ls -la /mnt/user/appdata/
total 4
drwxrwxr-x 1 root   root    19 Oct  8 00:25 ./
drwxrwxrwx 1 nobody users 4096 Oct  8 00:25 ../
drwxrwxr-x 1 root   root    23 Oct  8 00:25 vnstat/

 

Edited by CHBMB
Link to comment
1 minute ago, dorgan said:

What is your DOCKER_APP_CONFIG_PATH set to?

That's kind of immaterial, as ! = /mnt/user/appdata/ but as you asked.

 

root@server:/# cat /boot/config/docker.cfg | grep DOCKER_APP_CONFIG_PATH | cut -d'"' -f 2
/mnt/disks/virtualisation/appdata

 

Link to comment
1 minute ago, CHBMB said:

I still can't see anywhere that you're actually defining the variable for DOCKER_APP_CONFIG_PATH.....

 

Only references I can see to it in your .plg file are in these lines here....

 

https://github.com/dorgan/Unraid-networkstats/blob/master/networkstats.plg#L146-L151

look at

source /boot/config/docker.cfg

 that will bring them in as variables

Edited by dorgan
Link to comment
Just now, CHBMB said:

Actually you must be somewhere as now I'm getting two folders created on plugin install. 

 

/mnt/user/appdata/....

and /mnt/disks/virtualisation/appdatanetworkstats/

 

So there's still a trailing slash missing.

Yeah i have some sloppiness, cleaning that up now.

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.