Author Topic: Goaccess stopped working  (Read 711 times)

0 Members and 1 Guest are viewing this topic.

Offline
****
Re: Goaccess stopped working
« Reply #15 on: April 10, 2025, 03:34:36 PM »
Code: [Select]
/usr/local/apache/domlogs/*.log {      <<<  Tells logrotate all files ending in .log in the domlog directory
    missingok   <<< continue log rotation without reporting any error if any of the specified log files are missing.
    notifempty   <<< ensures that log files are not rotated if they are empty. If a log file is empty, it won't trigger rotation.
    sharedscripts    <<< ensures that the commands or scripts specified in the prerotate or postrotate directive are executed only once, regardless of the number of log files being rotated.
    daily  <<<  Run every day
    rotate 7    <<< Keep 7 days of logs
    postrotate    <<<<  reload httpd once the logs are rotated
        /sbin/service httpd reload > /var/log/httpd-rotate.log 2>&1 || true
    endscript
    compress   <<<< GZIP the log files to save space
}
Google Hangouts:  rcschaff82@gmail.com

Offline
***
Re: Goaccess stopped working
« Reply #16 on: April 11, 2025, 08:24:50 PM »
Thanks.  Now a followup question mr. president.

Would that screw up goaccess monthly reports.  Or is go access only using the access_log file which would not be trimmed by the log rotation.
Listen to everything Pixelpadre says.

Offline
*****
Re: Goaccess stopped working
« Reply #17 on: April 11, 2025, 09:26:48 PM »
The beauty of customizability -- my domlogs look like this. I got away from _log a long time ago in favor of .log, which is more easily read in external log reader & stats programs:
Code: [Select]
-rw-r--r--   1 nobody root        0 Apr 11 14:23 domain.com.error.log
-rw-r--r--   1 nobody root        0 Apr 11 14:23 domain.com.log
-rw-r--r--   1 nobody root        0 Apr 10 14:23 domain.bytes
-rw-r--r--   1 nobody root      202 Mar 31 02:51 domain.com.error.log-20250331.gz
-rw-r--r--   1 nobody root      286 Apr  1 01:37 domain.com.error.log-20250401.gz
-rw-r--r--   1 nobody root      294 Apr  3 01:42 domain.com.error.log-20250403.gz
-rw-r--r--   1 nobody root     4129 Apr  5 02:33 domain.com.error.log-20250405.gz
-rw-r--r--   1 nobody root      856 Apr  6 20:20 domain.com.error.log-20250407.gz
-rw-r--r--   1 nobody root      767 Apr  8 00:20 domain.com.error.log-20250408.gz
-rw-r--r--   1 nobody root      432 Apr  9 19:06 domain.com.error.log-20250410.gz
-rw-r--r--   1 nobody root      121 Mar 31 02:51 domain.com.log-20250331.gz
-rw-r--r--   1 nobody root      196 Apr  1 01:37 domain.com.log-20250401.gz
-rw-r--r--   1 nobody root      262 Apr  3 01:42 domain.com.log-20250403.gz
-rw-r--r--   1 nobody root    11656 Apr  5 02:33 domain.com.log-20250405.gz
-rw-r--r--   1 nobody root     6594 Apr  6 20:20 domain.com.log-20250407.gz
-rw-r--r--   1 nobody root     6507 Apr  8 00:20 domain.com.log-20250408.gz
-rw-r--r--   1 nobody root     5983 Apr  9 19:06 domain.com.log-20250410.gz

Offline
***
Re: Goaccess stopped working
« Reply #18 on: April 13, 2025, 11:34:14 AM »
The beauty of customizability -- my domlogs look like this. I got away from _log a long time ago in favor of .log, which is more easily read in external log reader & stats programs:
Code: [Select]
-rw-r--r--   1 nobody root        0 Apr 11 14:23 domain.com.error.log
-rw-r--r--   1 nobody root        0 Apr 11 14:23 domain.com.log
-rw-r--r--   1 nobody root        0 Apr 10 14:23 domain.bytes
-rw-r--r--   1 nobody root      202 Mar 31 02:51 domain.com.error.log-20250331.gz
-rw-r--r--   1 nobody root      286 Apr  1 01:37 domain.com.error.log-20250401.gz
-rw-r--r--   1 nobody root      294 Apr  3 01:42 domain.com.error.log-20250403.gz
-rw-r--r--   1 nobody root     4129 Apr  5 02:33 domain.com.error.log-20250405.gz
-rw-r--r--   1 nobody root      856 Apr  6 20:20 domain.com.error.log-20250407.gz
-rw-r--r--   1 nobody root      767 Apr  8 00:20 domain.com.error.log-20250408.gz
-rw-r--r--   1 nobody root      432 Apr  9 19:06 domain.com.error.log-20250410.gz
-rw-r--r--   1 nobody root      121 Mar 31 02:51 domain.com.log-20250331.gz
-rw-r--r--   1 nobody root      196 Apr  1 01:37 domain.com.log-20250401.gz
-rw-r--r--   1 nobody root      262 Apr  3 01:42 domain.com.log-20250403.gz
-rw-r--r--   1 nobody root    11656 Apr  5 02:33 domain.com.log-20250405.gz
-rw-r--r--   1 nobody root     6594 Apr  6 20:20 domain.com.log-20250407.gz
-rw-r--r--   1 nobody root     6507 Apr  8 00:20 domain.com.log-20250408.gz
-rw-r--r--   1 nobody root     5983 Apr  9 19:06 domain.com.log-20250410.gz

I agree!  That does look might handsome!  But how did you do it?
Listen to everything Pixelpadre says.

Offline
*****
Re: Goaccess stopped working
« Reply #19 on: April 13, 2025, 11:57:12 AM »
With the logrotate conf I posted earlier. Does your default (or other) Apache vhost conf look like this under the log section:

   
Code: [Select]
CustomLog /usr/local/apache/domlogs/%domain%.bytes bytes
CustomLog /usr/local/apache/domlogs/%domain%.log combined
ErrorLog /usr/local/apache/domlogs/%domain%.error.log

Offline
*****
Re: Goaccess stopped working
« Reply #20 on: April 13, 2025, 01:17:30 PM »
FYI

AL9 has:
 goaccess                    x86_64                    1.9.3-2.el9                    @epel                    1.4 M

Just created the http conf, will let you know how it goes.
« Last Edit: April 13, 2025, 01:35:26 PM by Starburst »

Offline
*****
Re: Goaccess stopped working
« Reply #21 on: April 14, 2025, 03:13:43 AM »
Well it did something weird on AL9, says it ran, but the report for 2025-04-13 is missing, and all the logs have been reset that are in /usr/local/apache/domlogs/

Do have:
domain.com.error.log
domain.com.log
domain.bytes

But nothing showing a date afterwards showing it rotated.

Offline
*****
Re: Goaccess stopped working
« Reply #22 on: April 14, 2025, 04:53:20 AM »
logrotate or GoAccess?

Offline
*****
Re: Goaccess stopped working
« Reply #23 on: April 15, 2025, 11:07:16 AM »
@overseer

Look like it is working, but it's doing filenames like:

elrepo.nl.ssimn.org.log.1.gz
elrepo.nl.ssimn.org.log.2.gz


What am I missing that it not assigning the date?

Thanks

Offline
*****
Re: Goaccess stopped working
« Reply #24 on: April 15, 2025, 01:32:20 PM »
/etc/logrotate.conf
Code: [Select]
# use date as a suffix of the rotated file
dateext

Offline
*****
Re: Goaccess stopped working
« Reply #25 on: April 16, 2025, 08:06:16 PM »
Already in there, here is our logrotate.conf, which is the default one created by CWP.

Quote
# see "man logrotate" for details

# global options do not affect preceding include directives

# rotate log files weekly
weekly

# keep 4 weeks worth of backlogs
rotate 4

# create new (empty) log files after rotating old ones
create

# use date as a suffix of the rotated file
dateext

# uncomment this if you want your log files compressed
#compress

# packages drop log rotation information into this directory
include /etc/logrotate.d

# system-specific logs may be also be configured here.

Just noticed the rotate didn't run last night like it should have either, but did the previous night.

Offline
*****
Re: Goaccess stopped working
« Reply #26 on: April 16, 2025, 08:22:25 PM »
What do your /etc/goaccess/goaccess.conf look like?

Just looked at the before and all the lines aren't active (have # in front)

Offline
*****
Re: Goaccess stopped working
« Reply #27 on: April 16, 2025, 08:51:22 PM »
Have you checked to see if your log files haven't ballooned in size to be too large to process? Are you using logrotate to keep them a manageable size?

I posted update instructions in another thread, but here it is again:
Also, can goaccess be updated?  server version is 1.2 from 2017.  Latest is 1.9
Nothing prevents you from updating if you so desire. Remove CWP's GoAccess and install prerequisite (MaxMind GeoIP library):
Code: [Select]
yum -y remove goaccess
yum install libmaxminddb-devel.x86_64
Download and compile GoAccess, install to replace the current 1.2 version:
Code: [Select]
cd /usr/local/src
wget https://tar.goaccess.io/goaccess-1.9.3.tar.gz
tar -xzvf goaccess-1.9.3.tar.gz
cd goaccess-1.9.3/
./configure --prefix= --enable-debug --enable-utf8 --enable-geoip=mmdb --with-getline --with-openssl
make
make install

Just tried this on AL9, they must have GoAccess somewhere else.

Removed the package that was from EPEL.

And then installed GoAccess 1.9.4, but the graphs are still showing 1.9.3.

Weird.

But that is besides the logrotate issue.

Offline
*****
Re: Goaccess stopped working
« Reply #28 on: April 17, 2025, 09:12:53 PM »
Well the update to 1.9.4 took a day, now is showing correctly:

Quote
by GoAccess v1.9.4 and GWSocket