[ZBXNEXT-4200] Ability to create LLD item prototype of type "dependent" with a master item NOT only item prototype Created: 2017 Oct 26  Updated: 2018 Oct 08  Resolved: 2018 Aug 20

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 3.4.3
Fix Version/s: 4.0.0alpha9, 4.0 (plan)

Type: Change Request Priority: Major
Reporter: Oleksii Zagorskyi Assignee: Michael Veksler
Resolution: Fixed Votes: 37
Labels: dependentitems, prototype
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: Text File discovery.txt     PNG File explain.png     XML File zbx_export_hosts.xml    
Issue Links:
Duplicate
is duplicated by ZBXNEXT-4474 Possibility to use item outside of LL... Closed
Sub-task
part of ZBXNEXT-3006 A cache to provide multiple metrics o... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
ZBXNEXT-4500 Frontend: Ability to create LLD item ... Change Request (Sub-task) Closed Ivo Kurzemnieks  
Team: Team A
Sprint: Sprint 32, Sprint 33, Sprint 34, Sprint 35, Sprint 36, Sprint 37, Sprint 39, Sprint 40, Sprint 41
Story Points: 2.5

 Description   

The new dependent item functionality is awesome, but I would like an extension to make full use of it.
If I try to create a low level discovery item prototype of type "Dependent" I can only chose a master item from the list of item prototypes of the Low Level discovery rule, I would like to chose a master item that is defined on the host or template level.

Example of case scenario I have in mind:

Host level:
a) SQL query that returns an XML/JSON/CSV with many nodes in a single row/column

LLD level:
b) SQL query (used as LLD rule thanks to "db.odbc.discovery") that returns the list of nodes

c) Dependent item prototype, with master item set to the host level query (a) but with post-processing searching for a specific node (b) that extracts the value for the specific node.

in this way it would be possible to limit the number of queries to the database and also get the same value for all the nodes at the same time.



 Comments   
Comment by Leonardo Savoini [ 2017 Dec 04 ]

I have the same scenario as you put in the example.

In my case, I only want data file size and log file size. As are only numbers I was able to made it work using calculated item, and in the formula I just put macro {#DATAFILESIZE}.
But if I have to use with string, calculated items doesn't allow string.

So I it will be a really good if we can use dependent item from discovery rule, or following ZBXNEXT-1911, I can use calculated type with strings.
Reducing the number of queries to the database is a priority.

Comment by Martin Emrich [ 2017 Dec 08 ]

Similar use case, same problem:

A master item on template level returns a json array via a costly operation. I would like to extract values from each item in a discovery rule, but cannot access the date from item prototype level. So now I will have to retrieve the array for each discovered object (or cache it somehow on the agent host)

Comment by David Mitchell [ 2017 Dec 08 ]

Me to - need this and the ability to use LLD macro values in preprocessing. Posted on forum but suspected it wasn't possible.
Scenario:
Master item returns JSON blob from remote system API, Contents of blob can vary between systems, therefore need to do LLD on the Blob (have written script to flatten JSON & return LLD Data), then create items from prototype using JSON path returned as LLD Macro value.

<Clarification>
The items created by the LLD discovery need to refer to a master item at template level otherwise with the master item defined at discovery rule level then LLD creates one 'master' item for every item created by LLD... which sort of defeats the aim of avoiding multiple queries.

This has a use case of potentially hundreds of individual end devices (with varying monitoring value names) so manual creation is not feasible..

Comment by Thiago Leão Melo [ 2018 Jan 04 ]

I need it, I make a test where I changed it directly on database and it worked fine for me

So I think it is more easy than I thought

Comment by Glebs Ivanovskis (Inactive) [ 2018 Jan 23 ]

To make use of this feature most likely ZBXNEXT-4109 will be also needed.

Comment by Eremin Alexander [ 2018 Mar 28 ]

For me, too, very relevant. I tried to make tablespaces discovery to optimize the number of requests to database, but I failed because master item must be in the same discovery rule as the dependent items. If you try to add a master item to item prototype, you get a lot of master items.

Comment by Dimitri Bellini [ 2018 Mar 30 ]

Same for me, please vote this feature!
Thanks very much!

Comment by richlv [ 2018 Mar 30 ]

please see the "me too" note at https://zabbix.org/wiki/Docs/bug_reporting_guidelines#Reporting_an_issue - using the voting function is suggested to reduce noise

Comment by Michael Veksler [ 2018 Jul 02 ]

Available in pre-4.0.0alpha9 (trunk) r82435

Comment by Alexander Vladishev [ 2018 Jul 04 ]

(24) [D] Documentation needs to be updated

martins-v Updated documentation:

Please review.

vjaceslavs Looks good! CLOSED

Comment by Ivo Kurzemnieks [ 2018 Jul 13 ]

Fixed ChangeLog entry in pre-4.0.0alpha9 (trunk) r82713

Comment by Seth Simmons [ 2018 Sep 26 ]

Is there a way to backport/patch this into 3.4.x? I desperately need this capability, but want to remain on 3.4 in my production environment.

Comment by Khatsayuk Alexander [ 2018 Sep 26 ]

@setsimmo, it's rather weird decision, because 3.4 isn't LTS and will drop support after 4.0 release.

Comment by Seth Simmons [ 2018 Sep 26 ]

Oh, my understanding was that 3.4 would be the next LTS release (had read that somewhere).

In that case, I'll plan on pushing to 4.0 when its released and stable.

Comment by richlv [ 2018 Sep 26 ]

https://www.zabbix.com/life_cycle_and_release_policy

Generated at Fri Mar 29 17:27:45 EET 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.