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

    Disable nginx access log (to remote syslog server)

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 853 Views
    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.
    • arrmoA
      arrmo
      last edited by

      Hi,

      I have pfSense set up to send syslog information to a remote syslog server - in general it's working fine, no issues. But ... nginx is sending a LOT of traffic across (e.g. ~ 2400 messages in 2 hours), and this is all just for accesses (i.e. access log). I'd like to disable this particular item, and I think the file I need to mess with is /var/etc/syslog.d/pfSense.conf ... but I admit, I'm not real familiar with the syntax of this file. Has anyone had any luck configuring this?

      Thanks in advance for any pointers!

      1 Reply Last reply Reply Quote 0
      • GertjanG
        Gertjan
        last edited by Gertjan

        True, these "access logs" are not really needed and do pollute de remote log.

        @arrmo said in Disable nginx access log (to remote syslog server):

        /var/etc/syslog.d/pfSense.conf

        Noop.
        This is the one that controls syslogd : /etc/syslog.conf
        It's build here 985 -> 1080 in /etc/inc/system.inc

        I tried to rebuild somewhat the last statement :
        Mine is :

        *.* 								@192.168.1.4
        

        so it excludes logs from 'nginx' as a program, or "Local5" as the facility, but no access.

        It's also possible to inform nginx to shut up. See line 1447 :

        	access_log      syslog:server=unix:/var/run/log,facility=local5 combined;
        

        in the same system.inc file.

        What somewhat seem to work without any pfSense file edits :

        4c74ce19-3eef-4849-9bfc-2663360cca37-image.png

        Another solution : On the remote site, filter out Local5.Info messages

        No "help me" PM's please. Use the forum, the community will thank you.
        Edit : and where are the logs ??

        arrmoA 1 Reply Last reply Reply Quote 1
        • arrmoA
          arrmo @Gertjan
          last edited by

          @Gertjan said in Disable nginx access log (to remote syslog server):

          True, these "access logs" are not really needed and do pollute de remote log.

          @arrmo said in Disable nginx access log (to remote syslog server):

          /var/etc/syslog.d/pfSense.conf

          Noop.
          This is the one that controls syslogd : /etc/syslog.conf

          Yes, agree with you! I was thinking filtering at syslog, but I like your idea better 😄

          It's build here 985 -> 1080 in /etc/inc/system.inc

          I tried to rebuild somewhat the last statement :
          Mine is :

          *.* 								@192.168.1.4
          

          so it excludes logs from 'nginx' as a program, or "Local5" as the facility, but no access.

          OK, you lost me there, sorry. With *.* ... everything gets sent across, no? I may be missing your point.

          It's also possible to inform nginx to shut up. See line 1447 :

          	access_log      syslog:server=unix:/var/run/log,facility=local5 combined;
          

          in the same system.inc file.

          What somewhat seem to work without any pfSense file edits :

          Yes, agreed! I like this approach. I changed that line to ,

          access_log off;
          

          And voila, after a webConfigurator restart (to regenerate the needed files) ... no "noise" from the access log. I think this is the best way to go, agreed?

          Another solution : On the remote site, filter out Local5.Info messages

          Right, but that still means all those messages going across => lots of bandwidth and horsepower chewed up (for no good reason ... agreed?)

          Thanks for the thoughts and pointers - much appreciated!

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