October 4, 20205 yr Worked, need wait sometime. Thanks! Edited October 4, 20205 yr by aludov Correct reply
March 25, 20215 yr On 7/30/2020 at 5:56 AM, fmp4m said: 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? I occured the same problem, and solved by changing the default DatabaseDir '/var/lib/vnstat' to '/mnt/user/vnstat' in /etc/vnstat.conf. The new DatabaseDir ‘/mnt/user/vnstat’ was created in UNRAID WEBGUI shares tab. Though I still don't understand why default DatabaseDir failed. Hope someone could enlight me.
April 11, 20215 yr On 7/30/2020 at 3:59 AM, Grohmand said: Is there a way to persist data? Was looking for this as well. Any update?
May 21, 20215 yr 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. Hello, I manage to autofill Alias with a script for container in $(docker ps --format '{{.ID}}'); do veth="" networkmode=$(docker inspect -f "{{.HostConfig.NetworkMode}}" $container) name=$(docker ps --filter "id=$container" --format "{{.Names}}") if [ "$networkmode" == "host" ]; then veth="host" elif [ "$networkmode" == "br0" ]; then veth="br0" else pid=$(docker inspect --format '{{.State.Pid}}' "$container") ifindex=$(nsenter -t $pid -n ip link | sed -n -e 's/.*eth0@if\([0-9]*\):.*/\1/p') if [ -z "$ifindex" ]; then veth="not found" else veth=$(ip -o link | grep ^$ifindex | sed -n -e 's/.*\(veth[[:alnum:]]*\).*/\1/p') fi fi if [[ "$veth" = "veth"* ]]; then echo $container : $name : $veth sed -i "/$name/d" /boot/config/plugins/networkstats/networkstats.cfg sed -i "/alias-$veth/d" /boot/config/plugins/networkstats/networkstats.cfg echo "alias-"$veth"="\"$name\" >> /boot/config/plugins/networkstats/networkstats.cfg fi done Edited June 13, 20215 yr by Meldrak script mod
June 7, 20215 yr Author On 5/21/2021 at 9:07 AM, Meldrak said: Hello, I manage to autofill Alias with a script for container in $(docker ps --format '{{.ID}}'); do veth="" networkmode=$(docker inspect -f "{{.HostConfig.NetworkMode}}" $container) name=$(docker ps --filter "id=$container" --format "{{.Names}}") if [ "$networkmode" == "host" ]; then veth="host" elif [ "$networkmode" == "br0" ]; then veth="br0" else pid=$(docker inspect --format '{{.State.Pid}}' "$container") ifindex=$(nsenter -t $pid -n ip link | sed -n -e 's/.*eth0@if\([0-9]*\):.*/\1/p') if [ -z "$ifindex" ]; then veth="not found" else veth=$(ip -o link | grep ^$ifindex | sed -n -e 's/.*\(veth[[:alnum:]]*\).*/\1/p') fi fi if [[ "$veth" = "veth"* ]]; then sed -i "/$veth/c\alias-$veth='$name'" /boot/config/plugins/networkstats/networkstats.cfg fi done This is nice, maybe I will rework some of this into identifying applications, and then you can just select which applications to track. Do you know if the network device change upon reboot??
June 13, 20215 yr On 6/7/2021 at 11:40 PM, dorgan said: This is nice, maybe I will rework some of this into identifying applications, and then you can just select which applications to track. Do you know if the network device change upon reboot?? Yes the network device name change on reboot or docker update My script just fill the docker name to the veth device in the config file It doesn't auto select the device you want to track, you need to select it in your plugin and hit save I updated the script in previous post to delete the old entry if there's one
July 3, 20215 yr Can somebody support me in this case? My network stat get not complete displayed... Best regards, Phil
July 15, 20214 yr On 7/2/2020 at 6:14 PM, DjBill said: 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. Following the link above has a comment and link to the following Github -- https://github.com/cslev/find_veth_docker As I'm very new to Unraid and Linux, can someone please help me understand where I would enter this information in? I tried in the terminal for Unraid and also the console of one of the dockers I'm trying to figure out the Veth.. In both locations I've tried entering.. sudo ./find_veth_docker.sh -n nextcloud
July 16, 20214 yr On 7/15/2021 at 9:58 AM, ThatTallGuy21 said: Following the link above has a comment and link to the following Github -- https://github.com/cslev/find_veth_docker As I'm very new to Unraid and Linux, can someone please help me understand where I would enter this information in? I tried in the terminal for Unraid and also the console of one of the dockers I'm trying to figure out the Veth.. In both locations I've tried entering.. sudo ./find_veth_docker.sh -n nextcloud So after additional research I found that Veth##### changes each time a container restarts, so unless this is able to be persisted, then I'm not going to worry about this too much. Would like to know how to quickly find it, using the above, but not completely needed.
August 9, 20214 yr I did some little changes to my script, and now data persist on containers restarts and on interfaces name changes Before running my script as a CRON job (every day is a good choice), you'll need to setup the plugin once with interfaces you'd like to show To persist on array reboot, you'll also need to run script after docker finish starting all containers https://github.com/Meldrak/user-scripts/blob/main/networkstats On 6/7/2021 at 11:40 PM, dorgan said: This is nice, maybe I will rework some of this into identifying applications, and then you can just select which applications to track. Do you know if the network device change upon reboot??
August 26, 20214 yr Hello, the page Stats -> Network Stats only shows two empty/non-existing images (placeholder). I already re-installed the plugin but it did not help. Recently i changed my mainboard from multi LAN to single LAN. Re-configuration and even a manual edit of the interface in /etc/vnstat.conf did not help. Debug of vnstat says, logging is of traffic is fine. Unraid Version is 6.10-rc1. Thanks for help!
August 26, 20214 yr Author 21 minutes ago, Twix said: Hello, the page Stats -> Network Stats only shows two empty/non-existing images (placeholder). I already re-installed the plugin but it did not help. Recently i changed my mainboard from multi LAN to single LAN. Re-configuration and even a manual edit of the interface in /etc/vnstat.conf did not help. Debug of vnstat says, logging is of traffic is fine. Unraid Version is 6.10-rc1. Thanks for help! It takes a while for the graphs to start showing up the first time.
August 28, 20214 yr On 10/5/2020 at 4:44 AM, aludov said: Worked, need wait sometime. Thanks! How long did you wait? I’ve had mine installed for 2 days and still a blank screen.
August 29, 20214 yr Author 5 minutes ago, adamgwaps said: +1 here no content too Have you gone into the setting and selected which adapters to monitor?
September 1, 20214 yr 6.10 Rc1 and no content as well. and yes i have eth0 selected and the daemon is running.
October 19, 20214 yr I'm also seeing the same issue with the stats images not loading. Trying "vnstati" on the commandline returns: vnstati: error while loading shared libraries: libgd.so.3: cannot open shared object file: No such file or directory So i assume this is why the images no longer load but a quick google about that error code and I couldn't find a fix unfortunately.
October 19, 20214 yr Author 14 minutes ago, Migz93 said: I'm also seeing the same issue with the stats images not loading. Trying "vnstati" on the commandline returns: vnstati: error while loading shared libraries: libgd.so.3: cannot open shared object file: No such file or directory So i assume this is why the images no longer load but a quick google about that error code and I couldn't find a fix unfortunately. What version of unraid are you running?? I just did a clean install of the plugin and everything is working on 6.9.2
October 19, 20214 yr 3 minutes ago, dorgan said: What version of unraid are you running?? I just did a clean install of the plugin and everything is working on 6.9.2 Sorry, I should've mentioned that initially. 6.10.0-rc1 so likely just an issue with the latest version of Unraid.
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.