visortgw
Very Senior Member
Why not try it, and report back?So, if Diversion is installed and then disabled, can vnstat email then be setup? Or, do need to install diversion, setup vnstat email, and then disable diversion?
Why not try it, and report back?So, if Diversion is installed and then disabled, can vnstat email then be setup? Or, do need to install diversion, setup vnstat email, and then disable diversion?
I asked about your setup because I'm trying to understand why you alone have encountered this issue, what the setup environment is, so that we can figure it out and mitigate it if possible. N=1 typically becomes greater with wider adoption. The fact that this has happened on two of your devices is even more curious.The problem was on two models of routers RT-AX88U and RT-AC86U Firmware Version:386.1_2. There were no resets for a year, it is configured and works. The first installation of vnstat was from version 0.9.4 via amtm. After updating to vnstat 0.9.5, the problem was not resolved. Checked the installation of the libjpeg package was installed "Package libjpeg (9c-2) installed in root is up to date.", decided to additionally install the libjpeg-turbo package, installed and immediately the problem was fixed. I do not understand why you need a connection, but if you need it, it is 100 mbit/sec from the provider via WAN FTTb. About the add-ons, too, I do not quite understand, if you are about what I thought, then they are in the attached screenshots from both RT-AX88U and RT-AC86U routers.
So, if Diversion is installed and then disabled, can vnstat email then be setup? Or, do need to install diversion, setup vnstat email, and then disable diversion?
Correct. These are options, but the hypothesis is sound. Please report back.Why not try it, and report back?
Correct. These are options, but the hypothesis is sound. Please report back.
You set up the communications in Diversion, tested and confirmed that the Diversion emailer was set up properly and it doesn't work in Vnstat on Merlin? Just making sure you have an actual working configuration before we go any further... The steps are listed on the github page if you need a reference (under "minimum requirements).OK, so I installed Diversion Lite, and disabled it. In vnstat set emails to enabled............but, where do I enter the email address that I want the emails sent to?
No, I just did this:You set up the communications in Diversion, tested and confirmed that the Diversion emailer was set up properly and it doesn't work in Vnstat on Merlin? Just making sure you have an actual working configuration before we go any further... The steps are listed on the github page if you need a reference (under "minimum requirements).
7. Edit SMTP Server: smtp.gmail.com
8. Edit Server port: 465
9. Edit Protocol: smtps
10. Edit SSL flag: --insecure
11. Send testmail to confirm settings
Enter your selection [1-11 e=Exit] 11
____________________________________________________
This will send a testmail from:
xxxxxxx@xxx.xxx to:
xxxx xxxxxx <xxxxxxxxx@gmail.com>
Continue? [1=Yes e=Exit] 1
*** WARNING : deprecated key derivation used.
Using -iter or -pbkdf2 would be better.
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (67) Login denied
✖ sending testmail failed
Note the curl: error above and check your settings
! Press Enter to return to menu
I've given you enough information or something else you need. Yes, it is on two devices with different hardware, with the same add-ons and configuration, with the same firmware. Maybe I'm not alone, just do not voice this problem users? I, too, could not voice it, but silently use it and decide not to post it in this topic by installing the additional libjpeg-turbo package.I asked about your setup because I'm trying to understand why you alone have encountered this issue, what the setup environment is, so that we can figure it out and mitigate it if possible. N=1 typically becomes greater with wider adoption. The fact that this has happened on two of your devices is even more curious.
These are two separate errors. The first one about deprecated key you can ignore. At some point that will be fixed in diversion but it will be a headache until @thelonelycoder figures out a smooth way of transitioning. Every confidence he will.OK, so I tried setting it up and I'm getting error. Anyone point me where I'm going wrong? Using a gmail account without 2fa
Code:7. Edit SMTP Server: smtp.gmail.com 8. Edit Server port: 465 9. Edit Protocol: smtps 10. Edit SSL flag: --insecure 11. Send testmail to confirm settings Enter your selection [1-11 e=Exit] 11 ____________________________________________________ This will send a testmail from: xxxxxxx@xxx.xxx to: xxxx xxxxxx <xxxxxxxxx@gmail.com> Continue? [1=Yes e=Exit] 1 *** WARNING : deprecated key derivation used. Using -iter or -pbkdf2 would be better. % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 curl: (67) Login denied ✖ sending testmail failed Note the curl: error above and check your settings ! Press Enter to return to menu
Thanks, but as I said, there is no 2fa on the accountThese are two separate errors. The first one about deprecated key you can ignore. At some point that will be fixed in diversion but it will be a headache until @thelonelycoder figures out a smooth way of transitioning. Every confidence he will.
The second I suspect is because you have 2FA on in your gmail account. You can't use your regular password but need to get an application-specific password. Google will generate it for you and then you can use that.
Send a test from dn-vnstat -- it will send immediately if properly set up.So, I decided to use a different Gmail account with 2fa ON and create an app password (as eloirmer suggested). The test email from diversion worked. I then disabled Diversion.
I setup vnstat with email.
Now, how can I send a test email from vnstat? Or do I just need to wait until midnight or something?
Thanks
Send a test from dn-vnstat -- it will send immediately if properly set up.
In the CLI -- from amtm, launch dn-vnstat. Toggle emails for daily summary stats off (if already on), and then toggle (back) on.Yes. I was asking how to do this. I don't see anyplace that says "send test message" or similar.
Thanks
Thanks, that workedIn the CLI -- from amtm, launch dn-vnstat. Toggle emails for daily summary stats off (if already on), and then toggle (back) on.
Correct. These are options, but the hypothesis is sound. Please report back.
all good stuff, thanks! I'll build max bandwidth in as a menu / installer option which should eliminate the spikes reported by 1 user, if I understand you correctly.Few comments/suggestions from the (vnStat) author as I happen to find this discussion while looking for possible missed issues before the vnStat version 2.7 release:
While I can't provide distribution specific support, don't hesitate to contact if there are some other issues that need clarification or feature requests for future versions.
- It's called "vnStat" while "vnstat" is the cli command for textual output and "vnstati" for image output (that "i" is just for image)
- I've added the version 1.18 man pages available at https://humdi.net/vnstat/man/1.18/ as you appear to be using the last version from the 1.x series (which isn't anymore developed). As you've noticed, there are some differences compared to the more recent 2.x versions.
- Related to the documentation, see the "vnstat" man page for the "--reset" parameter. It wasn't there for reseting the database content and doesn't essentially do anything if the daemon ("vnstatd") is running.
- As Entware appears to be using packages created by OpenWrt, you may want to look for the "vnstat2" package as, for some reason, OpenWrt decided to go with a new package name for the 2.x versions. I did find it also in the Entware config files but it doesn't appear to be currently be build as a binary package and may not be directly available as a result. https://github.com/Entware/entware-packages/tree/master/net/vnstat2 however does exist.
- "BandwidthDetection" is a way of querying the network interface driver for the maximum bandwidth that the interface is capable. If that driver provided information isn't valid then there isn't much vnStat can do. Complain to the manufacturer if you happen to have connections that way. If the driver however opts to provide no information at all then vnStat uses "MaxBandwidth" as fallback value to act as a sanity check for the seen traffic. If the traffic is higher than the given value then it gets ignored. This is used to eliminate "ghost traffic" and other kinds of traffic spikes that may occur due to device driver implementation issues and other reasons. I'd highly recommend not setting "MaxBandwidth" to zero.
- Consider "--dumpdb" as deprecated and don't write implementation around it. Prefer --oneline, --json or --xml instead. Those will still be available in the 2.x versions while "--dumpdb", "--exportdb", "--importdb" get dropped out. However do note the version field.
- Assuming you have 1Gbit interfaces, consider setting "UpdateInterval" to 20 as that's the default value in later releases.
- The default database write interval is 5 minutes, not 30 seconds. See "SaveInterval" in the configuration file and the man page.
- Depending on the "vnstati" parameters, it's possible to have the command generate images only if the files don't exist or if the files are older than the specified number of minutes. If it feels like there are caching issues then check the parameters if the images are being generated on the fly.
Echo'ing Jack: thanks for this! I started this project for personal use and with other SNB member's encouragement (and tireless support!), it's become what you see. So I've been learning what this Entware version is capable of doing (and not capable)... your information is very helpful (particularly the BWDetection setting - had no idea that would help filter false spikes - very cool).Few comments/suggestions from the (vnStat) author as I happen to find this discussion while looking for possible missed issues before the vnStat version 2.7 release:
While I can't provide distribution specific support, don't hesitate to contact if there are some other issues that need clarification or feature requests for future versions.
- It's called "vnStat" while "vnstat" is the cli command for textual output and "vnstati" for image output (that "i" is just for image)
- I've added the version 1.18 man pages available at https://humdi.net/vnstat/man/1.18/ as you appear to be using the last version from the 1.x series (which isn't anymore developed). As you've noticed, there are some differences compared to the more recent 2.x versions.
- Related to the documentation, see the "vnstat" man page for the "--reset" parameter. It wasn't there for reseting the database content and doesn't essentially do anything if the daemon ("vnstatd") is running.
- As Entware appears to be using packages created by OpenWrt, you may want to look for the "vnstat2" package as, for some reason, OpenWrt decided to go with a new package name for the 2.x versions. I did find it also in the Entware config files but it doesn't appear to be currently be build as a binary package and may not be directly available as a result. https://github.com/Entware/entware-packages/tree/master/net/vnstat2 however does exist.
- "BandwidthDetection" is a way of querying the network interface driver for the maximum bandwidth that the interface is capable. If that driver provided information isn't valid then there isn't much vnStat can do. Complain to the manufacturer if you happen to have connections that way. If the driver however opts to provide no information at all then vnStat uses "MaxBandwidth" as fallback value to act as a sanity check for the seen traffic. If the traffic is higher than the given value then it gets ignored. This is used to eliminate "ghost traffic" and other kinds of traffic spikes that may occur due to device driver implementation issues and other reasons. I'd highly recommend not setting "MaxBandwidth" to zero.
- Consider "--dumpdb" as deprecated and don't write implementation around it. Prefer --oneline, --json or --xml instead. Those will still be available in the 2.x versions while "--dumpdb", "--exportdb", "--importdb" get dropped out. However do note the version field.
- Assuming you have 1Gbit interfaces, consider setting "UpdateInterval" to 20 as that's the default value in later releases.
- The default database write interval is 5 minutes, not 30 seconds. See "SaveInterval" in the configuration file and the man page.
- Depending on the "vnstati" parameters, it's possible to have the command generate images only if the files don't exist or if the files are older than the specified number of minutes. If it feels like there are caching issues then check the parameters if the images are being generated on the fly.
Question (and maybe you Jack and I can take this offline): is there an import function after a --oneline, --json or --xml export? I've actually used that to preserve data and move it across platforms.
Welcome To SNBForums
SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.
If you'd like to post a question, simply register and have at it!
While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!