ZABBIX BUGS AND ISSUES
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-8584

vmware.eventlog key read same eventlog several times

    Details

      Description

      It seems that vmware.eventlog key read same eventlog several times.

        Activity

        Hide
        Andris Zeila added a comment - - edited

        The problem is because vmware returns log records in reverse order. So instead of setting lastlogsize to the biggest event key (id) it is set to the smallest.

        Also a different issue - EventHistoryCollector is created and the events are gathered in the begining of vmware collector update process. Apparently this the EventHistoryCollector still continues to gather events which are not retrieved and lost when the session (update process) is ended.
        Destroying EventHistoryCollector right after the events are retrieved would improve the situation.

        Show
        Andris Zeila added a comment - - edited The problem is because vmware returns log records in reverse order. So instead of setting lastlogsize to the biggest event key (id) it is set to the smallest. Also a different issue - EventHistoryCollector is created and the events are gathered in the begining of vmware collector update process. Apparently this the EventHistoryCollector still continues to gather events which are not retrieved and lost when the session (update process) is ended. Destroying EventHistoryCollector right after the events are retrieved would improve the situation.
        Hide
        Andris Zeila added a comment - - edited

        The proposed solution is available in development branch svn://svn.zabbix.com/branches/dev/ZBX-8584

        1. Added a function to sort AGENT_RESULT log values by last log size and used it after processing vmware eventlog. Another way would be to extract the log values into a vector, sort it and then add it to the AGENT_RESULT.
        2. Added DestroyCollector call after event data is retrieved during vmware service update process. Still there appear to be holes in eventids, which should not be. Maybe we need to create a new issue about it.
        3. During get_values() processing we always updated lastlogsize with
          get_log_result_lastlogsize(&results[i])

          value. This is fine for log, logrt and eventlog items because they are active items and we can't have empty logs. However vmware eventlog item can return no values and in this case its lastlogsize would be reset to 0.

        Show
        Andris Zeila added a comment - - edited The proposed solution is available in development branch svn://svn.zabbix.com/branches/dev/ZBX-8584 Added a function to sort AGENT_RESULT log values by last log size and used it after processing vmware eventlog. Another way would be to extract the log values into a vector, sort it and then add it to the AGENT_RESULT. Added DestroyCollector call after event data is retrieved during vmware service update process. Still there appear to be holes in eventids, which should not be. Maybe we need to create a new issue about it. During get_values() processing we always updated lastlogsize with get_log_result_lastlogsize(&results[i]) value. This is fine for log, logrt and eventlog items because they are active items and we can't have empty logs. However vmware eventlog item can return no values and in this case its lastlogsize would be reset to 0.
        Hide
        Andris Zeila added a comment -

        The proposed fix was changed - instead of sorting log values by lastlogsize the event ids are sorted before retrieving event data and adding to agent result.

        Also the lastlogsize processing in poller was changed slightly.

        Show
        Andris Zeila added a comment - The proposed fix was changed - instead of sorting log values by lastlogsize the event ids are sorted before retrieving event data and adding to agent result. Also the lastlogsize processing in poller was changed slightly.
        Hide
        dimir added a comment - - edited

        (1) [PS] Please review my code style changes in r51556.

        Andris Zeila Thanks. CLOSED

        Show
        dimir added a comment - - edited (1) [PS] Please review my code style changes in r51556. Andris Zeila Thanks. CLOSED
        Hide
        Andris Zeila added a comment -

        Released in:

        • pre-2.2.9rc1 r51560
        • pre-2.4.4rc1 r51561
        • pre-2.5.0 r51562
        Show
        Andris Zeila added a comment - Released in: pre-2.2.9rc1 r51560 pre-2.4.4rc1 r51561 pre-2.5.0 r51562
        Hide
        Alexander Vladishev added a comment - - edited

        (2) Dimir, Andris. Please take a look at my chages in r51573, r51574 and r51575.

        Andris Zeila looks good.

        Alexander Vladishev CLOSED

        Show
        Alexander Vladishev added a comment - - edited (2) Dimir, Andris. Please take a look at my chages in r51573, r51574 and r51575. Andris Zeila looks good. Alexander Vladishev CLOSED

          People

          • Assignee:
            Unassigned
            Reporter:
            Kodai Terashima
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: