Ad Widget

Collapse

How to keep zabbix_server.log's size under control?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ifernandez
    Junior Member
    • Sep 2015
    • 11

    #1

    How to keep zabbix_server.log's size under control?

    Hello everyone,

    I recently discovered that my zabbix_server.log occupied a whole 50GB. Since the zabbix server had been running normally for a couple of months, more or less, I decided to take down the logging level a notch, and reduced it from level 4 to 3. I deleted the existing zabbix_server.log and restarted the server.

    My question is, is there any housekeeping option (housekeeping, or of any kind, for that matter) that can keep the logfile size controlled in a way? Even if it's by renaming the existing to zabbix_server.<DATE>.log or something, so I can have scripts that clean those out, or simply by deleting older entries in the logfile, or... something

    I can't afford to have logs that take 50GB!

    Thank you very much!
  • kloczek
    Senior Member
    • Jun 2006
    • 1771

    #2
    Originally posted by ifernandez
    I recently discovered that my zabbix_server.log occupied a whole 50GB.
    Default server/proxy/agent settings are
    Code:
    ### Option: LogFileSize
    #       Maximum size of log file in MB.
    #       0 - disable automatic log rotation.
    #
    # Mandatory: no
    # Range: 0-1024
    # Default:
    # LogFileSize=1
    So seems like you've changed it to 0
    http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
    https://kloczek.wordpress.com/
    zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
    My zabbix templates https://github.com/kloczek/zabbix-templates

    Comment

    • ifernandez
      Junior Member
      • Sep 2015
      • 11

      #3
      I had indeed. It's always the obvious things, isn't it?

      Thank you!

      Comment

      • kloczek
        Senior Member
        • Jun 2006
        • 1771

        #4
        Originally posted by ifernandez
        I had indeed. It's always the obvious things, isn't it?

        Thank you!
        In my almost 20 years career as IT professional I've formed kind of two IT laws (lets name them as "kloczek's laws" ):
        1st law: All bad IT cases is possible to put only in two baskets: simple and stupid
        2nd law: Longer time you are working on fixing something than probability that it is something stupid is growing
        http://uk.linkedin.com/pub/tomasz-k%...zko/6/940/430/
        https://kloczek.wordpress.com/
        zapish - Zabbix API SHell binding https://github.com/kloczek/zapish
        My zabbix templates https://github.com/kloczek/zabbix-templates

        Comment

        Working...