[ZBX-8584] vmware.eventlog key read same eventlog several times Created: 2014 Aug 06  Updated: 2017 May 30  Resolved: 2015 Jan 14

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.2.5
Fix Version/s: 2.2.9rc1, 2.4.4rc1, 2.5.0

Type: Incident report Priority: Blocker
Reporter: Kodai Terashima Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: duplicates, eventlog, vmware
Environment:

Zabbix 2.2.5, ESX 5.1


Attachments: PNG File history.png    
Issue Links:
Duplicate

 Description   

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



 Comments   
Comment by Andris Zeila [ 2014 Dec 19 ]

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.

Comment by Andris Zeila [ 2014 Dec 19 ]

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.

Comment by Andris Zeila [ 2015 Jan 08 ]

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.

Comment by dimir [ 2015 Jan 13 ]

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

Andris Zeila Thanks. CLOSED

Comment by Andris Zeila [ 2015 Jan 13 ]

Released in:

  • pre-2.2.9rc1 r51560
  • pre-2.4.4rc1 r51561
  • pre-2.5.0 r51562
Comment by Alexander Vladishev [ 2015 Jan 14 ]

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

Andris Zeila looks good.

Alexander Vladishev CLOSED

Generated at Mon Nov 19 13:35:50 EET 2018 using JIRA 7.3.9#73021-sha1:26adfd3d76803e1a04219c5cd05b58dbafff0dbf.