Ad Widget

Collapse

Buffer of active checks results on agent side

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shmuma
    Member
    • Nov 2007
    • 49

    #1

    Buffer of active checks results on agent side

    Hello,

    attached patch which implements buffer of active checks on agent in
    case server is unreachable. There was small discussion about this idea
    here: http://www.zabbix.com/forum/showthread.php?t=8361

    The way it works:

    1. There are two additonal unnecesary agentd's parameters:
    ActiveChecksBufSize and ActiveChecksBufFile. First specify size of
    buffer file in MB, second is the file path itself.

    2. When agent trying to send result of active check to server and
    fails by some reason (server is turned off, network is down, server's
    database is down, etc) it stores result in this file.

    3. Buffer file is divided by parts. Each part associated with active
    check and has size protoportional active check refresh rate. So, we
    have effective buffer usage for different active checks.

    4. When connection betwen agent and server is restored (active check
    sent sucessfully) and we have data in our buffer we send history data
    to server. Data sent in one large XML block for each active check.

    5. When there are no connection between agent and server, we can
    restart agent freely: if it fails to obtain list of active checks from
    server, it takes it from local buffer's list.

    So, agent can work independently of server for some time. Of course
    there will be no triggers/events, but we won't lose server's history
    data. This can be very usefull for later analysis when something
    really bad happen to our data center and zabbix server or network
    connectivity is down.

    This patch is against 1.4.4 release.

    With best regards,
    Max Lapan
    Attached Files
    Last edited by Shmuma; 26-12-2007, 13:05.
  • cpicton
    Member
    • Nov 2006
    • 35

    #2
    Thank you!!!!



    This is the final piece of the implementaion issues which needed fixing for my Zabbix migration from nagios.

    I will give feedback if i get eny errors

    Comment

    • bbrendon
      Senior Member
      • Sep 2005
      • 870

      #3
      Does this work with 1.4.5 agents?
      Anyone have a compiled windows agent with this?
      Unofficial Zabbix Expert
      Blog, Corporate Site

      Comment

      • Shmuma
        Member
        • Nov 2007
        • 49

        #4
        No, with 90% probability this patch requires porting. I plan to do this in next few days.

        Zabbix 1.5 beta contain similiar feaure, but store buffer in memory. I don't think this is a great idea: if machine with agent reboots, we lost historical data and have no way to get list of checks, so, if zabbix_server is not reachable, we won't get any infromation afer reboot. In situation when major failure occured (data center is overheated, network is broken or power supply failed), monitored servers can easily reboot in any time, and information about what happend with servers in such periods have great value. So we use our on-disk buffers and planning to do this later.

        I have no windows version of agent with that patch, but it seems that I'll require one very soon. I'll post it here.

        Comment

        • stevenfoo
          Member
          • Mar 2008
          • 46

          #5
          1) Does this patch apply for Windows Zabbix agent?

          2) I am new to Zabbix, how do I apply this patch? What are the steps involved?

          Thanks
          Steve

          Comment

          • Shmuma
            Member
            • Nov 2007
            • 49

            #6
            1. the patch is quite generic and doesn't use any unix-specific features. I didn't tested it on win32, but I'm sure that it should work.

            2. on unix machine you should run 'patch -p1 < agent_buffer.patch' on top of zabbix 1.4.4 sources. I don't know much about windows version of zabbix, but I think that it also require modification of visual studio projects to build (there are two new files introduced by patch).

            Comment

            Working...