If you want to generate daily reports from Squid proxy server logs, create script:
#!/bin/bash
#Get current date
TODAY=$(date +%d/%m/%Y)
#Get yesterday's date
YESTERDAY=$(date --date yesterday +%d/%m/%Y)
/usr/bin/sarg -z -d $YESTERDAY-$TODAY > /dev/null 2>&1
exit 0
And add it to cron jobs:
55 23 * * * /scripts/sarg_daily_report
share on: facebook
No comments:
Post a Comment