Ad Widget

Collapse

1.3.5 Request for log rotation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Farzad FARID
    Member
    • Apr 2007
    • 79

    #1

    1.3.5 Request for log rotation

    Hi,

    I know this subject has already been debated last year on the forums (07/2006 I think), but apparently the log rotation mechanism has not been modified and the log file size is still hard coded to 1 Mb.

    It'd be nice if:
    • There was a way to change dynamically the log file size limit
    • Log rotation could be optionnaly handled by an external program
    • If the previous point is not implemented (or as an additionnal feature) keep more than one old log file.


    As I was hit by the 1.3.5 server bug I described previously (http://www.zabbix.com/forum/showthread.php?t=5842), I lost all trace of my old log entries after just a few seconds.

    Regards
  • NOB
    Senior Member
    Zabbix Certified Specialist
    • Mar 2007
    • 469

    #2
    Hi,

    I modified the sources and compiled the server to specify a different
    logfile size for debugging. 1 MB is too small for that.

    I think, you are right: this is not a professional way for increasing the size
    of the logfile.

    But: I am happy with the automatic log rotation built into ZABBIX.
    Together with specifying a larger logfile size somewhere (config file,
    command-line parameter) this will fulfill, at least, my requirements.

    Instead of having 10 logfiles of 1 MB each, I can have two logfiles
    with 50 MB each.
    Your external tool can save the old logfile to whatever name it wants, like .old.1, etc.

    Just my input for this discussion - hoping not to repeat the
    same arguments as last year.

    Regards,

    Norbert.
    Last edited by NOB; 20-04-2007, 08:24.

    Comment

    • Alexei
      Founder, CEO
      Zabbix Certified Trainer
      Zabbix Certified SpecialistZabbix Certified Professional
      • Sep 2004
      • 5654

      #3
      New parameter LogFileSize introduced in pre 1.3.6 is exactly what you need.
      Alexei Vladishev
      Creator of Zabbix, Product manager
      New York | Tokyo | Riga
      My Twitter

      Comment

      • Farzad FARID
        Member
        • Apr 2007
        • 79

        #4
        Originally posted by Alexei
        New parameter LogFileSize introduced in pre 1.3.6 is exactly what you need.
        Thanks Alexei! Could you also add this parameter to the agent please?

        Apparently, as the server and the agent share the same logging and configuration libs, adding the line:
        Code:
              {"LogFileSize",&CONFIG_LOG_FILE_SIZE,0,TYPE_INT,PARM_OPT,0,1024},
        to src/zabbix_agent/zbxconf.c should be enough, right?

        Regards

        Comment

        • Alexei
          Founder, CEO
          Zabbix Certified Trainer
          Zabbix Certified SpecialistZabbix Certified Professional
          • Sep 2004
          • 5654

          #5
          This is done for both agents and server.
          Alexei Vladishev
          Creator of Zabbix, Product manager
          New York | Tokyo | Riga
          My Twitter

          Comment

          • Farzad FARID
            Member
            • Apr 2007
            • 79

            #6
            Originally posted by Alexei
            This is done for both agents and server.
            Hi Alexei,

            Actually no Changing the log rotation does not work for the agent despite your patch.

            I posted a working and tested patch against 1.3.6 in the right forum. It completes yours. With it, changing the logfile size of the agent works.

            Regards.

            Comment

            • Alexei
              Founder, CEO
              Zabbix Certified Trainer
              Zabbix Certified SpecialistZabbix Certified Professional
              • Sep 2004
              • 5654

              #7
              You're right. I didn't check the agent carefully.
              Alexei Vladishev
              Creator of Zabbix, Product manager
              New York | Tokyo | Riga
              My Twitter

              Comment

              Working...