po: Add Georgian translation
Fix build on FreeBSD
Apparently, your system compiles sarg from sources during install. It doesn't just install a pre-build executable. The configure script couldn't find a working C compiler to compile sarg. It tried gcc, cc and cl but none of these were found to be working. Either no suitable compiler is installed or, if one is installed, it is unable to produce a valid executable. I see you had to install autoconf, automake and a bunch of devel packages from the command line. Don't you need to install gcc too?
It looks like you are building sarg 2.4.0. Can you try sarg 2.4.0-pre1 (https://sourceforge.net/projects/sarg/files/sarg/sarg-2.4.0-pre1/). It is really version 2.4.1 but I never took the time to release it. All those issues are reported by gcc 8 and later. They should have been fixed in 2.4.0-pre1.
Have you tried to build sarg 2.4.0-pre1 (https://sourceforge.net/projects/sarg/files/sarg/sarg-2.4.0-pre1/)? Does it build on debian 11? Sarg 2.4.0-pre1 is supposed to become 2.4.1. Issues raised by gcc 10 should be fixed.
Thank you for your patch. After more than two years, I finally found some time to integrate it :-).
Add more spaces to the code.
Some bug reports suggest this variable must be at least 14 bytes long
Allow for very long connection time in report
Sarg ignores connections with a duration longer than max_elapsed seconds. Is that parameter set to a non zero value in your sarg.conf ?
Update changelog.
Update po files.
Add undeclared variable.
Update version number.
Uniform space layout in source code
Remove global variables declared in conf.h
Take absolute value of an int instead of a float
Guard against possibly truncated snprintf output
Hi, This error occurs because variable cstr is only 9 bytes long. The compiler thinks variable "count" might end up occupying more than 8 bytes + terminating null once formatted as a string. To compile sarg simply increase the size of cstr at line 81: char cstr[90]; Memory is not an issue nowadays.
Move some tar options after positional arguments when generating the archive
Enclose file name between double quotes in translated messages
Update version number to 2.4.0.
Fix path in checksum files
Update version to 2.4.0-pre3.
Update archive.sh script to check configure.ac instead of configure.in
Update ChangeLog
Update translations.
Update PO files for translation.
Add space between if and for and the opening parenthesis
Add safety against possible buffer overflows reported by gcc
Adjust buffer size to avoid possible buffer overflow warning from gcc
Use unpredictable temporary directory name
Avoid race condition when creating the temporary directory
Fix syntax for const pointer to const data
When recursively creating a directory, make sure the path is a directory
If days were 48 hours long, I would use the extra time catching up with things to do at my day work :-) You are right, I have no use for sarg any more. My company's squid server was dismantled when a new guy was hired to manage the network about 10 years ago. He favored paid solutions over free ones. Any change I now make to sarg is tested against access.log files dating back from 2010. Html and e-mail reports are very different concepts in sarg. E-mail report is much smaller. It is not possible...
Sorry for the very long delay. I have almost no time to work on sarg any more. The output directory cannot be under the temporary directory because the temporary directory is deleted before sarg exits (unless -k is specified but even then, the output directory must be outside the temporary directory). In your first message, the output directory is set to the temporary directory because you asked for the report to be sent by e-mail. As the report is not meant to be kept, it is stored in the temporary...
Add some buffer overflow checking
Fix code indentation
Validate url passed to php scripts
Preparing the release was faster than I expected. I think I got it mostly right :-). I upgraded gettext and released the files just now. Unfortunately, I have no server to test sarg any more (my employer dismantled the server back in 2014). So, I have no recent access.log to validate sarg.
Sarg 2.3.11
Thank you Javier for your translation. Strangely, the Translation Project failed to inform me about its availability (and the availability of many more translations). I just updated the v23 branch in git. I'll prepare a new release for version 2.3.11 with the updated translations. It may take some time though as I have very little time for this and gettext seems to have changed since I last used it. It complains about a missing /usr/bin/gmsgfmt file about which I can't find any information... In...
Update translations from Translation Project.
Starting to translate a pot file is quite simple actually. I recommend to download sarg-2.3.10.pot from the Translation Project's web site: http://translationproject.org/POT-files/sarg-2.3.10.pot I don't know where the link you mention comes from. The above link comes from the Translation Project where sarg's translation is hosted. Rename the file as sarg-2.3.10.es.po and adjust the header. For instance: # Spanish translation for sarg. # Copyright (C) 2017 Free Software Foundation, Inc. # This file...
None that I can see. Sorry. An average desktop computer sends a lot of requests. Some are unattended such as system updates, software updates and so on. Others are consequences of user requests (css, images, js, ads, iframe...). You might filter out urls to only keep html pages. I don't know how many false positive that list would contain. And then you would miss any audio, video or exe downloaded by typing the url directly into the browser address bar (such as a link clicked in a mail). So, as I...
You can't. That information is not available in the log. Squid only sees requests coming from network connected devices. Network devices don't advertise the reason they fetch such or such url.
Incorrect variable type
It is now fixed in commit [2d5edf]. Thank you for reporting this bug.
Use correct variable type
Can you achieve the requested result by redirecting the output to /dev/null: sarg [usual args] > /dev/null
If I run the following command: sarg --convert access.log.2017.08.20 It output this: 08/17/2017 22:15:01 0 10.1.1.2 TAG_NONE/400 3952 GET / - HIER_NONE/- text/html 08/17/2017 22:15:05 0 10.1.1.3 TCP_DENIED/403 4277 POST http://pasta.esfile.duapps.com/api/data? - HIER_NONE/- text/html 08/17/2017 22:15:05 0 10.1.1.3 TCP_DENIED/403 4191 POST http://pasta.esfile.duapps.com/api/tokens? - HIER_NONE/- text/html So, your excerpt contains entries from the 17th of Augustus, not the 20th of Augustus. If the...
Temporary files seem to vanish while sarg is creating the report. Do you have a cron job to purge /tmp? Files are usually purged during boot but, on servers that are never rebooted, people install other solution to clean /tmp without rebooting. If this is the case, try to store the temporary files in another directory. You could use, for instance, /var/tmp.
Your version of gcc is a bit picky about sprintf. It assumes that "%02d-%02d", i.e. 5 characters + terminating zero, won't fit in a string buffer 10 bytes long. And the compiler might just be right sometimes :-). A proper fix requires to use snprintf and check that the buffer was big enough to format the string and handle the error if the buffer is too small. I have no time to do that right now. In the meantime, simply increase the buffer sizes until the compiler stops complaining. In your case,...
Command line options
Changing "-t 09:00-18:00" is very easy. It is available in commit [371bd6]. I just pushed it to git :-) I'll update the wiki page too. Merging "hours" and "-t" is much more tricky though.
command line option -t excludes end limit
"hours" and "-t" are, internally, very different things. The hourly report hiding excluded columns in one case and not in the other is the most prominent difference. That's what your screen captures show. The second difference is in the accepted arguments. "hours" accepts a list such as 8-12,13-17. Only hours, no minutes. "-t" takes only one time or a range. Minutes are mandatory here but lists are not allowed. I haven't figured out how to merge "hours" and "-t" without breaking compatibility. I...
I think this problem is now solved with commit [371bd6]. You are right. Command line option "-t" is very different from the "hours" configuration option. "-t" limits the reports to one hour (-t 10 for instance) or one range (-t 8-16 for instance). Any entry outside of the selected hours is ignored. It affects every report including --split and --convert. "hours" accepts a complex set of hours and ignores entries not in one of the listed hour. It doesn't change --split nor --convert. It affects the...
Rewrite hours and weekdays parameters management
Rediector report is not affected by "-t" option
I believe I fixed this bug in git master branch. Dansguardian and user agent reports...
Fix bug #170: logs filtered by -t
You are right, that option can read uncompressed Rejik log. But I just committed...
Read compressed redirector logs.
In addition to what Evgeniy wrote, you may further simplify the script by replacing...
Every entry from your sample file is taken into account in the report I generated...
I used the following template on your sample file redirector_log_format #year#-#mon#-#day#...
#tmp# ignores the token. It's difficult to tell how to fix the template from that...
That error has nothing to do with LDAP. It's iconv complaining that it cannot convert...
Option strip_user_suffix is only available in sarg 2.4. It cannot be backported as...
It's more likely the access.log was rotated away during the week-end. Therefore,...
As suggested by Evgeniy, updating to the newest version is the best solution. But...
Update the option list in the usage page.
What version of sarg are you running? You can find out with this command: sarg -v...
It is common to generate daily, weekly and monthly reports through corresponding...
Update the German and Serbian translations
I'm not sure about what you want to achieve. I'm guessing you want to exclude source...
Update the German and Serbian translations
You are right! I eventually added some code to do the file globbing even if -l is...
Command line options
Command line options
It is very simple. Just call sarg without -l before the input log file names: /usr/local/bin/sarg...
Command line options
Command line options
Command line options
Sarg hasn't been translated to Spanish since the old "language" option was deprecated...
That error is produced if the font file named with the graph_font option in sarg.conf...
Have you looked into the overwrite_report option in sarg.conf? Its description is...
include_users accepts IP addresses instead of user names. Or, at least, it should...
For the record, I added xz support to sarg 2.4. It hasn't been released yet and I...
Build on Linux
Add support to decompress xz files
Sarg can't parse a syslog file directly but you may get away with it if you process...
I don't understand Evgeniy's answer and I may not be the only one :-) so, to spare...
It is possible to generate a report for only one user. See option "-u" in [Command...
XZ support Sarg doesn't support xz compressed files as you noticed and there was...
Build on Linux
You are having two distinct problems. crontab The "crontab -e" command edits the...
Unfortunately, I can't help you. I never went that deep into the permission mana...