Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    E-Mail Reports

    pfSense Packages
    2
    4
    836
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      Bigdaddy168
      last edited by

      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.

      1 Reply Last reply Reply Quote 0
      • jimpJ
        jimp Rebel Alliance Developer Netgate
        last edited by

        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
        

        Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

        Need help fast? Netgate Global Support!

        Do not Chat/PM for help!

        1 Reply Last reply Reply Quote 0
        • B
          Bigdaddy168
          last edited by

          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.

          1 Reply Last reply Reply Quote 0
          • jimpJ
            jimp Rebel Alliance Developer Netgate
            last edited by

            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?

            Remember: Upvote with the 👍 button for any user/post you find to be helpful, informative, or deserving of recognition!

            Need help fast? Netgate Global Support!

            Do not Chat/PM for help!

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.