Frédéric Marchal [Mon, 29 Nov 2010 20:22:24 +0000 (20:22 +0000)]
Delete unused files from the directory containing the user report
When the user_report_limit is set and the site_user_time_date report
is requested, the supernumerary time files were not deleted. They were
wasting a lot of disk space.
Now, only the time files that are linked to the user report are kept.
Frédéric Marchal [Sun, 28 Nov 2010 15:41:03 +0000 (15:41 +0000)]
Add an option to sort the topsites by time
This option is not identical to the dynamic sort as it selects the top
sites from the entire list and only displays the requested number of
entries. Then the dynamic sort only offers to sort the truncated list.
Frédéric Marchal [Sun, 28 Nov 2010 15:40:43 +0000 (15:40 +0000)]
Fix a problem in the parsing of the sort option in sarg.conf
The sort criterion of any sort parameter in sarg.conf was not stored
in the internal variable but or'ed with the default value. Therefore,
the sort was not performed if the selected value was tested after the
default value in the code.
Frédéric Marchal [Sat, 27 Nov 2010 21:05:35 +0000 (21:05 +0000)]
Add --lastlog and --keeplogs to the command line options
Those two options supersede the lastlog option from sarg.conf. It is
useful to have them on the command line to change the number of
reports in the daily, weekly or monthly directories.
Fix uninitialized variable when double checking the top users
The configuration option --enable-doublecheck was compiling in an
invalid piece of code that could potentially use an uninitialized
variable when building the list of the top users.
Escape the LDAP search string instead of truncating it.
A few characters must be escaped in a LDAP search string. Sarg used to
truncate the user login name at the first "dubious" character found in
the string and the list of "dubious" character was much longer than
necessary. Instead of truncating the user login, this patch escape the
characters.
Report an error if the tail command cannot read the last lines of the log file when creating a realtime report.
Surrond the log file name with quotes in the command that read the trailing lines of the log file when creating a realtime report.
Frédéric Marchal [Fri, 27 Aug 2010 13:16:43 +0000 (13:16 +0000)]
Initialize the variables that are used to build the date range when command line option -d is used.
It should prevent a segfault if the complex nesting of "if" fails to set a variable.
Thanks to ItalianPenguin for reporting this bug.
Frédéric Marchal [Tue, 17 Aug 2010 09:00:43 +0000 (09:00 +0000)]
Don't delete the temporary directory after sending the e-mail as it is deleted later by the program and it prevent the purging routine from working properly.
Frédéric Marchal [Tue, 17 Aug 2010 09:00:22 +0000 (09:00 +0000)]
Remove the quotes around the MailUtility command to allow the user to call a script or to add more options to the command.
The description of the mail_utility configuration option has been amended accordingly.
Frédéric Marchal [Sun, 15 Aug 2010 17:49:47 +0000 (17:49 +0000)]
Don't use string comparison to sort the top users, top sites and user lists.
Allow for the translation of the sort criterion and order of the top users, top sites and user lists.
Add a configuration option to report any error in the sum of the in-cache and out-cache columns of the reports. The sum must be 100.00%.
The total column is also checked for any discrepency.
The check is activated at compile time as it will likely be used by me alone.
Don't save the unnecessary columns in the intermediary file that is sorted to produce the report with the IP addresses from which the user connected to the internet. It should reduce the required amount of free disk space to run sarg.
Fix the reporting of the IP addresses from which the user connected to the internet. The date column was limited to 8 characters which is too short for a date formated as dd/mm/yyyy.
The two sarg.conf options "hours" and "weekdays" lacked a return statement after processing the option. That produced an error stating that the options were invalid but was not preventing sarg from working just fine.
Frédéric Marchal [Thu, 10 Jun 2010 08:49:48 +0000 (08:49 +0000)]
Replace redirector_ignore_date by redirector_filter_out_date that behave as the name implies.
Replace dansguardian_ignore_date by dansguardian_filter_out_date that behave as the name implies.
Initialize the variables used when reading a redirector log with a custom format.
Frédéric Marchal [Tue, 18 May 2010 20:46:56 +0000 (20:46 +0000)]
Output both date/time textual reports.
Sarg log file stores the date as dd/mm/yyyy and doesn't change it depending on the current date representation selected in sarg.conf.
Intermediary log files store the date as dd/mm/yyyy irrespective of the current date representation in sarg.conf.
Frédéric Marchal [Tue, 11 May 2010 07:00:43 +0000 (07:00 +0000)]
Accept the old option squidguard_log_format but display a warning if it is used.
Replace squidguard_ignore_date by redirector_ignore_date but keep the old option with a warning.
Frédéric Marchal [Mon, 10 May 2010 08:13:09 +0000 (08:13 +0000)]
Fix a regression when processing an input log not in the squid format (the date was not written into the intermediary logs).
Check more return code when writing files.
Use a boolean to select the content of the graph instead of a string (the two possible values are not mutually exclusive on purpose).