Jump to content
EduGeek EdSec 2026 is Go! 27th Oct in Derby! Join us for a day of EdTech security focused talks, networking, and an evening social ×

Recommended Posts

Posted
Some specifics explaining exactly where your having issues would be helpful.

 

It certainly would :D - my bad. Was busy having a play about with it.

 

I have Squid3 installed and have just installed sarg. Been into the conf and changed some things to suit (and you were right, it is very well documented) when I found the file which was in /etc/squid

 

When I browse to http://IPofSquidServer/squid-reports I just get an empty directory - surely this should be populated already with some information.

 

To be honest, I'm not sure if Squid is set up to produce logs (is this done by default)

Posted
It certainly would :D - my bad. Was busy having a play about with it.

 

I have Squid3 installed and have just installed sarg. Been into the conf and changed some things to suit (and you were right, it is very well documented) when I found the file which was in /etc/squid

 

When I browse to http://IPofSquidServer/squid-reports I just get an empty directory - surely this should be populated already with some information.

 

To be honest, I'm not sure if Squid is set up to produce logs (is this done by default)

 

1) Sarg will only produce some reports after it's been run, normally this is done via cron. Have you attempted to run sarg manually?

 

2) Squid spits it's logs out to /var/log/squid/. In particular there should be a human readable access.log in that location. Go check. :)

Posted
1) Sarg will only produce some reports after it's been run, normally this is done via cron. Have you attempted to run sarg manually?

 

2) Squid spits it's logs out to /var/log/squid/. In particular there should be a human readable access.log in that location. Go check. :)

 

There is a access log there with plenty of entries.

 

How do I run it manually (sorry for my ignorance)

Posted
There are cron jobs setup by default for daily/weekly/monthly. Your web server folder will be populated with reports automagically. The only thing you need to keep an eye on is the amount of reports, I had my proxy die from the hard drive being full of sarg reports once :)
  • Thanks 1
  • 3 weeks later...
Posted
There are cron jobs setup by default for daily/weekly/monthly. Your web server folder will be populated with reports automagically. The only thing you need to keep an eye on is the amount of reports, I had my proxy die from the hard drive being full of sarg reports once :)

 

Ok, for some reason I haven't got these Cron jobs and therefore I'm not getting fresh logs.

 

Can somebody post me their cron jobs for these so I can add them how they should be please.

 

Thanks ,

Posted
as far as im aware the cron just runs the generate.pl script.

 

So locate that (on mine its in /etc/webmin/sarg/)

 

then just create a cron to run that once a day/week whatever ?

 

Thanks, still a bit unsure so could you send me your cron please?

Posted (edited)

as i use webmin it is all configured in there.

 

but to create a cron, I would just use nano to create something like this and call it like sarg.sh or something:

 

#/bin/bash
perl /etc/sarg/generate.pl

 

then chmod +x to make it executable

 

and then stick it in the /etc/cron.daily folder.

 

Youll need to change it to whatever the location of the generate.pl is for you

 

(slocate is a good util i use all the time, if its installed just type "locate generate.pl" and it will show you where it is)

Edited by RabbieBurns
to give the .sh file a name
Posted

My mistake, I seem to have this in my crontab instead.

 

# use /bin/bash to run commands, instead of the default /bin/sh
SHELL=/bin/bash
MAILTO="[email protected]"

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

00 08-18/1 * * * /root/sarg-reports today > /dev/null 2>&1
00 00 * * * /root/sarg-reports daily > /dev/null 2>&1
00 01 * * 1 /root/sarg-reports weekly > /dev/null 2>&1
30 02 1 * * /root/sarg-reports monthly > /dev/null 2>&1

 

You can get the sarg-reports script here:

 

$PAGETITLE

  • Thanks 1
Posted
My mistake, I seem to have this in my crontab instead.

 

# use /bin/bash to run commands, instead of the default /bin/sh
SHELL=/bin/bash
MAILTO="[email protected]"

PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin

00 08-18/1 * * * /root/sarg-reports today > /dev/null 2>&1
00 00 * * * /root/sarg-reports daily > /dev/null 2>&1
00 01 * * 1 /root/sarg-reports weekly > /dev/null 2>&1
30 02 1 * * /root/sarg-reports monthly > /dev/null 2>&1

You can get the sarg-reports script here:

 

$PAGETITLE

 

That's what I was looking for - THANKS!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...