E-Mail Reports

  • Hey guys,

    i am experiencing problems with the E-Mail Reports package and log outputs from squidguard.
    The command is " clog /var/squidGuard/log/block.log | grep date "+%Y-%m-%d" ".
    On some machines it is working, on some it won't work automatically (the output of the command is empty).
    But if i send the report manually via clicking the send-button, the output is correct.

    Any ideas? Thanks in advance.

  • Rebel Alliance Developer Netgate

    Use the fill path to clog and grep, not just the name of the command.

    Also, that is not a clog file so just grep directly on it.

    /usr/bin/grep `date "+%Y-%m-%d"` /var/squidGuard/log/block.log

  • Thank You very much!
    I changed the command as you said but the result is the same.
    On some machines the output is correct and on other machines it is empty.

  • Rebel Alliance Developer Netgate

    I missed one, date should also use the full path

    /usr/bin/grep `/bin/date "+%Y-%m-%d"` /var/squidGuard/log/block.log

    If that returns nothing, are you certain there were log entries from that day? Maybe you ran the command just after midnight and the log didn't have anything yet for the 'current' day?