[ZBX-8916] Log is read twice, if you restart the Zabbix agent and Zabbix server Created: 2014 Oct 16  Updated: 2017 May 30  Resolved: 2014 Oct 17

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: 2.2.6
Fix Version/s: 2.2.7rc2, 2.4.2rc1, 2.5.0

Type: Incident report Priority: Major
Reporter: Kazuo Ito Assignee: Unassigned
Resolution: Fixed Votes: 1
Labels: item, logmonitoring, regression
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix2.2.6


Attachments: Text File zabbix_agentd.log     Text File zabbix_server.log    
Issue Links:
Duplicate
is duplicated by ZBX-8843 trigger becames [Cannot evaluate func... Closed

 Description   

Procedure
1)Create /tmp/test.log
touch /tmp/test.log

2)To start Zabbix server and Zabbix agent

3)item registration of /tmp/test.log
log[/tmp/test.log]

4)Add to /tmp/test.log a message
echo "test messages 1"> /tmp/test.log
-> Monitoring of message1 is ok

5)stop Zabbix server

6)Add to /tmp/test.log a message
echo "test messages 3"> /tmp/test.log
echo "test messages 4"> /tmp/test.log

7)To start Zabbix server
-> Monitoring of message3 is ok
-> Monitoring of message4 is ok

8)stop Zabbix agent

9)Add to /tmp/test.log a message
echo "test messages 5"> /tmp/test.log

10)start Zabbix agent
-> Monitoring of message3 is duplicate
-> Monitoring of message4 is duplicate
-> Monitoring of message5 is ok



 Comments   
Comment by richlv [ 2014 Oct 16 ]

closing as a duplicate of ZBXNEXT-444 - please reopen if i have misunderstood it

Comment by Alexander Vladishev [ 2014 Oct 16 ]

It is different case. Reopening...

Agent sends lastlogsize to the server with an each record. But server (on agent's second request) sends outdated information.

Comment by Aleksandrs Saveljevs [ 2014 Oct 17 ]

This seems to be a regression from ZBX-8488.

Comment by Aleksandrs Saveljevs [ 2014 Oct 17 ]

Fixed in development branch svn://svn.zabbix.com/branches/dev/ZBX-8916 .

Comment by Aleksandrs Saveljevs [ 2014 Oct 17 ]

Fixed in pre-2.2.7 r50010, pre-2.4.2 r50013, and pre-2.5.0 (trunk) r50014.

Comment by Aleksandrs Saveljevs [ 2015 Jan 07 ]

There was a question about the technical details of the problem, so let us document them here.

When the server starts up, it gets configuration data for items from the database. In particular, it gets "lastlogsize". However, the bug was in that when the server received log data from the agent, it would save the new "lastlogsize" into the database properly, but did not update "lastlogsize" in the configuration cache. While the server was running, it would always send "lastlogsize" that it received from the database upon startup. So a server restart was required in order to pick up the latest "lastlogsize" value.

Comment by richlv [ 2015 Jan 07 ]

thanks for the description - helped a lot

Comment by Kim Jongkwon [ 2016 Dec 01 ]

+ Affects Versions:
2.2.6, 2.4.0, 2.4.1

Generated at Sat Apr 20 08:33:56 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.