This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Howto export HTTP Proxy usage log ?

Hi all,
I shall like to be able to export the logs of the HTTP PROXY USAGE for a treatment statistics under Excel for example.

How have to I take myself there?

Exist it tools to automate this spot?
The East what I can use a waiter syslog for exporte this logs?

Thank you very much

Ignacio CASA  


This thread was automatically locked due to age.
Parents
  • Hi Ignacio,
       I found the solution to export this logs to external server using ftp connection to ftp server.

    First, i put the ftp binary file on ASL box, it is not so secure for firewall, but my customer accept the risks.

    After I make the perl script to convert the time stamp from logs to understanding time and date from log lines because squid uses timestamp as default. the script is called scriptc.pl.

    --->begin file
    #!/usr/bin/perl

    open (INP,"/var/chroot-squid/logs/access.log");
    while (not eof(INP)) {
        ($logtime,$otherinfo)=split(/ /,,2);
        ($sec,$min,$hour,$day,$mon,$year,$tmp,$tmp,$tmp) =localtime($logtime);
        $mon+=1; $year+=1900;
        print"$year/$mon/$day $hour:$min:$sec $otherinfo";
    }
     Begin of file
    cp /var/chroot-squid/logs/access.log /userdir
    /userdir/scriptc.pl > /userdir/access.log.tmp
    ftp -n 192.168.60.100  Begin of file
    user ftpuser ftppassword
    prompt
    put access.log.tmp 
    bye
Reply
  • Hi Ignacio,
       I found the solution to export this logs to external server using ftp connection to ftp server.

    First, i put the ftp binary file on ASL box, it is not so secure for firewall, but my customer accept the risks.

    After I make the perl script to convert the time stamp from logs to understanding time and date from log lines because squid uses timestamp as default. the script is called scriptc.pl.

    --->begin file
    #!/usr/bin/perl

    open (INP,"/var/chroot-squid/logs/access.log");
    while (not eof(INP)) {
        ($logtime,$otherinfo)=split(/ /,,2);
        ($sec,$min,$hour,$day,$mon,$year,$tmp,$tmp,$tmp) =localtime($logtime);
        $mon+=1; $year+=1900;
        print"$year/$mon/$day $hour:$min:$sec $otherinfo";
    }
     Begin of file
    cp /var/chroot-squid/logs/access.log /userdir
    /userdir/scriptc.pl > /userdir/access.log.tmp
    ftp -n 192.168.60.100  Begin of file
    user ftpuser ftppassword
    prompt
    put access.log.tmp 
    bye
Children
No Data