Problem with report on sarg

Good morning dear friends of IpFire Community, for some time now, I have had a problem when consulting the IPFire reports, it is not generating the reports, I have already uninstalled and installed and nothing is resolved, what could it be? … it is worth mentioning that this happened without having updated the core, and updating also still has not been resolved.

System versions

IPFire version IPFire 2.27 (x86_64) - core168
Pakfire version 2.27-x86_64
![image 352x108](upload://zfNb3wLIO1bCwVJ0pnSjgZCc8M1.png)

Not Found

The requested URL was not found on this server.

-----That is the message i see—

This message gets shown when the directory storing the reports contains no reports.

First thing to check. Do you have Logging enabled on the Web Proxy WUI page. This is not enabled by default.
On the Web Proxy WUI page, the 4th section down is labelled Log settings and there is an entry called Log enabled: and the check box needs to be selected.

Is the problem occurring only with the today report or also with the daily and weekly etc reports?

If logging is selected then on the console command line run the following command to manually execute the today report.
/usr/sbin/update-sarg-reports today

If this is successful you will get a message similar to the following:-

SARG: Records in file: 11691
SARG: Successful report generated on /var/log/sarg/today/21Jun2022-21Jun2022

If you get the following message:-

SARG: Records in file: 11687
SARG: No records found

This means that SARG found no data for todays date in the Squid Logs. If logging is enabled then check that you have got your browser(s) set up to use the IPFire Web Proxy. If not then there will be no data to get logged.

You can also manually execute the earlier command replacing today with daily or weekly to check if there is earlier data available in your logs.

1 Like

Hi, i used execute /user/sbin/update-sarg-reports today and this what happend

[root@ipfire-root today]# /usr/sbin/update-sarg-reports today
SARG: The following line read from - could not be parsed and is ignored

SARG: The following line read from - could not be parsed and is ignored

SARG: The following line read from - could not be parsed and is ignored

SARG: 4 consecutive errors found in the input log file -

This is indicating some problem with what is written in the Squid Log File that SARG was trying to parse.

The today option looks in a maximum of three of the log files so you should look through the following log files


which are in the following directory

Unfortunately the error output does not show which line caused the problem or what the parsing problem wasso all of the three logs need to be fully reviewed.

Looks like your squid log files contain errors.
Because of your posted messages I suppose they contain CR/LF sequences as line delimiters.
IPFire uses and expects LF as all Linux systems.

EDIT: Playing around with my access.log file shows, that sarg is not vulnerable to wrong line ends.
But a non-empty line containing spaces produces the error.

My access.log has spaces between the different fields on each line so I do not understand what you mean about the spaces?

Okay, I wasn’t exactly enough. :wink:

My tests showed errors for lines containig spaces only.
But I don’t know, how the logs of @alexrochagallo look like.


1 Like

Okay then i understand. Good find.

We will meed to wait to hear from @alexrochagallo. If there are lines with only spaces the question will be how they were created.