[ZBXNEXT-3523] Macro that list all lld vinculated macros Created: 2016 Nov 07  Updated: 2017 Dec 18

Status: Open
Project: ZABBIX FEATURE REQUESTS
Component/s: Frontend (F)
Affects Version/s: 3.2.1
Fix Version/s: None

Type: Change Request Priority: Trivial
Reporter: Javier Barroso Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: llditem, macros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Hello,

I have an apache dynamic template (which I want to share at zabbix share in a few days) which add connections /directories /logs to host monitorization.

As apache config is a complex config, the lld rules generate diferent macros if you are monitoring one apache with mod_jk, or with proxypasses.

At description of the items created by lld rule, I would like to add all macros discovered.

Examples of that macros are:
{#IP}
{#PORT}
{#BALANCERNAME}
{#BALANCERMEMBER_PROTO}
{#BALANCERMEMBER_IP}
{#BALANCERMEMBER_PORT}
{#BALANCERMEMBER_PATH}
{#BALANCER_VHOST}
{#DIRECTORY}
{#DIRECTORYNAME}
{#DIRECTORYVHOST}
{#DIRECTORYVHOST}
{#PROXYPASS_VHOST}
{#PROXYPASS_SRC}
{#PROXYPASS_DESTIP}
{#PROXYPASS_DESTPORT}
{#PROXYPASS_DESTPATH}
{#PROXYPASS_DESTIP_UNIQ}
{#PROXYPASS_DESTPORT_UNIQ}
{#PROXYPASS_DESTPATH_UNIQ}
{#PROXYPASS_VHOSTS_UNIQ}

I would like a macro:
{LIST.MACROS}

which expand to:
{#MACRO1}: "value of the macro1"
{#MACRO2}: "value of the macro2"

Alternatively I would like to have a syntax to write a value if a macro is not defined:

{#MACRO1|value1}

So I can write "{#MACRO1|}" and have expand to null if #MACRO1 is not defined.

Another idea would be to have a tab additional on item config tab which would show you which MACROS has the item

Thank you very much



 Comments   
Comment by Javier Barroso [ 2016 Nov 09 ]

I have just create ZBXNEXT-3527

Thanks

Comment by Javier Barroso [ 2017 Dec 18 ]

See:

https://github.com/i5513/zabbix-templates/blob/master/scripts/apache_obtener_info

and

https://github.com/i5513/zabbix-templates/blob/master/zbx-dyn-apache-items-created.xml

and https://github.com/i5513/zabbix-templates/blob/master/conf/apache.conf

Generated at Sat Apr 27 06:07:35 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.