Link to home
Create AccountLog in
Avatar of Zolf
ZolfFlag for United Arab Emirates

asked on

Setup SARG to view reports


hello there,

i have setup sarg on zentyal firewall with EE(expert_tammy) help. i want to take it furthur to view the report on the server itself.

cheers
zolf
Avatar of expert_tanmay
expert_tanmay
Flag of Singapore image

Can u please check ps -ef | grep httpd
I need to know if your webserver is running...

regards
Do you have mozilla firefox on the desktop of the server?
Avatar of Zolf

ASKER


Do you have mozilla firefox on the desktop of the server?
yes i have.
Avatar of Zolf

ASKER


test@ubuntu:/$ ps -ef | grep httpd
test      9821 31676  0 13:20 pts/3    00:00:00 grep --color=auto httpd
test@ubuntu:/$
You start firefox on the server. In the address bar type file:///var/www/squid-reports/ and press enter..
This will show you the folder reports based on date like we had seen 2011Jan02-2011Jan02, click on the folder and view the report...

regards
Avatar of Zolf

ASKER


so i managed to view the report like that. but can we have it setup say for e.g. http://ubuntu/report.

also i find the report weird. in the userid col, it shows IPs not related to my dhcp lease. i mean the ips in there is 204.45.66.34 and so on.how do i find what users have visited those sites.??.i will try to take a snapshot and display here to make it easy for you to understand what i mean
Avatar of Zolf

ASKER


i dont know how to take print shot on ubuntu server and send you.any way hope you understood what i mean. you see my Zentyal firewall i have DHCP enabled and is giving ip to the clients in the range 192.168.0.100 to 200. but in the sarg report it shows users col with ip 184.154.65.46
I got what you are asking you need the user's who has visited what sites. To do that we need to add few lines in your squid.conf. What will happen is when user starts his browser for the first time squid will ask the user for username and password. Also you will have to create these squid users on server.

Is that ok with you??
Avatar of Zolf

ASKER


by the way,what are those userid which it shows.is it the sites users visited or what. i have attached one file of the report.

how can i config the repoprt page more convinently. instead of typing file:///var/www
We can install webmin..
Download webmin from http://prdownloads.sourceforge.net/webadmin/webmin_1.530_all.deb and install on your server.
To install the command is
dpkg -i webmin_downloaded_filename.deb

regards
Avatar of Zolf

ASKER


what is this software for. i download the file and then run that command.correct?? were do i download this like to or where do i run this command from.
Avatar of Zolf

ASKER


please help
Avatar of Zolf

ASKER


by the way what are those IPs it is displaying in the squid report.i am confused
You have to download the file from the link I have provided and run the command to install it. The application will give you web interface to configure, monitor and display all admin related activities...

After you have installed it you can access it from any where in your LAN, start any web browser and type the url
http://<IP_ADDRESS_OF_YOUR_SERVER>:10000

the login page will appear, put the username as root and password what ever you have to login to your server..
Avatar of Zolf

ASKER


thanks.

i get this error when i run the command

root@ubuntu:/home/test/Downloads# dpkg -i webmin_1.530_all.deb
Selecting previously deselected package webmin.
(Reading database ... 97615 files and directories currently installed.)
Unpacking webmin (from webmin_1.530_all.deb) ...
dpkg: dependency problems prevent configuration of webmin:
 webmin depends on libio-pty-perl; however:
  Package libio-pty-perl is not installed.
 webmin depends on apt-show-versions; however:
  Package apt-show-versions is not installed.
dpkg: error processing webmin (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
Errors were encountered while processing:
 webmin
root@ubuntu:/home/test/Downloads#

You need to install the dependencies libio-pty-perl and apt-show-versions.
the links are as follows
http://packages.debian.org/sid/libio-pty-perl
http://packages.debian.org/lenny/apt-show-versions
Avatar of Zolf

ASKER


i downloaded these file in root@ubuntu:/home/test/Downloads#

libio-pty-perl_1.08.orig.tar.gz

apt-show-versions_0.15.tar.gz

how do i install them now
untar them into some folder
untar command is
tar -xvzf libio-pty-perl_1.08.orig.tar.gz
after untar check the folder you will find a readme on how to install.
Hi
Did u manage to install?
Avatar of Zolf

ASKER


HI expert_tanmay:

sorry for my silent,i was ill.

i managed to install libio-pty-perl_1.08.orig.tar.gz
but for apt-show-versions_0.15.tar.gz,there is no readdme file. can you please help me to install this too.
Avatar of Zolf

ASKER


this is the directory structure of apt-show-version

root@ubuntu:/home/test/Downloads/apt-show-versions-0.15# ls
apt-show-versions  apt-show-versions.bash_completion  debian  Makefile.PL  man
Avatar of Zolf

ASKER


i tried this,but i got some message

root@ubuntu:/home/test/Downloads/apt-show-versions-0.15# apt-get install apt-show-versions
Reading package lists... Done
Building dependency tree      
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  webmin: Depends: libio-pty-perl but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ubuntu:/home/test/Downloads/apt-show-versions-0.15#
Avatar of Zolf

ASKER


please help
Why don't you directly try apt-get install webmin
Avatar of Zolf

ASKER

i tried this apt-get install webmin and i get this error

root@ubuntu:/home/test# apt-get install webmin
Reading package lists... Done
Building dependency tree      
Reading state information... Done
webmin is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  webmin: Depends: libio-pty-perl but it is not going to be installed
          Depends: apt-show-versions but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ubuntu:/home/test#
Untar apt-show-versions_0.15.tar.gz

tar -xvzf apt-show-versions_0.15.tar.gz
this will extract the contents in to a folder apt-show....
cd to this folder and execute the following commands

perl Makefile.PL
make
make install

Avatar of Zolf

ASKER


can you please have a look at this if it has installed properly

root@ubuntu:/home/test/Downloads# cd apt-show-versions-0.15/
root@ubuntu:/home/test/Downloads/apt-show-versions-0.15# ls
apt-show-versions  apt-show-versions.bash_completion  debian  Makefile.PL  man
root@ubuntu:/home/test/Downloads/apt-show-versions-0.15# perl Makefile.PL
WARNING: Setting VERSION via file './apt-show-versions' failed
 at /usr/share/perl/5.10/ExtUtils/MakeMaker.pm line 571
Writing Makefile for apt-show-versions
root@ubuntu:/home/test/Downloads/apt-show-versions-0.15# make
cp ./apt-show-versions blib/script/apt-show-versions
/usr/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/apt-show-versions
Manifying blib/man1/apt-show-versions.1p
root@ubuntu:/home/test/Downloads/apt-show-versions-0.15# make install
Installing /usr/local/man/man1/apt-show-versions.1p
Installing /usr/local/bin/apt-show-versions
Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.pod
root@ubuntu:/home/test/Downloads/apt-show-versions-0.15#
excellent your apt-show-versions has got installed now try to install webmin

dpkg -i webmin_1.530_all.deb
Avatar of Zolf

ASKER


do i need to be in a specific directory to run this command
Yes in the folder where you have the downloaded file webmin_1.530_all.deb
Avatar of Zolf

ASKER


thanks very much for your help.this is the outoput i get,i see some failure,can you please have a look if all went well

root@ubuntu:/home/test/Downloads# dpkg -i webmin_1.530_all.deb
(Reading database ... 113882 files and directories currently installed.)
Preparing to replace webmin 1.530 (using webmin_1.530_all.deb) ...
Unpacking replacement webmin ...
dpkg: dependency problems prevent configuration of webmin:
 webmin depends on libio-pty-perl; however:
  Package libio-pty-perl is not installed.
 webmin depends on apt-show-versions; however:
  Package apt-show-versions is not installed.
dpkg: error processing webmin (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
Errors were encountered while processing:
 webmin
root@ubuntu:/home/test/Downloads#
it is still complaining libio-pty-perl and apt-show-versions not installed. Because above it said Installing /usr/local/bin/apt-show-versions. Do you have multiple copies of perl installed?

give me output of
find / -name perl
Avatar of Zolf

ASKER

root@ubuntu:/home/test/Downloads# find / -name perl
/usr/share/doc/perl
/usr/share/lintian/overrides/perl
/usr/share/perl
/usr/lib/perl
/usr/local/lib/perl
/usr/bin/perl
/etc/apparmor.d/abstractions/perl
/etc/freeradius/modules/perl
/etc/perl
/etc/bash_completion.d/perl
root@ubuntu:/home/test/Downloads#
Edit /etc/apt/sources.list and make sure the lines ending with universe  are not commented out means remove # from front of the line are removed.

execute the following
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl

if this goes through well then execute
sudo dpkg --install webmin_1.530_all.deb

regards
Avatar of Zolf

ASKER


this the sources.list ofmine all are uncommented
# 
# deb cdrom:[Ubuntu-Server 10.04.1 LTS _Lucid Lynx_ - Release i386 (20100816.2)]/ lucid extras main restricted

#deb cdrom:[Ubuntu-Server 10.04.1 LTS _Lucid Lynx_ - Release i386 (20100816.2)]/ lucid extras main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://in.archive.ubuntu.com/ubuntu/ lucid main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://in.archive.ubuntu.com/ubuntu/ lucid-updates main restricted
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://in.archive.ubuntu.com/ubuntu/ lucid universe
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid universe
deb http://in.archive.ubuntu.com/ubuntu/ lucid-updates universe
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://in.archive.ubuntu.com/ubuntu/ lucid multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid multiverse
deb http://in.archive.ubuntu.com/ubuntu/ lucid-updates multiverse
deb-src http://in.archive.ubuntu.com/ubuntu/ lucid-updates multiverse

## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://in.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse
# deb-src http://in.archive.ubuntu.com/ubuntu/ lucid-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu lucid partner
# deb-src http://archive.canonical.com/ubuntu lucid partner
deb http://ppa.launchpad.net/zentyal/2.0/ubuntu lucid main

deb http://security.ubuntu.com/ubuntu lucid-security main restricted
deb-src http://security.ubuntu.com/ubuntu lucid-security main restricted
deb http://security.ubuntu.com/ubuntu lucid-security universe
deb-src http://security.ubuntu.com/ubuntu lucid-security universe
deb http://security.ubuntu.com/ubuntu lucid-security multiverse
deb-src http://security.ubuntu.com/ubuntu lucid-security multiverse
deb http://archive.canonical.com/ubuntu lucid partner

Open in new window

Ok execute the following
sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl

if this goes through well then execute
sudo dpkg --install webmin_1.530_all.deb
Avatar of Zolf

ASKER


please see below
root@ubuntu:/home/test/Downloads# sudo apt-get install perl libnet-ssleay-perl openssl libauthen-pam-perl libpam-runtime libio-pty-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
perl is already the newest version.
libnet-ssleay-perl is already the newest version.
libnet-ssleay-perl set to manually installed.
libauthen-pam-perl is already the newest version.
libauthen-pam-perl set to manually installed.
libpam-runtime is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  webmin: Depends: apt-show-versions but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ubuntu:/home/test/Downloads# sudo dpkg --install webmin_1.530_all.deb
(Reading database ... 113882 files and directories currently installed.)
Preparing to replace webmin 1.530 (using webmin_1.530_all.deb) ...
Unpacking replacement webmin ...
dpkg: dependency problems prevent configuration of webmin:
 webmin depends on libio-pty-perl; however:
  Package libio-pty-perl is not installed.
 webmin depends on apt-show-versions; however:
  Package apt-show-versions is not installed.
dpkg: error processing webmin (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
Errors were encountered while processing:
 webmin
root@ubuntu:/home/test/Downloads#

Open in new window

give me the output of
find / -name webmin*
and
ps -ef|grep webmin
Avatar of Zolf

ASKER


root@ubuntu:/home/test/Downloads# find / -name webmin*
/home/test/Downloads/webmin_1.530_all.deb
root@ubuntu:/home/test/Downloads# 

==================================================

root@ubuntu:/home/test/Downloads# ps -ef|grep webmin
root     12911 21317  0 13:54 pts/2    00:00:00 grep --color=auto webmin
root@ubuntu:/home/test/Downloads#

Open in new window

Your repository is stuck somewhere any way execute the commands below
apt-get clean
apt-get check
apt-get install libio-pty-perl
Avatar of Zolf

ASKER


appreciate your patience and help.please let me know from were do i need to run these commands.
as user root on the console..
Avatar of Zolf

ASKER


of,i ran those three commands.please see below for the outputs. what do i do next
root@ubuntu:/# apt-get clean
root@ubuntu:/# apt-get check
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these.
The following packages have unmet dependencies:
  webmin: Depends: libio-pty-perl but it is not installed
          Depends: apt-show-versions but it is not installed
E: Unmet dependencies. Try using -f.
root@ubuntu:/# apt-get install libio-pty-perl
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  webmin: Depends: apt-show-versions but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ubuntu:/# ^C
root@ubuntu:/#

Open in new window

Avatar of Zolf

ASKER


i then tried to run the below command,but still it cry's for those two packages
root@ubuntu:/home/test/Downloads# sudo dpkg --install webmin_1.530_all.deb
(Reading database ... 113882 files and directories currently installed.)
Preparing to replace webmin 1.530 (using webmin_1.530_all.deb) ...
Unpacking replacement webmin ...
dpkg: dependency problems prevent configuration of webmin:
 webmin depends on libio-pty-perl; however:
  Package libio-pty-perl is not installed.
 webmin depends on apt-show-versions; however:
  Package apt-show-versions is not installed.
dpkg: error processing webmin (--install):
 dependency problems - leaving unconfigured
Processing triggers for ureadahead ...
Errors were encountered while processing:
 webmin
root@ubuntu:/home/test/Downloads#

Open in new window

Pls execute the following on your console.
apt-get -f install webmin
Avatar of Zolf

ASKER


root@ubuntu:/home/test# apt-get -f install webmin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
webmin is already the newest version.
You might want to run `apt-get -f install' to correct these:
The following packages have unmet dependencies:
  webmin: Depends: libio-pty-perl but it is not going to be installed
          Depends: apt-show-versions but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@ubuntu:/home/test#

Open in new window

Just run the following on console webmin has got installed..
apt-get -f install

regards
Avatar of Zolf

ASKER


i think it worked this time. what do we do next and what is this used for
root@ubuntu:/home/test/Downloads# apt-get -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  apt-show-versions libio-pty-perl
The following NEW packages will be installed:
  apt-show-versions libio-pty-perl
0 upgraded, 2 newly installed, 0 to remove and 111 not upgraded.
1 not fully installed or removed.
Need to get 76.1kB of archives.
After this operation, 365kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://in.archive.ubuntu.com/ubuntu/ lucid/main libio-pty-perl 1:1.07-2build1 [42.4kB]
Get:2 http://in.archive.ubuntu.com/ubuntu/ lucid/universe apt-show-versions 0.16 [33.7kB]
Fetched 76.1kB in 5s (13.4kB/s)            
Selecting previously deselected package libio-pty-perl.
(Reading database ... 113882 files and directories currently installed.)
Unpacking libio-pty-perl (from .../libio-pty-perl_1%3a1.07-2build1_i386.deb) ...
Selecting previously deselected package apt-show-versions.
Unpacking apt-show-versions (from .../apt-show-versions_0.16_all.deb) ...
Processing triggers for man-db ...
Setting up libio-pty-perl (1:1.07-2build1) ...
Setting up apt-show-versions (0.16) ...
** initializing cache. This may take a while **

Setting up webmin (1.530) ...
Webmin install complete. You can now login to https://ubuntu:10000/
as root with your root password, or as any user who can use sudo
to run commands as root.

root@ubuntu:/home/test/Downloads#

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of expert_tanmay
expert_tanmay
Flag of Singapore image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of Zolf

ASKER


ok used this link and get a login page.what are the credentials any idea
https://ubuntu:10000/
your root user that you use to login to the server..
Avatar of Zolf

ASKER


cool,now what do we do.can you please tell me what are we using webmin to acheive
Click Un-used modules in the side bar. Next click Squid Report Generator. We need to configure SARG so click module configuration.

Change the value of Full path to SARG configuration file to  /usr/local/sarg/sarg.conf then click the Save.
------------------------------------------------------------------------------------------------------------------------

Next time you need to use the Squid Report Generator, look for it under Servers instead of Un-used modules.

Next, click View completed report.
Avatar of Zolf

ASKER


i want to clsoe the question and i have opened a new question.please help me to config it.

https://www.experts-exchange.com/questions/26747400/Config-Webmin.html
Avatar of Zolf

ASKER


thanks a lot for your help