Ad Widget

Collapse

zabbix_traps.tmp growing infinitely

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Tester001
    Junior Member
    • Feb 2023
    • 10

    #1

    zabbix_traps.tmp growing infinitely

    Dear Zabbix Community,

    I am using the following official script to relay SNMP traps to Zabbix:
    Real-time monitoring of IT components and services, such as networks, servers, VMs, applications and the cloud. - zabbix/zabbix


    I've noticed that the /tmp/zabbix_traps.tmp file is growing infinitely.

    How are you dealing with this problem in your deployments?

    Thank you in advance!
  • cyber
    Senior Member
    Zabbix Certified SpecialistZabbix Certified Professional
    • Dec 2006
    • 4807

    #2
    Logrotate is invented loooong time ago.. https://linux.die.net/man/8/logrotate

    Comment

    • Tester001
      Junior Member
      • Feb 2023
      • 10

      #3
      cyber, would you be so kind and share a confirguration that you know works?

      The following doesn't work for me, sadly:
      HTML Code:
      logrotate /etc/logrotate.d/zabbix-traps
      
      
          /tmp/zabbix_traps.tmp {
              su root root
              daily
              notifempty
              missingok
              rotate 0
              maxsize 100000000
              compress
              delaycompress
          }
      
      ​
      Attached Files

      Comment

      • cyber
        Senior Member
        Zabbix Certified SpecialistZabbix Certified Professional
        • Dec 2006
        • 4807

        #4
        10 0 * * * /usr/sbin/logrotate -s /path/to/logrotate.status -f /path/to/logrotate.conf
        logrotate.conf
        Code:
        /path/to/logfiles/*.log {
        compress
        create
        copytruncate
        daily
        dateext
        dateformat .%Y%m%d
        delaycompress
        missingok
        rotate 7
        }

        Comment

        • Tester001
          Junior Member
          • Feb 2023
          • 10

          #5
          Thank you, Cyber!

          Comment

          Working...