Bandwidth Monitoring not working for one single Virtual Server

SYSTEM INFORMATION
OS type and version: Debian 10
Webmin version: 1.981
Virtualmin version: 6.17-3

Hello there!

I run into a problem that I never encountered before: on a dedicated server (Debian 10, up to date) hosting multiple websites, the bandwidth monitoring does not seem to work anymore … but just for one single Virtual Server.

Bandwidth Monitoring is on:

System Settings > Bandwidth Monitoring > Period, schedule and email > Bandwidth monitoring active: yes
(I tried to switch it off and on again)

System Settings > Bandwidth Monitoring > Servers and log files > Servers to check: All servers

The bandwidth is correctly monitored for all Virtual Servers except for one where it looks like this:

Obviously, it stopped working at some point in July … and this corresponds to the moment when the site has been transferred from an previous server to the current one.

The Apache log files for this Virtual Server look good (good permissions, ownerships, correctly rotated).

bw.pl seems to be correctly configured to run “Every hour at 0 past the hour” in the “Webmin Scheduled Functions”.

I tried to run /etc/webmin/virtual-server/bw.pl manualy: it returns no errors (actually it returns nothing).

Also note that the AWstats Report shows the expected bandwidth usage for this very Virtual Server.

Any idea where I should look into to fix this?

No one, really?

Is the question so stupid that it deserves no answer or so complex that nobody knows where to look into? :wink:

Same here, just discovered that on at least one server the bandwidth monitoring for at least one or two virtual webservers just stopped one or two months ago.

I’m a bit stumped as to where to start looking for a reason, too.

Come on guys, really no one?
Still got this same problem as Nico94, for some virtual servers the bandwidth logging just stopped a few months ago:

Any pointers where to search for a reason - cannot find anything that looks unusual…

I’m not seeing where anything stopped. It dramatically dropped off, but it never stopped. You’re looking at the bars and not the numbers.

Frankly, to move 44.8 GB in a month and then fall to just 3.36 MB the next you must have been under constant DDoS attack or something. That’s weird.

I have no idea of what’s is happening on cmeis’ server (thank you by the way @cmeis for bumping this topic, I also haven’t fixed this issue yet), but at least in my case it completely stopped counting…

Take a look at these settings in your system:

If they’re not set like this, the monitoring will automatically shut off if you ever hit your limit and will stay off if they fall below the limit unless it’s set to turn back on. The big numbers you’re running that may have happened.

Thanks for your help @Gomez_Adams, but these settings do not apply in my case since the bandwidth is not limited. I actually never limit it, on no Virtual Server, I only monitor the bandwidth for billing purposes.

Thanks for chiming in. Actually, traffic like the 44 GB is more like normal traffic.
And yes, bandwidth did not “stop” actually, but the reported bandwidth usage is nowhere nearly realistic, and looking at the access_log I KNOW that there’s a lot more traffic than reported by bandwidth monitoring.
For example the bandwidth report for this one virtual server is showing 250.86 KiB for January (so roughly 4 days), but analysing the access_log is showing a real bandwith usage of neary 6 GiB!
So obviously something is wrong, looking at the wrong log files or the like?

I still do have this problem, and I’m detecting it on more and more hosted websites.
@Ilia can you provide any insights perhaps?

@Nico94 @cmeis When did you start seeing this issue? After migration and/or virtual servers restore?

I think simple toggling of Bandwidth monitoring active option on System Settings ⇾ Bandwidth Monitoring page, by first disabling and saving and then re-enabling and saving would solve this problem?

It will regenerate related config options and most importantly will re-create possibly missing cron job under Webmin ⇾ Webmin Configuration: Webmin Scheduled Functions, which should be found there as bw.pl in Parameters column. Do you have it there at the moment by the way?

The Cron job is there (and was there):

I think the problem mainly exists for servers that had been transferred from other VirtualMin installations, but it’s spreading over too much time now to say for sure.

Disabling bandwidth monitoring system-wide and re-enabling it didn’t help at first sight (yes, I manually ran the bw.pl job after re-enabling the feature, so not having to wait until the full hour).

I still have an effect like this (one example virtual host):

There IS substantially more traffic for last months, but somehow it’s mostly not seen by the bandwidth monitoring. :person_shrugging:

Oh, and in my case the OS is AlmaLinux 8 in most cases, with VirtualMin 6.17 GPL.

Transferred domains added to Virtualmin via restore or import functionality? Are they shown under Servers and log files accordion and Servers to check select? Try selecting servers explicitly.

The servers were transferred from another VirtualMin server using each servers’ “Transfer Virtual Server” function. Most are migrations from CentOS 7 based (current VirtualMin) servers to AlmaLinux8, some were coming from an old CentOS 6 system (also VirtualMin).
They are visible in the servers list for bandwdht monitoring config. I tried switching from “all” to “selected” and selected all servers. Re-running bw.pl didn’t create better bandwidth report/chart. Switched back to “all”.
What I noticed is that VirtualMin doesn’t seem to recognize proftpds’ log file, and the mail log file (although is showing bandwidth for mail?!). On other systems the proftpd logfile /var/log/xferlog is detected, mail not either.
Here’s a screenshot from one of the AlmaLinux 8 servers I’m seeing this problem on:

Hello Ilia, welcome aboard :slight_smile:

After the Virtual Server was transferred from a previous server to the current one. I’m running Debian servers.

I tried that, it did not solve the problem unfortunately.

I do. By the way, in my case the bandwidth is correctly monitored for all Virtual Servers except for just one.

Via the “Transfer Virtual Server” functionality from the previous server.

Yes.

OK, I’ll try to select every single Virtual Server instead of using “All servers” and let you know.

Replying to myself: unfortunately, selecting every single Virtual Server instead of ticking “All servers” (under “Servers to check”) did not help. The bandwidth monitor for that particular Virtual Server sticks to “0 bytes”.

@Jamie do you have an idea about what could be wrong?

Is this virtual server writing Apache logs to a file under /var/log/virtualmin ? If so, are the logs in the same format as other virtual servers?

Hello Jamie, thank you for your reply. The answer to both of your questions is yes.

The Apache log file is /var/log/virtualmin/site.com_access_log (btw easily accessible via Virtualmin > site.com > Logs and Reports > Apache Access Log), the permissions/ownership of the log file look OK and it fills normally.

The format of the logs look exactly the same as the others VS, it is the default one as there are no “LogFormat” directive in the VirtualHost and the “CustomLog” is the default one:
CustomLog /var/log/virtualmin/site.com_access_log combined