Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-9955

Zabbix Agent active checks - server lastlogsize values doesn't affect agent's lastlogsize values

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • None
    • 2.4.6
    • Documentation (D)
    • CentOS

      The problem is that documentation says:

      "The number of bytes already analyzed (the size counter) and last modification time (the time counter) are stored in the Zabbix database and are sent to the agent, to make sure it starts reading the log file from this point."

      For example I have an agent which monitor some log file. The agent has some changes to report. It sends the changes and lastlogsize (let it be "4") to the server. But something bad happens and server doesn't store it. Next time the agent will get some check list from the server where lastlogsize will be still equal "3". But agent doesn't care about this lastlogsize because it has its own lastlogsize (equal "4").

      This way we will lost last changes because we continue monitoring from agent's size. And this code explanes why:

      static void	 add_check(...)
      {
              ...
              for (i = 0; NULL != active_metrics[i].key; i++)
      	{
      		if (0 != strcmp(active_metrics[i].key_orig, key_orig))
      			continue;
      
      		if (0 != strcmp(active_metrics[i].key, key))
      		{  
                          ...
                          {color:red} active_metrics[i].lastlogsize = lastlogsize; {color}
                          ...
                      }
      
                      ...
               }
               ...
      }
      

      We will update agent's lastlogsize value only if the metric's key was changed. And this is correct, but why emphasis only emphasis?

      Is it just not clear documentation or wrong behavior of the agent?

            Unassigned Unassigned
            GogaRUFI Egor
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: