[ZBXNEXT-2603] Allow max length of user macros to 2048 (server side) Created: 2014 Nov 19  Updated: 2025 Mar 18  Resolved: 2020 Aug 30

Status: Closed
Project: ZABBIX FEATURE REQUESTS
Component/s: Server (S)
Affects Version/s: 2.4.2
Fix Version/s: 5.2.0alpha2, 5.2 (plan)

Type: Change Request Priority: Trivial
Reporter: Jan Garaj Assignee: Artjoms Rimdjonoks
Resolution: Fixed Votes: 23
Labels: db, macros, proxy, server, webmonitoring
Σ 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: PNG File Import.png     PNG File Screen Shot 2020-04-14 at 6.46.40 PM.png     PNG File image-2020-05-19-15-12-17-093.png    
Issue Links:
Duplicate
Sub-task
part of ZBXNEXT-6108 Front-end changes to allow max length... Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
ZBXNEXT-6108 Front-end changes to allow max length... Change Request (Sub-task) Closed Andrejs Griščenko  
Team: Team C
Sprint: Sprint 67 (Aug 2020)
Story Points: 0.25

 Description   

I would like to use user macro for host specific URL, which will be used in web monitoring template. This URL is long (~650chars) and it's truncated to 256 chars, what is limit for user macro. So I can't use user macro for web monitoring URL.

It'll be fine if you increase maximum length of user macro and it'll be same as maximum allowed length of URL (2048 chars). It make sense, if I can use user macro in monitored URL.



 Comments   
Comment by Jan Garaj [ 2014 Nov 19 ]

I've found workaround and my URL is now:

https://{HOST.HOST}{$LONG_URL_PART1}{$LONG_URL_PART2}{$LONG_URL_PART3}
Comment by Dimitri Bellini [ 2019 Mar 25 ]

As we discussed on ZBX-15816 we suggest to extend the User Macro characters to something like 1024 or more because is very useful for "HTTP Agent" Check when we need to use Token.

Comment by Dimitri Bellini [ 2019 Sep 19 ]

I have tested the latest 4.4alpha3 but the size of MACRO input box is still 256, please extend to 1024 characters.
Thanks

Comment by Yauheni_Skavarodkin [ 2020 Jan 21 ]

Any updates in scope of this issue ? 

 

Comment by Tomáš Heřmánek [ 2020 Apr 14 ]

I have same problem with official template for windows i need more space for all services. Vote +1

Comment by Roman [ 2020 May 19 ]

I have a problem with the official Windows template: it is not possible to specify all the necessary exceptions for autodiscovering services...

Comment by Marco Hofmann [ 2020 May 19 ]

I do that since 3.0 with a Global Regular Expressions and never had any problems. I have over 50 exceptions or so.

Comment by Tomáš Heřmánek [ 2020 May 19 ]

Hi Marco,

but this is not nice solution all in one. You need import regular and template each.

Tom

 

Comment by Roman [ 2020 May 19 ]

Hi Marco,

I can easily use a workaround, but I want to have a solution to the problem that will remove the stupid limitation and allow me to simply use the standard templates without changes.

Quote from the Template Guideline (https://www.zabbix.com/documentation/guidelines/thosts):

1.1.4 Avoid global macros

If user macros are used, define them in the template itself instead of using global macros - that way users get either the default values or an example of what the macro names are. If global macros are used, they are not exported along with the template.

1.1.5 Avoid global regexes

Avoid using global regexes in templates if possible, as they are not exported with the template. If global regex is used, document in the README what global regex with what values must be used with the template.

Comment by Artjoms Rimdjonoks [ 2020 Aug 19 ]

Available in versions:

Comment by Andrejs Griščenko [ 2020 Aug 26 ]

Documentation updated:

Comment by Nikolay Kulikov [ 2020 Oct 07 ]

will it applied to 5.0.xx version?

Comment by Michael Veksler [ 2020 Oct 07 ]

We are not changing DB schema for existing version.

Generated at Wed May 21 07:18:50 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.