[ZBX-5095] LLD item prototype of type calculated does not populate in hosts Created: 2012 May 29 Updated: 2017 May 30 Resolved: 2012 Aug 08 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | Server (S) |
Affects Version/s: | 2.0.0 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Alexandru Nica | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | calculateditems, lld | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified |
Description |
I have a template with a few discovery rules. Each has a few prototype items of type "agent (active)" which are populated into hosts just fine. WIN Volume " {#VOLNAME} ({#VOLLABEL})" bytes/sec read --------------------> perf_counter[\LogicalDisk({#VOLNAME})\Disk Read Bytes/sec,180] )\Disk Write Bytes/sec,180] I also have a prototype item of type "calculated item" which does not get populated into hosts. WIN Volume " {#VOLNAME}( {#VOLLABEL})" bytes/sec total ------------------------> volume.bps.total ------------> the expression is last(bytes read) + last(bytes write)The error I get in the hosts/discovery screen is that it cannot create volume.bps.total because there is a duplicate entry. Which makes sense because I have about 4 volumes and it would create 4 "volume.bps.total" keys. The question is how to define the calculated item key in such a way that it does not generate conflicts. I tried using "volume{#VOLLABEL} .bps.total" but the frontend gives me an error telling me the keyname is invalid. |
Comments |
Comment by Alexandru Nica [ 2012 May 30 ] |
The problem is in the frontend regex I believe. You are allowed to use discovery macros only as parameters (eg. perf_counter[\LogicalDisk( {#VOLNAME})\Disk Read Bytes/sec,180])This is ok for most item types but for calculated items you should be allowed to use discovery macros anywhere in the key string. I'm now using volume.bps.total[{#VOLNAME} ] as a workaround. |
Comment by Alexander Vladishev [ 2012 Aug 08 ] |
Hi, It's not the workaround. It's correct solution! All item keys should be unique in a host. Therefore the calculated item prototype shall contain a unique identifier in a key parameter. Thanks. I close a problem. |