Al's .sh is good the way it is. The config3.3.js get's sent provided your _ftp_dir and corresponding nested dirs on the ftp server are correct.
I honestly tried everything @ddaniel51, in the end, after debugging I found what the issue was.. There might be scenarios where the existing code works (as in your case), but I am pretty sure the change I proposed is required.
I have sent the change I had to do to Al, hopefully he will comment on it.
Yes it works... but does it always work? Evidently not (and that really is not a surprise to me). I'll definitely take a look into the proposed improvements.
Hey Al, how about removing the config.js from ftp since it is created fresh every time YAMon starts and include users.js and the monthly file since these two are more important to have a backup of? It'd make rebuilding lost data a breeze instead of suffering like @scope2 did.
Heck, toss the config.file in there too. _________________ Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
Another strange one.. When I press the 'Export users.js' button in the front end I get the correct list of devices (as shown in the table on the screen, with the correct group/name)..
If I press 'View the contents of your users.js file' link on the same page I get a list of devices, but not with the correct names, etc..
Subsequently this is also the file that gets backed up to the FTP Server.
Im not bothered with the 'View content...' link, but I would like the correct users.js file to get exported to the FTP server.
The file under /opt/YAMon3/data/users.js does NOT contain the correct groups/labels, so I suspect this is the file that gets backed up..
Question is, why do I see 2 different files (content)?
Edit: "Since your `users.js` file was created 57d 2h ago and last updated -117d -24h ago, a total of 59 devices have connected to your router; 36 of which have been active during the current reporting interval."
That is the difference between the file on the usb stick and the shtuff Al keeps in the variables.
There is a method (though clunky) to export it to the users.js. _________________ Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
ddwrt bandwidth monitoringsays 10Mbps.
Yamon live usage says 0.11 KB/S.
What is going on?
ddwrt is 1 second slices in mega bits and Yamon is 30 second averages in mega bytes. They'll never look even remotely the same. _________________ Segment 1 XR700 10Gb LAN, 1Gb WAN ISP BS
Wired AP 1 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 2 Unifi Wifi 6 LR US 1Gb LAN
Wired AP 3 Unifi Wifi 6 LR US 1Gb LAN
Syslog Services Asustor 7110T NAS 10GB
NetGear XS716T 10GB Switch
download1.dd-wrt.com/dd-wrtv2/downloads/betas/ (Brain Slayer)
YAMon https://usage-monitoring.com/index.php
Another strange one.. When I press the 'Export users.js' button in the front end I get the correct list of devices (as shown in the table on the screen, with the correct group/name)..
If I press 'View the contents of your users.js file' link on the same page I get a list of devices, but not with the correct names, etc..
Subsequently this is also the file that gets backed up to the FTP Server.
Question is, why do I see 2 different files (content)?
Everything is functioning as designed...
The fundamental problem is that the stock dd-wrt web server does not offer cgi/bin capabilities so the web side cannot write back to the router hence I cannot update users.js directly from the reports.
To get around this, all of the customizations you make on the Devices tab are saved in a LocalStorage variable. When you open the reports, the JavaScript reads users.js from the router and blends that info with whatever is saved in the LS variable. I thought about this a *lot* and it is the simplest solution that I could come up with. However, that said, it comes with 2 major draw-backs:
1. by design, LS variables are specific to a browser on a device (meaning the customizations are not shared if you view the reports from multiple devices)
2. your changes are lost if the LS variable is removed
Over the years, I've added a number of ways built into the reports that help to get around this...
make a full backup of all of the information in the LS variable (by clicking export settings on the Settings tab)
You can save/copy these values and then import them into browsers on different devices... slow and painful and you'll have to re-import as devices change on your network
export the blended LS and users.js value (via the export users.js button on the Devices tab)...
You can then copy this file back to your router... less painful but you'll still have to re-copy to your router as devices change on your network
last but not least, enable the database integration options on the Settings tab
Simple and painless and always up-to-date across all devices
Thanks for the explanation.. I am using the database integration - I was thinking more along the line that the usb stick fails, etc, that I lose all data.. I then have a copy of everything I need on the NAS drive, so I can easily get back to where I was.
I will manually export the users.js file, I rarely make any changes to it anyway.
Thanks for the explanation.. I am using the database integration - I was thinking more along the line that the usb stick fails, etc, that I lose all data.. I then have a copy of everything I need on the NAS drive, so I can easily get back to where I was.
I will manually export the users.js file, I rarely make any changes to it anyway.
aahhh... now I understand.
In config.file, you can specify whether or not you want a daily backup and where to store those files. The default location for the backups is the within the `daily-bu` directory (which is also on your memory stick so won't help at all if the stick fails). But you can specify an absolute path to point the backups to your NAS.
Posted: Wed Sep 20, 2017 1:21 Post subject: Re: Remove one Device
TazBag wrote:
Hello, i try to search, but i not find if is possible.
In my network, sometime i connect one device only one time, never reconnect again. Is possible to delete from YAMon?
From Device Tab and from all usage report?
Thank's in advice
It will naturally go away if there is no data for the device in the following months. Otherwise, the only other way is to remove it by hand from users.js on your router.
Thanks for the explanation.. I am using the database integration - I was thinking more along the line that the usb stick fails, etc, that I lose all data.. I then have a copy of everything I need on the NAS drive, so I can easily get back to where I was.
I will manually export the users.js file, I rarely make any changes to it anyway.
aahhh... now I understand.
In config.file, you can specify whether or not you want a daily backup and where to store those files. The default location for the backups is the within the `daily-bu` directory (which is also on your memory stick so won't help at all if the stick fails). But you can specify an absolute path to point the backups to your NAS.
Is that closer to what you want?
Al
Yes it probably is, actually.. I dont need it real time, once a day is enough (and probably better for the NAS drive anyway). I will have a look. thanks.