dev_null
Very Senior Member
Note: this version has been superseded by the beta 2 version: https://www.snbforums.com/threads/b...-monitoring-with-full-install-and-menu.70727/
I will be asking mods to close this thread (27-Feb-2021). Thanks to everyone who provided feedback on the alpha/beta versions!
Background
New! Installer command (courtesy of @Martineau ) - see his post below.
15 Feb 2021: For now the installer is off-line. I am working with @Martineau to try to get it back. Please follow the manual steps outlined in the github repository.
I will be asking mods to close this thread (27-Feb-2021). Thanks to everyone who provided feedback on the alpha/beta versions!
Background
- This is an implementation of vnstat/vnstati for use on AsusWRT-Merlin routers. This effort was created to enable accurate measurement of data use on my local network. There were two primary drivers:
- Supplement or replace the internal monitoring tool, Traffic Analyzer > Traffic Monitor, which suffers from (false) “17GB” data use bursts on some firmware (e.g., RT-AC68U 386.1). These ghost bursts interfered with tracking data usage (though monthly totals still appeared accurate).
- This became a particular concern for me when Xfinity announced it was implementing 1.2GB caps nationwide in January 2021 (it was recently announced that capping is postponed in the Northeast until 3Q2021).
- The 17GB ghosting is still being reported: https://www.snbforums.com/threads/t...14_2-was-reverted-in-386-1.69843/#post-658183
- To monitor traffic locally (for privacy reasons).
- This was created with support from @Jack Yaz, who provided scaffold and scripting assistance to create the AddOn "Vnstat on Merlin". Many thanks, Jack!
- This concept and view was created for my personal use.
I have not (yet) tried to automate the installation and set-up steps. I welcome your feedback - and more importantly your collaboration - to improve and/or automate installation.- A Day-2 alpha install script created by @Martineau - thanks so much!
- A Day-3 single-line install script updated by @Martineau - really appreciate the collaboration!
- See notes below about post-install steps required (location of db files, email configuration).
- Once set up, the recurring refreshes and other operations are automated, controlled by a few cron jobs.
- The standard "vnstat" install from Entware will track data usage, with few additional configuration tweaks required (the configuration needs to be modified so the data isn't stored in a volatile location).
- In my tests, the CLI version of vnstat totals are consistent with those collected by the built-in Traffic Monitor, without any 17GB ghosts.
- Non-UI access to vnstat is via SSH.
- The vnstat totals tend to be a bit higher (10-15%) than those currently reported by Comcast (NE region, 1Q2021).
- Vnstat has a corresponding application called vnstati which creates PNGs from the vnstat data totals. Thanks, Teemu Toivola!
- The "Vnstat on Merlin" UI uses the scaffolding from @Jack Yaz 's connmon script (with his permission and assistance) to create a reasonably attractive visual representation of data usage on the AddOns tab:
- Each section can be collapsed to simplify the view
- Refreshes require a cron job, through which the refresh frequency is adjustable. There doesn't seem to be a discernible resource impact.
- Because I don't log on to the router every day, I wanted a "push" notification of data use. I had hacked together a script to email semi-weekly Skynet reports (as described here: https://www.snbforums.com/threads/r...urity-enhancements.16798/page-280#post-538221), so I repurposed and updated it into an aggregation and email script for vnstat statistics.
- This report is an amalgamation of monthly, weekly and daily usage. The report content is customizable.
- The frequency and timing of this email is modifiable by adjusting the associated cron job.
- This report is converted into an image (using the "imagemagick" package from Entware) and is located at the bottom of the UI page.
- AsusWRT-Merlin; scripting support is required.
- Entware, typically installed with Diversion.
- To take advantage of the encrypted Diversion password, functioning Diversion "communications" (
amtm > 1 (Diversion) > c (communication) > 5 (edit email settings, test email)
)
- To take advantage of the encrypted Diversion password, functioning Diversion "communications" (
- One or more @Jack Yaz scripts, particularly
connmon
, so that the AddOns tab and underlying folder structure is set up. The vnstat-ui script does not have full AddOn functionality built in. - The vnstat application (currently v1.18) and the "Vnstat on Merlin" UI has been tested on Merlin 384.19, 386.1 beta 1-5 and 386.1 release, on RT-AC66U_B1 (on AC68U firmware) and RT-AX86U 86.1 beta 1-5 and 386.1 release.
- Experience with SSH, scripting and comfort modifying settings on your router.
- I have reproduced the steps outlined in the repository and found that it works on the hardware available to me. Your hardware and settings may differ (most differences should be obvious and readily addressable; the community may be able to help).
- I'm providing this as-is, for the potential benefit of the community. Use is at your own risk.
- Any contributions from the community to optimize the install and performance are welcomed.
- Please see the github repository: https://github.com/de-vnull/vnstat-on-merlin
- The install and other scripts are being migrated to point to the github repository. The bitbucket repository is active until that is finished.
- Deprecated:
Please visit the bitbucket repository, located here:https://bitbucket.org/vnstat-on-merlin-v001/vnstat_on_merlin/src/Initial/
Because each change in bitbucket updates the UUID, the link needs to be updated. If you get an error, please try again later (we'll get the link fixed as soon as practical). In the meantime, see this post:
[Beta] VNSTAT on Merlin; CLI, UI and email data use monitoring (install script offline for now)
@Martineau I created a file called "vnstat-install.sh" in the bitbucket scripts folder. I don't think that having a different name makes a difference, but wanted to differentiate it from the other files called vnstat. Can you verify your script will work even with the name "vnstat-install.sh"...
www.snbforums.com
15 Feb 2021: For now the installer is off-line. I am working with @Martineau to try to get it back. Please follow the manual steps outlined in the github repository.
Last edited: