[ZBX-25185] deleting a discovery rules checks item when an alert discovery rule with a custom formula references it, makes alerts discovery page fail to load Created: 2024 Sep 05  Updated: 2024 Sep 05  Resolved: 2024 Sep 05

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

Type: Problem report Priority: Trivial
Reporter: Dave E Martin Assignee: Zabbix Development Team
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates ZBX-24657 HTTP Error 500 on Trigger Actions Menu Closed

 Description   

actually occurred in 7.0.0 but bug form won't let me put that. 

Steps to reproduce:

  1. create a discovery rule with an snmpv2 agent oid check
  2. create an alert-> discovery rule that references it with a custom formula
  3. delete the check from the discovery rule

Result:

  1. navigating to alerts -> discovery now results in page failed to load.

iginx log:

2024/09/05 11:02:30 [error] 1657548#1657548: *1578684 FastCGI sent in stderr: "PHP message: PHP Warning:  Undefined array key "conditiontype" in /usr/share/zabbix/include/actions.inc.php on line 119PHP message: PHP Warning:  Undefined array key "value" in /usr/share/zabbix/include/actions.inc.php on line 121PHP message: PHP Warning:  Undefined array key "value" in /usr/share/zabbix/include/actions.inc.php on line 121PHP message: PHP Warning:  Undefined array key "value" in /usr/share/zabbix/include/actions.inc.php on line 273PHP message: PHP Warning:  Undefined array key "conditiontype" in /usr/share/zabbix/include/actions.inc.php on line 275PHP message: PHP Fatal error:  Uncaught TypeError: array_key_exists(): Argument #2 ($array) must be of type array, bool given in /usr/share/zabbix/include/actions.inc.php:277
Stack trace:
#0 /usr/share/zabbix/app/controllers/CControllerActionList.php(143): actionConditionValueToString()
#1 /usr/share/zabbix/include/classes/mvc/CController.php(473): CControllerActionList->doAction()
#2 /usr/share/zabbix/include/classes/core/ZBase.php(642): CController->run()
#3 /usr/share/zabbix/include/classes/core/ZBase.php(228): ZBase->processRequest()
#4 /usr/share/zabbix/include/config.inc.php(20): ZBase->run()
#5 /usr/share/zabbix/zabbix.php(17): require_once('...')
#6 {main}
  thrown in /usr/share/zabbix/include/actions.inc.php on line 277" while reading response header from upstream, client: , server: , request: "GET /zabbix.php?action=action.list&eventsource=1 HTTP/2.0", upstream: "fastcgi://unix:/var/run/php/zabbix.sock:", host: "", referrer: "https://nms./zabbix.php?action=discovery.list"

 

database state:

note: conditionid 72 (referenced by formula for action 28) no longer exists:

 select * from actions ;
 actionid |                          name                          | eventsource | evaltype | status | esc_period |               formula               | pause_suppressed | notify_if_canceled | pause_symptoms
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------
       28 | UBB Access Mgmt Cambium AP 450                         |           1 |        3 |      1 | 1h         | ({69} and {70}) and ({72} and {71}) |                1 |                  1 |              1
(24 rows)

zabbix=# select * from conditions  where actionid =28;
 conditionid | actionid | conditiontype | operator |            value            | value2
--------------------------------------------------------------------+-------
          69 |       28 |            19 |        0 | 5                           |
          70 |       28 |            12 |        0 | .1.3.6.1.4.1.161.19.250.256 |
          71 |       28 |            12 |        2 | AP                          |
(3 rows)

manual fix: update actions set formula='({69} and {70}) and {71}' where actionid=28;
then fix as appropriate in the gui (at least this is how I worked around it).



 Comments   
Comment by Alexander Vladishev [ 2024 Sep 05 ]

This is duplicate of ZBX-24657. Please follow updates there.

Generated at Tue May 27 21:32:03 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.