Sarg : Hot to correct path to read logs from ?



  • Hi @ll

    Updated sarg on my PFSense box to 2.3.6 pkg v.0.6.1  and found out it is not working any more. I get the
    error message like this :

    php: : The command '/usr/local/bin/sarg -d `date +%d/%m/%Y`-`date +%d/%m/%Y`' returned exit code '1', the output was 'SARG: Cannot get the modification time of input log file /var/log/squid/access.log (No such file or directory). Processing it anyway SARG: File not found: /var/log/squid/access.log'
    

    The problem points to a path problem, in my installation the squid logs reside in /var/squid/logs.

    How can I correct/solve this ?

    Thx in advance

    hafnix



  • somewhere in sarg.inc under
    /usr/local/pkg/

    Not sure if there is an option on squid GUI to change log path.



  • Thank you for the hint but I don't get it. Heres a part from sarg.inc specifying the path :

    // STATIC VARS
    $sarg_proxy=array(	'squid_rc'=> SQUID_DIR . '/etc/rc.d/squid.sh',
    					'squid_config'=> '/var/squid/logs/access.log',
    					'squidguard_config'=> SARG_DIR . '/etc/squidGuard/squidGuard.conf',
    					'squidguard_block_log'=>'/var/squidGuard/log/block.log',
    					'dansguardian_config'=> DANSG_DIR . '/etc/dansguardian/dansguardian.conf',
    					'dansguardian_log'=>'/var/log/dansguardian/access.log');
    

    The path shown there is correct, but I cannot find a variable pointing to the path in the error message



  • Check if you need:

    /var/squid/logs/access.log
    

    or

    /var/log/squid/access.log
    

    Check squid GUI to modify the log path or check the .inc files (squid, sarg) to make it consistent.



  • Hmm, the path /var/squid/logs is the same in the Squid GUI as well as in the *.inc files of Squid and Sarg.



  • Try to disable Log rotation and Squid restart in the Sarg in "Action after Sarg".


Log in to reply