Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. 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

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Duplicate
    • Icon: Trivial Trivial
    • None
    • 7.0.2
    • Frontend (F)
    • None

      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).

            zabbix.dev Zabbix Development Team
            xxiii Dave E Martin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: