[ZBX-9235] Zabbix Agent uses old active metrics and starts read files on not the first Created: 2015 Jan 20  Updated: 2017 Nov 13  Resolved: 2017 Nov 13

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.0.14
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: MATSUDA Daiki Assignee: Unassigned
Resolution: Won't fix Votes: 0
Labels: logmonitoring
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File zabbix-2.0.14_active_metrics_itemid.patch    
Issue Links:
Duplicate
is duplicated by ZBX-12880 Skip the log of new item from lastlog... Closed

 Description   

Zabbix agent uses old active metrics after rechanging item keys or making new keys same as old data. So, it starts to read the log files with old mtime and lastlogsize.

1. create item with key log[/tmp/foo.txt]
The agent reads the log files, sends the data to server and hold lastlogsize, e.g. 200.

2. change item with key log[/tmp/foo.txt, .*] for 1's items
The agent receives the item key and lastlogsize 200 and creates new active metrics. Then it has 2 active metrics following
i) log[/tmp/foo.txt] disabled lastlogsize=200
ii) log[/tmp/foo.txt,.*] enabled lastlogsize=200

3. some application outputs to the log file.
The agent reads the log files, sends the data to server and hold lastlogsize, e.g. 300. But agent holds other lastlogsize 200 for old item key log[/tmp/foo.txt]. So, current status is following.
i) log[/tmp/foo.txt] disabled lastlogsize=200
ii) log[/tmp/foo.txt,.*] enabled lastlogsize=300

4. create new item with item key log[/tmp/foo.txt]
After receiving the new item, the agent reads file form 201 bytes and send.

The problem is that agent judges the differences only with item keys. I suggest you to use itemid.



 Comments   
Comment by MATSUDA Daiki [ 2017 Aug 01 ]

I confirmed that this bug was fixed by another way to remove unreceived data at 3.0.0 r52165.
So, please close

Comment by Andris Mednis [ 2017 Nov 13 ]

Thanks!! Closing.

Generated at Fri Apr 04 11:47:00 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.