-
Change Request
-
Resolution: Unresolved
-
Trivial
-
None
-
None
-
None
-
None
A custom LLD rule may return multiple macros. For example, I use LLD rule for webservices with 3 macros: {#WS_NAME}, {#WS_ID} and {#WS_URL}.
I sure only one macro {#WS_ID} must determinate discovered entity, and I'd want to have continuous history of monitored object.
At the same time I have to add the macro {#WS_URL} to the item prototype key to send it to UserParameter or external script.
So, I created item prototype named "Service {#WS_NAME}" with a key "status_code[{#WS_ID}, {#WS_URL}]". If a name of the inherited item changes, it don't cause creation of a new item, but if any of macros in an item key changes, new item creates and old one become not discovered.
Interestingly, adding or deleting one of two macros in item key don't cause this action, only changing of already existing macro.
It would be better to identify discovered entity by the first macro in an item key, like primary key in database, and ignore changes in other key macros.