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

    Disable statistics in Syslog-NG - log spam

    Scheduled Pinned Locked Moved General pfSense Questions
    3 Posts 2 Posters 1.1k 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.
    • P
      ProxyMoron
      last edited by ProxyMoron

      Hi All,
      Is there any way to disable statistics in syslog-ng? These spam the logs and make it difficult to track issues an example is below:-

      Jan  6 22:43:00 pfsense syslog-ng[25273]: Log statistics; processed='global(internal_queue_length)=0', queued='global(scratch_buffers_count)=0', queued='global(scratch_buffers_bytes)=0', processed='global(msg_clones)=0', processed='src.internal(_DEFAULT#0)=84', stamp='src.internal(_DEFAULT#0)=1641508380', processed='center(received)=129', processed='center(queued)=129', processed='destination(_DEFAULT)=129', processed='global(payload_reallocs)=83', processed='source(_DEFAULT)=129', dropped='global(internal_source)=0', queued='global(internal_source)=0', processed='global(sdata_updates)=0'
      Jan  6 22:53:00 pfsense syslog-ng[25273]: Log statistics; processed='global(internal_queue_length)=0', queued='global(scratch_buffers_count)=0', queued='global(scratch_buffers_bytes)=0', processed='global(msg_clones)=0', processed='src.internal(_DEFAULT#0)=85', stamp='src.internal(_DEFAULT#0)=1641508980', processed='center(received)=130', processed='center(queued)=130', processed='destination(_DEFAULT)=130', processed='global(payload_reallocs)=84', processed='source(_DEFAULT)=130', dropped='global(internal_source)=0', queued='global(internal_source)=0', processed='global(sdata_updates)=0'
      Jan  6 23:03:00 pfsense syslog-ng[25273]: Log statistics; processed='global(internal_queue_length)=0', queued='global(scratch_buffers_count)=0', queued='global(scratch_buffers_bytes)=0', processed='global(msg_clones)=0', processed='src.internal(_DEFAULT#0)=86', stamp='src.internal(_DEFAULT#0)=1641509580', processed='center(received)=131', processed='center(queued)=131', processed='destination(_DEFAULT)=131', processed='global(payload_reallocs)=85', processed='source(_DEFAULT)=131', dropped='global(internal_source)=0', queued='global(internal_source)=0', processed='global(sdata_updates)=0'
      Jan  6 23:13:00 pfsense syslog-ng[25273]: Log statistics; processed='global(internal_queue_length)=0', queued='global(scratch_buffers_count)=0', queued='global(scratch_buffers_bytes)=0', processed='global(msg_clones)=0', processed='src.internal(_DEFAULT#0)=87', stamp='src.internal(_DEFAULT#0)=1641510180', processed='center(received)=132', processed='center(queued)=132', processed='destination(_DEFAULT)=132', processed='global(payload_reallocs)=86', processed='source(_DEFAULT)=132', dropped='global(internal_source)=0', queued='global(internal_source)=0', processed='global(sdata_updates)=0'
      

      I found a commit in TrueNAS where they modified the syslog-ng.conf file from:-

      options { chain_hostnames(off); flush_lines(0); threaded(yes); use-fqdn(no); };

      to:-

      options { chain_hostnames(off); flush_lines(0); threaded(yes); use-fqdn(no); stats-freq(0); };

      But when i open /usr/local/etc/syslog-ng.conf on pfsense it specifically says:-

      This file is automatically generated by pfSense
      Do not edit manually !

      Any other way of doing this?

      1 Reply Last reply Reply Quote 0
      • stephenw10S
        stephenw10 Netgate Administrator
        last edited by stephenw10

        You can create an options object in the package and add whatever you need.

        Screenshot from 2022-01-07 20-18-32.png

        Results in:

        # This file is automatically generated by pfSense
        # Do not edit manually !
        @version:3.32
        destination _DEFAULT { file("/var/syslog-ng/default.log"); };
        log { source(_DEFAULT); destination(_DEFAULT); };
        source _DEFAULT { internal(); syslog(transport(udp) port(5140) ip(192.168.144.1)); };
        options {chain_hostnames(off); flush_lines(0); threaded(yes); use-fqdn(no); stats-freq(0);};
        

        Steve

        1 Reply Last reply Reply Quote 1
        • P
          ProxyMoron
          last edited by

          Ahh that's brilliant,
          I didn't equate that option in the advanced settings with the config file.

          Many thanks

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