[ZBX-14738] Global macros are not displayed on the screen and Replaced / changed macros inside the host do not have their values saved Created: 2018 Aug 17  Updated: 2018 Oct 04  Resolved: 2018 Oct 04

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: None

Type: Incident report Priority: Critical
Reporter: Adriano Guilhermetti Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

SO: CentOS Linux release 7.4.1708 (Core)
KERNEL: 3.10.0-693.21.1.el7.x86_64 x86_64
Machine: VM AWS


Attachments: PNG File Screenshot_20181002_101835.png     PNG File Screenshot_20181002_101902.png     Text File image-2018-08-16-19-51-30-660.png     Text File image-2018-08-16-19-51-55-923.png     Text File image-2018-08-16-19-53-04-155.png     Text File image-2018-08-16-19-55-43-607.png     Text File image-2018-08-16-19-57-42-516.png     Text File image-2018-08-16-19-57-49-891.png     Text File image-2018-08-16-19-58-10-365.png     Text File image-2018-08-16-19-59-47-295.png     Text File image-2018-08-16-20-06-00-151.png     Text File image-2018-08-16-20-06-14-492.png     Text File image-2018-08-16-20-06-29-102.png     Text File image-2018-08-16-20-07-17-308.png     Text File image-2018-08-16-20-07-28-655.png     Microsoft Word macros.docx    

 Description   

***************************************************************

We have 2 problems

***************************************************************

Problem 1-): Global macros are not displayed on the screen

In the Zabbix database, we have 339 Global Macros:

MariaDB [zabbix]> select * from globalmacro order by 1;
-------------------------------------------------++----------------------------------

globalmacroid macro value

-------------------------------------------------++----------------------------------

...

355 {$DBS_PRD_CONN_PWD} CONFIG_VALOR_NO_HOST
356 {$DBS_PRD_CONN_USER} CONFIG_VALOR_NO_HOST

-------------------------------------------------++----------------------------------
339 rows in set (0.00 sec)

MariaDB [zabbix]>

 

But navigating in the frontend (interfae web) in: Administration -> General -> Macros, 

only 333 Macros are shown on the screen.

No button appears to open another page to see the other macros that are not appearing.

See file "macros.docx" for more details. -> macros.docx

What could be causing this?

I still have more macros that need to be created.

***************************************************************

Problem 2-): Replaced / changed macros inside the host do not have their values saved

In the frontend (web interface) when I navigate in:
Configuration -> Hosts -> Click on the name of a host -> Then click on Macros -> Inherited and host macros (to see host macros).
The frontend loads all Macros. 

No button appears to open another page to see the other macros that are not appearing.

The frontend loads all macros and I edit 2 macros:


...

Note that the macro "{$ URL_PRD_WGET1_SSL_SASC_NOME1}" below has not been changed:

And finally click Update and in the sequence, if I click on "Host macros", and the message appears:

What could be causing this?

Queried the database, we see that only the 2 macros that were actually edited, are OK:

MariaDB [zabbix]>
MariaDB [zabbix]> select hostid, host from hosts where host='DVEN--SRV-PRD-dvsrv-ebs-bd';
----------------------------------+

hostid host

----------------------------------+

10283 DVEN--SRV-PRD-dvsrv-ebs-bd

----------------------------------+
1 row in set (0.00 sec)

MariaDB [zabbix]> select * from hostmacro where hostid=10283;
------------------+------------------------------

hostmacroid hostid macro value

------------------+------------------------------

1798 10283 {$SRV_PRD_IOWAIT_ATEN} 40
1799 10283 {$SRV_PRD_IOWAIT_CRIT} 60

------------------+------------------------------
2 rows in set (0.00 sec)

MariaDB [zabbix]>

 

So I removed the unwanted Macro, and clicked on Update, and went back to the Hosts screen:

Then I repeated the steps:

 

...

continue...



 Comments   
Comment by Adriano Guilhermetti [ 2018 Aug 17 ]

continuing ...

Then I repeated the steps:

The message reappears again.

 

Comment by Adriano Guilhermetti [ 2018 Aug 17 ]

I forgot to inform you: Zabbix version 3.4.8

Comment by Adriano Guilhermetti [ 2018 Aug 31 ]

Hello Sirs,
Any news?

Comment by Edgars Melveris [ 2018 Sep 27 ]

Hello Adriano!
I tried to reproduce your issue on the latest version of 3.4 (3.4.14).
I created 338 global macros (+1 that was already there) and all were shown in the host macro settings page.
I also tried to edit some macros and add a few, with no problems.
Can you look for errors in zabbix and webserver log files?
Also, is it possible to upgrade to latest version and see if the issue is resolved there?

Comment by Adriano Guilhermetti [ 2018 Oct 01 ]

Hello Edgar ...

Was there any fix in this part of MACRO from version 3.4.8 to 3.4.14?

Please can you tell me where are / these two log files (zabbix and webserver) for me to check?

Unfortunately we can not upgrade at this time because we have several Proxys installed on the clients and we will not be able to update them. The Zabbix Proxy version has to be the same as ZabbixServer, correct?

Thank You.

Adriano

Comment by Edgars Melveris [ 2018 Oct 02 ]

Hello Adriano.
As much as I'm aware of, no, there has not been this specific bug, but this might have been fixed as a part of another bug, i'll try to find out.
Zabbix server log file is most likely located in /var/log/zabbix/zabbix_server.log
The web server config files are located here: /var/log/httpd/
You could also try upgrading just the fronted and not server to the newest version in 3.4, that won't break compatibility with proxies.

Comment by Edgars Melveris [ 2018 Oct 02 ]

Sorry Adriano, I tried to reproduce the error on version 3.4.8 and it works here:

Global macros:

 

Host Macros with some values changed:

So I'm closing this issue as not reproducible.

This is probably some configuration issue.

You're welcome to reopen the issue if you can add some steps, how to reproduce the bug.

I would recommend trying to retest this on a clean install.

Comment by Adriano Guilhermetti [ 2018 Oct 03 ]

I reopened this ISSUE for 2 reasons:

**************************************************
1-) You had asked me in your answers: "How to reproduce the error". But if you observe in item 2 (which has the opening of ISSUE), it says how you can reproduce the error:

"Problem 2-): Replaced / changed macros inside the host do not have their values saved"
**************************************************

 

 

**************************************************
2-) I believe I have identified the cause and solved the problem!

In the / var / log / httpd / error_log file find the following messages:

[Wed Oct 03 11: 46: 59.663765 2018] [: error] [pid 9186] [client 192.168.107.174:59366] PHP Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://192.168.110.62/zabbix/hosts.php
[Wed Oct 03 11: 47: 04.412566 2018] [error] [pid 9186] [client 192.168.107.174:59366] PHP Input variables exceeded 1000. To increase the limit change max_input_vars in php.ini. in Unknown on line 0, referer: http://192.168.110.62/zabbix/hosts.php

Then I edited the file /etc/php.ini and set the "max_input_vars" parameter, because it was commented.

I configured it with the value "2048" -> max_input_vars = 2048
And I restarted the HTTP service: systemctl restart httpd

The error / problem has not occurred any more.
**************************************************
Feel free to close this ISSUE again.

Thank you.

Adriano

Comment by Edgars Melveris [ 2018 Oct 04 ]

Hello Adriano, glad you have the problem solved.

Closing issue

Generated at Wed May 21 06:47:04 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.