Control Web Panel

WebPanel => Information => Topic started by: Namaste on April 02, 2025, 12:44:58 PM

Title: Goaccess stopped working
Post by: Namaste on April 02, 2025, 12:44:58 PM
For the past 2 days goaccess has not parsed any reports.  Any ideas?

Also, current version is 1.2 on my server.  Is it possible to update?
Title: Re: Goaccess stopped working
Post by: overseer on April 02, 2025, 01:01:42 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
Title: Re: Goaccess stopped working
Post by: Namaste on April 02, 2025, 02:10:54 PM
I was thinking file was too large also.  25MBfor the access log.   780MB for the error log
Title: Re: Goaccess stopped working
Post by: Namaste on April 02, 2025, 02:12:55 PM
How can you remember all of the posts you have made?
Title: Re: Goaccess stopped working
Post by: Namaste on April 02, 2025, 02:27:23 PM
I couldnt find any necessary requisites for installing goaccess.  Im on C7 with php 8 something.

On an unrelated subject.  I want to add my ip to whitelist on modsec.  I seem to remember a filed dedicated to whitelist and a file for blacklist.  I cant find them now.  What file do I add the ip whitelist to.  Not the rules file is it?
Title: Re: Goaccess stopped working
Post by: Namaste on April 02, 2025, 04:13:09 PM
fwiw  I am reading on line that if one log file is empty then goaccess will not generate a report.  Not sure what they are talking about.  access file is never zero.  And what other log files are they talking about.
Title: Re: Goaccess stopped working
Post by: Namaste on April 02, 2025, 04:20:55 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

make threw an error  -->threw an error no target found ;D
Title: Re: Goaccess stopped working
Post by: Namaste on April 02, 2025, 05:16:49 PM
Something weird happened when I downloaded the source file to usr/local/src......ownership:group  was user:opendkim  I tried user fix permissions but nothing changed.
Title: Re: Goaccess stopped working
Post by: Namaste on April 03, 2025, 11:21:22 AM
After uninstall and install of 1.94 of goaccess, this morning there is still no statistics data since march 30. Ugg.
Title: Re: Goaccess stopped working
Post by: Namaste on April 03, 2025, 12:32:25 PM
I tried running a report manually and I am getting this time error:
Code: [Select]
Fatal error has occurred
Error occurred at: src/parser.c - parse_log - 2431
No time format was found on your conf file.

This is the line # 2431 referenced above:

Code: [Select]
/* verify that we have the required formats */
  if ((err_log = verify_formats ()))
    FATAL ("%s", err_log);

And this is the goaccess.conf file pertaining to time:
Code: [Select]
#
time-format %H:%M:%S
#
# Google Cloud Storage or
# The time in microseconds since the Unix epoch.
#
#time-format %f

# Squid native log format
#
#time-format %s

######################################
# Date Format Options (required)
######################################
#
# The date-format variable followed by a space, specifies
# the log format date containing any combination of regular
# characters and special format specifiers. They all begin with a
# percentage (%) sign. See `man strftime`
#
# The following date format works with any of the
# Apache/NGINX's log formats below.
#
date-format %d/%b/%Y
#
# AWS | Amazon CloudFront (Download Distribution)
# AWS | Elastic Load Balancing
# W3C (IIS)
#
#date-format %Y-%m-%d

Title: Re: Goaccess stopped working
Post by: Namaste on April 03, 2025, 02:48:57 PM
FWIW  goaccess 1.9.4 uses access.log as the source file to parse and not access_log
Title: Re: Goaccess stopped working
Post by: overseer on April 03, 2025, 11:47:41 PM
How do I remember all my threads? I authored them, so I maintain a basic familiarity with them. Plus, if you test your methods and author an instructional post, sometimes it takes 15 min+ to test it ahead of publication. So I'm apt to remember a post that took some doing!

25MB is not overly large for an access log. Your error log, on the other hand, is rather large if it's >500MB. Do you have logrotate enabled to process all your domlogs?

Not sure what you're encountering, because I tested both methods when I posted to the other thread. Maybe something particular with your installation? Try the other method using the legacy geoip -- same as what the current GoAccess uses:
Code: [Select]
yum -y install geoip-devel
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=legacy --with-getline --with-openssl
make
make install
Title: Re: Goaccess stopped working
Post by: Namaste on April 10, 2025, 12:52:12 AM
How do I remember all my threads? I authored them, so I maintain a basic familiarity with them. Plus, if you test your methods and author an instructional post, sometimes it takes 15 min+ to test it ahead of publication. So I'm apt to remember a post that took some doing!

25MB is not overly large for an access log. Your error log, on the other hand, is rather large if it's >500MB. Do you have logrotate enabled to process all your domlogs?


Error log is big,  I delete if from time to time.  Is the error log relevant to goaccess Problem or was that just an observation?
Default logrotate does not include domlogs.  What do you suggest.?
Title: Re: Goaccess stopped working
Post by: overseer on April 10, 2025, 01:01:33 AM
Filemanagement > Logrotate Manager
create /etc/logrotate.d/httpd

Code: [Select]
/usr/local/apache/domlogs/*.log {
    missingok
    notifempty
    sharedscripts
    daily
    rotate 7
    postrotate
        /sbin/service httpd reload > /var/log/httpd-rotate.log 2>&1 || true
    endscript
    compress
}
Title: Re: Goaccess stopped working
Post by: Namaste on April 10, 2025, 02:29:59 PM
Filemanagement > Logrotate Manager
create /etc/logrotate.d/httpd

Code: [Select]
/usr/local/apache/domlogs/*.log {
    missingok
    notifempty
    sharedscripts
    daily
    rotate 7
    postrotate
        /sbin/service httpd reload > /var/log/httpd-rotate.log 2>&1 || true
    endscript
    compress
}
I got basically the same from chatgpt.  The only difference was this:  /sbin/service httpd reload > /var/log/httpd-rotate.log 2>&1 || true.
What does that do?
Title: Re: Goaccess stopped working
Post by: rcschaff 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
}
Title: Re: Goaccess stopped working
Post by: Namaste 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.
Title: Re: Goaccess stopped working
Post by: overseer 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
Title: Re: Goaccess stopped working
Post by: Namaste 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?
Title: Re: Goaccess stopped working
Post by: overseer 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
Title: Re: Goaccess stopped working
Post by: Starburst 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.
Title: Re: Goaccess stopped working
Post by: Starburst 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.
Title: Re: Goaccess stopped working
Post by: overseer on April 14, 2025, 04:53:20 AM
logrotate or GoAccess?
Title: Re: Goaccess stopped working
Post by: Starburst 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
Title: Re: Goaccess stopped working
Post by: overseer on April 15, 2025, 01:32:20 PM
/etc/logrotate.conf
Code: [Select]
# use date as a suffix of the rotated file
dateext
Title: Re: Goaccess stopped working
Post by: Starburst 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.
Title: Re: Goaccess stopped working
Post by: Starburst 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)
Title: Re: Goaccess stopped working
Post by: Starburst 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.
Title: Re: Goaccess stopped working
Post by: Starburst 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