sarg

Taking care of your Linux box.
Post Reply
ujb
Cadet
Posts: 10
Joined: Fri Apr 21, 2006 12:17 pm

sarg

Post by ujb »

Dear All
Assalam-O-Alaikum

I am unable to configure sarg properly, my configurations are as given below;

1) First i installed the sarg rpm i.e. sarg-1.4.1-5.2.el4.rf in RedHat Enterprise 4.0 in my system

2) It made a the directory /var/www/sarg/ (it cotains index.html, monthly
and other files), i move this / var/www/sarg/ to path /var/www/html/ (Now
this html folder contains the sarg directory).

3) /etc/sarg it contains the sarg.conf file.

4) /etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
(in above three files i have changed the paths to
/var/www/html/sarg/daily & /var/www/html/sarg/weekly &
/var/www/html/monthly)

5)now i have made a virtual host in my Windows DNS i.e. host name is
"sarg" and my domain name is "lgplaza.com".

6) then i made the configuration in apache /etc/httpd/conf/httpd.conf,
where 10.1.214.53 is apache webserver's ip
<VirutalHost 10.1.214.53:80>
ServerName sarg.lgplaza.com
DocumentRoot /var/www/html/sarg/
</VirtualHost>

7) Now when i open the URL in my browser i.e. sarg.lgplaza.com it opens
the page having heading "Squid Analysis Report Generator" and other menus
i.e.

Squid User's Access Report
DIRECTORY DESCRIPTION
ONE-SHOT One shot reports
daily Daily reports
weekly Weekly reports
monthly Monthly reports


When i click on ONE-SHOT it opens the users statistics , it works ok! but
when i click on daily, weekly and monthly buttons it gives the given below
error.

" Not Found

The requested URL /daily/index.html was not found on this server.
Apache/2.0.52 (Red Hat) Server at sarg.lgplaza.com Port 80 "

8) The configuration in crontab file is
]# cd /etc
etc]# vi crontab

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
HOME=/

# run-parts
#01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly
4 * * * root /usr/bin/sarg >/dev/null 2>&1
~


9) The configuration of cron.daily is

]# cd /etc/cron.daily
cron.daily]# vi sarg


#!/bin/bash
exec /usr/bin/sarg \
-o /var/www/html/sarg/daily \
-d "$(date --date "1 day ago" +%d/%m/%Y)"



10) When i write "sarg" on my CLI to run the script it gives this error;

" [root@discovery ~]# sarg
sort: open failed: /tmp/sarg_tmp/2006May08-2006May09/10.1.214.39.tmp: No
such file or directory
sort: open failed: /tmp/sarg_tmp/2006May08-2006May09/10.110.1.214.20.tmp:
No such file or directory
sort: open failed: /tmp/sarg_tmp/2006May08-2006May09/10.1.214.23.tmp: No
such file or directory
SARG: (removetmp) Cannot open file: /tmp/sarg_tmp/2006May08-2006May09/geral
"



Please guide me what should i do know, your kind favor would be highly
apprecited.

Jazak-Allah
AsadRasheed
Battalion Quarter Master Havaldaar
Posts: 228
Joined: Fri Jan 28, 2005 6:23 pm
Location: Karachi

sarg

Post by AsadRasheed »

Dear ujb,

I dont know wht u r doing .
3) /etc/sarg it contains the sarg.conf file.

4) /etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
(in above three files i have changed the paths to
/var/www/html/sarg/daily & /var/www/html/sarg/weekly &
/var/www/html/monthly)
Why u do this

check this

http://sarg.sourceforge.net/enhancements.php

http://sourceforge.net/forum/forum.php?forum_id=363374

BTW your question is not clear , wht windows is doing in this question :) , ask about the specific field .

Regards,
M Asad Rasheed
registered linux user #394856
http://www.bsdpakistan.org
Post Reply