[ZBXNEXT-5121] Please allow inventory macro's to be used in http agent query fields Created: 2019 Mar 18  Updated: 2023 Oct 30

Status: Confirmed
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F), Server (S)
Affects Version/s: 4.0.5
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Raymond Kuiper Assignee: Valdis Murzins
Resolution: Unresolved Votes: 10
Labels: httpagent, inventory, macros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

I'm interested in setting up some location based check via the HTTP agent.

It would be great if we could use the {INVENTORY.SITE.*} macros for this instead of having to replicate them into usermacros.

 

Another use could be to use query a CMDB for info on the serialnumber that was stored in inventory to update other. These could then be used through dependent items to populate other the inventory fields with info from the CMDB.

 

There are a lot of other use cases as well. Allowing inventory macros here would allow for a whole lot of new integrations.



 Comments   
Comment by Raymond Kuiper [ 2019 Mar 18 ]

See also ZBXNEXT-2546

Comment by Alexey Pustovalov [ 2019 Mar 18 ]

Is it not duplicate ZBXNEXT-2546?

Comment by Raymond Kuiper [ 2019 Mar 18 ]

Not at all,  ZBXNEXT-2546 request allowing inventory macros in item keys.

This ZBXNEXT requests allowing inventory macros in the query fields of the new 4.x http agent.

Comment by Glebs Ivanovskis [ 2019 Mar 22 ]

Just curious. Why do you use {INVENTORY.SITE.*}? Do you populate inventory automatically?

Comment by Raymond Kuiper [ 2019 Mar 27 ]

Yes, we populate inventory for the hosts through the API (sync from the CMDB) or automatically from items in some cases.

I could create some user macros through the API with the same values (basically a copy of the values) specifically to use these as http agent parameters, but IMHO this is redundant as Zabbix already has this info stored in inventory and should be able to use it for these kinds of things.

In case the inventory field is populated though item values (for instance, from the GPS receiver in a device), it will be harder to do it like that.

Comment by Glebs Ivanovskis [ 2019 Mar 30 ]

I'm afraid that nowadays there is a direct database query every time inventory macros needs to be resolved. So performance may be an issue. On the other hand, item keys, trigger expressions, etc. are cached with all user macros resolved. And there are feature requests to populate user macros from items...

Comment by Raymond Kuiper [ 2019 Mar 31 ]

That's pretty annoying. I guess as a workaround, I'll create an API script that periodically will create usermacros from the inventory fields, that should solve any performance issues in that case and allow us to proceed.

It's a bit of a hack though, and I really feel this should not be necessary.

Comment by M [ 2023 Jun 24 ]

+1 very helpful feature 

Comment by LivreAcesso.Pro [ 2023 Jun 24 ]

+1

Comment by Kraken [ 2023 Oct 30 ]

Would make a lot of things easier!  +1

Generated at Fri Apr 19 04:27:26 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.