1. Subscriptions
  2. Services
  3. Hardware
  4. Support

ClearFoundation

Forums
Welcome, Guest
I can't show Dansguardian logs and logfile is huge
(1 viewing) 1 Guest
Go to bottomPage: 1
TOPIC: I can't show Dansguardian logs and logfile is huge
#19890
I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
I saw the log files when I can't show dansguardian logs on web console.

[root@antalya etc]# ls -l /var/log/dansguardian
total 91364
-rw-r--r-- 1 dansguardian clamav 93218580 Nov 3 09:06 access.log
-rw-r--r-- 1 dansguardian clamav 231268 Oct 30 21:13 access.log.1

Is there anything wrong?

(5.2 Sp1 Installed)
Ali Erkan IMREK
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#19909
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
Yes, something is wrong. The log file should NOT be orders of magnitude larger than the older file.

Make sure you are not running out of disk space because of this condition.

df -h

This file will be much to lengthy to process from Webconfig and you will need to determine the cause using command line tools such as:

tail -n 500 /var/log/dansguardian/access.log

or edit the file with vi and find out what is wrong.

If the file is consuming the balance of your hard disk, you may have to just delete it and troubleshoot moving forward.
Dave Loper
ClearFoundation
Posts: 591
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#19913
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
Nothing wrong, it's just the Webconfig gui will only allow a maximum log size to be displayed (512k I think). You can view the entire contents of the file under the directory you listed. This will be up to date.

One thing I like to do if I'm trying to debug why certain sites won't come up in the browser(s) is rotate the log so it's empty and I can then view fresh content in the gui log (I'm hoping the guys will include a logrotate feature in ClearOS 6.0 - I just added that to the wish list).

Code:

logrotate -f /etc/logrotate.d/dansguardian-av

Dirk Albring
Gold Boarder
Posts: 305
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
God Bless,
Dirk
 
#19944
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
Thanks for reply,

Disk space is enough David and there aren't unusual records in access.log, I have ~30 client and they works on internet all day long. Dirk is right, Webconfig doesn't read the log file, it was very big.

The real problem is that logrotate progress is not working properly. I tried to force it as Dirk's said and that worked smoothly.

Finally I added "-f" parameter into /etc/cron.daily/logrotate file.

Code:


#!/bin/sh

/usr/sbin/logrotate /etc/logrotate.conf -f
EXITVALUE=$?
if [ $EXITVALUE != 0 ]; then
    /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]"
fi
exit 0



I hope it will solve my problem but it's looking as a bug.
Ali Erkan IMREK
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#19946
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
You could put a size restriction in /etc/logrotate.d/dansguardian-av by adding something like
Code:

size 400k


in the script and then logrotate more frequently by placing the same logrotate script from cron.daily into cron.hourly
Dirk Albring
Gold Boarder
Posts: 305
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
God Bless,
Dirk
 
#19953
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
I think your forced logrotate is going to rotate all logs on a daily basis rather than just the dansguardian-av log. Is this what you want? I can't check as I don't have access to my system from work, but in /etc/logrotate.d/dansguardian-av you should find a line which says "weekly". Change it to "daily" and it should rotate daily. You may also want to change the "rotate 4" line to keep more than 4 days of history.
Nick Howitt
Platinum Boarder
Posts: 2824
graphgraph
User Online Now Click here to see the profile of this user
The administrator has disabled public write access.
 
#19975
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
There aren't any line as daily or weekly in /etc/logrotate.d/dansguardian-av, but I had inserted daily line to the file yesterday. dansguardian log was rotated tonight. So, my problem is looking solved.

But webconfig log report gui should be useful, can be paging feature for long records. You can look at Endian Firewall proxy log gui, I've been used it.
Ali Erkan IMREK
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
Last Edit: 2010/11/05 04:01 By alierkanimrek.
The administrator has disabled public write access.
 
#20134
Re:I can't show Dansguardian logs and logfile is huge 1 Year, 6 Months ago  
Im wrong Dansguardian log isn't rotated daily but Webconfig gui is beeing shown correctly for now. I didn't try to put a size restriction yet.
Ali Erkan IMREK
Fresh Boarder
Posts: 7
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
  get the latest posts directly to your desktop