[BlueOnyx:24804] Re: 5209R/5210R YUM updates & new ISOs

Michael Stauber mstauber at blueonyx.it
Fri Feb 26 12:03:17 -05 2021


Hi Martin,

> As I see, default is „checked“. Is there a possibility
> to set the option „unchecked“ per default and do I have the
> possibility to uncheck this option on all vsites in one
> process, maybe a mysql query?

For new Vsites that you create from now on can define defaults via "Site
Management" / "Template". The settings stored there are preselected
whenever you hit "Add Site".

To disable logging on all existing Vsites you can create and run this
little Perl-script (as "root"):

--------------------------------------------------------------------
#!/usr/bin/perl -I/usr/sausalito/perl
#

use CCE;
my $cce = new CCE;
$cce->connectuds();

# Find all Vsites:
my @vhosts = ();
my (@vhosts) = $cce->findx('Vsite');

# Walk through all Vsites:
for my $vsite (@vhosts) {
  print "Processing Site: $my_vsite->{fqdn} \n";
  ($ok) = $cce->set($vsite, 'LOGS',{ 'enabled' => '0' });
}

# tell cce everything is okay
$cce->bye('SUCCESS');
exit(0);
--------------------------------------------------------------------

That will disable logging for all Vsites currently present.

> The webserver logs at /var/log/httpd/ are untouched by this option, right?

Hell, no! :p

I was asked for "no web access logging on a Vsite level" and that's what
this is. If you untick "Logs enabled" for a Vsite, then neither ...

	/var/log/httpd/access_log
	/var/log/httpd/error_log
	/var/log/nginx/access.log
	/var/log/nginx/error.log

... will log *any* transaction related to that Vsite in question.

The integrated Vsite logfile retention is usually daily populated by a
script that runs on logrotate and parses the server logfiles for entries
related to Vsites and then distributes these snippets to the various
Vsite /logs directory. As far as web access logs go: If a Vsite has
these disabled, then there is nothing to aggregate aside from maybe
Email and FTP data.

> The thinking behind this is about disk space. I saw some Logs growing 
> up to 1GB, this could become a problem on a cloud server with limited
> disk space and many vsites.

You could also go to "Server Management" / "System Settings" / "Data
Retention". This lets you specify how long the individual Vsite log
retention should be. The option is called "Server Logfile Retention". If
you set it to "1" (day), then Vsites will only keep the logfiles of the
last day and during the next logrotate the old logs are purged and
replaced with the ones from the last day.

I think this is a more sensible approach to the space issue, as you
still have some logs for troubleshooting and/or statistics, but not so
much that it should cause space issues.

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list