[ZBX-15427] Cloning a host containing log items, prototypes and rules results in copying their metadata Created: 2019 Jan 09  Updated: 2022 Sep 12  Resolved: 2022 Sep 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 4.2.0alpha2
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Ivo Kurzemnieks Assignee: Zabbix Development Team
Resolution: Unsupported version Votes: 0
Labels: discoveryrule, fullcloning, metadata
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team B

 Description   

1. Create log item as LLD rule

log[/tmp/test.log,,,1]

2. file contents are

{"data":[{"{#FOO}":"dummy", "{#VALUE}":"0"}]}
{"data":[{"{#FOO}":"dummy2", "{#VALUE}":"2"}]}

3. Start server and then agent.
Observe:
select mtime,lastlogsize from items where name like 'log%';
See lastlogsize is changed, now clone host and see that lastlogsize is cloned to new item.

Alternatively create active item, LLD rule, item prototype with log key and manually enter values into DB field "lastlogsize" and "mtime". Clone host and observe fields being copied.

As for older versions like 4.0 this applies only to LLD rules, so decided to fix only in 4.2

(MOVED from ZBXNEXT-4854)



 Comments   
Comment by richlv [ 2019 Jan 09 ]

The description says this is moved from ZBXNEXT-4854, but there's nothing about such a problem in that issue.

iivs You don't see this, because that chatter in comment section is visible to developers only. We don't like to spam people and fill up their emails. The thing is, this problem was found during testing in development branch in another issue. I specifically didn't mention a sub-issue where it was found, because it's definitely not visible to other users. I can remove that line, if that would make you feel better. Also, if you noticed, I quoted the first section in description. That should be a good indication of what was written in ZBXNEXT-4854.

Comment by richlv [ 2019 Jan 09 ]

The community appreciates developer comments. Those are not viewed as spam.
As some community members have noted, Zabbix issue tracker sends messages like "sprint this changed" and many others, which are of a much, much smaller value to users than the actually informative and helpful comments the great developers make.

Comment by Ivo Kurzemnieks [ 2022 Sep 08 ]

It seems like this is no longer and issue for newer versions. I found that in 4.4, a new table was added (ZBXNEXT-5040) item_rtdata. So the fields mentioned in description were removed from items table. Thus they are no longer copied when host is cloned.
Closing the issue.

Generated at Fri Mar 29 03:03:43 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.