Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-25311

Issue with dependent items who use JSONPath in preprocessing

XMLWordPrintable

    • S24-W40/41
    • 2

      Steps to reproduce:

      1. Need to use one of two affected templates "Website certificate by Zabbix agent 2" for ZBX 6.0 version or "Windows by Zabbix agent" for ZBX 5.0 version for at least one host.
      2. Upgrade Zabbix server to 6.0.34 LTS version.
      3. Wait for master items of dependent items next execution or test by "Execute Now".
      4.  

      Result:

      In hosts with template "Website certificate by Zabbix agent 2" all dependent items become unsupported with similar error messages (only change is json path):

      Preprocessing failed for: 
      1. Failed: cannot extract value from json by path "$.x509.not_after.timestamp": cannot convert value to string 

      From Zabbix server log file:

      1024697:20240927:162737.380   state:1 error:'Preprocessing failed for:
      1. Failed: cannot extract value from json by path "$.x509.not_before.timestamp": cannot convert value to string'
      1024697:20240927:162737.380   flags:0 status:0
      1024697:20240927:162737.380   valuemapid:0
      1024697:20240927:162737.380   lastlogsize:0 mtime:0
      1024697:20240927:162737.380   delay:'0' nextcheck:0
      1024697:20240927:162737.380   data_expected_from:1727429265
      1024697:20240927:162737.380   history:1 history_sec:604800
      1024697:20240927:162737.380   poller_type:255 location:0
      1024697:20240927:162737.380   inventory_link:0
      1024697:20240927:162737.380   priority:1 schedulable:1
      1024697:20240927:162737.380   units:'unixtime' trends:1
      1024697:20240927:162737.380   depitem:[flags:0 last_master_itemid:0 master_itemid:390471]
      1024697:20240927:162737.380   preprocessing:
      1024697:20240927:162737.380   update_time:1727429266
      1024697:20240927:162737.380       opid:189753 step:1 type:12 params:'$.x509.not_before.timestamp' error_handler:0 error_handler_params:''
      1024697:20240927:162737.380   tags:
      1024697:20240927:162737.380       tagid:11111 tag:'component' value:'cert'
      1024697:20240927:162737.380 itemid:44444 hostid:222 key:'cert.version'
      1024697:20240927:162737.380   type:18 value_type:1
      1024697:20240927:162737.380   interfaceid:0
      1024697:20240927:162737.380   state:1 error:'Preprocessing failed for:
      1. Failed: cannot extract value from json by path "$.x509.version": cannot convert value to string'
       

      When testing dependent items preprocessing, it works - it get's the parsed result from items "Cert: Get" data.

       

      Issue also with hosts who have template "Windows by Zabbix agent". Dependent items that fail are from "Network interfaces discovery" discovery:

      Preprocessing failed for:
      1. Failed: cannot extract value from json by path "$[?(@.GUID == "{DDDDDDDD-YYYY-BBBB-CCCC-DDDDDDDDDDDD}")].NetConnectionStatus.first()": cannot convert value to string 
      
      Preprocessing failed for:
      1. Failed: cannot extract value from json by path "$[?(@.GUID == "{DDDDDDDD-YYYY-BBBB-CCCC-DDDDDDDDDDDD}")].AdapterTypeId.first()": cannot convert value to string

      Same thing here with testing - when testing item preprocessing it returns intended value.

      It is strange that for this template there is no issues with other dependent item - "Network interfaces WMI get: Interface {#IFNAME}({#IFALIAS}): Speed".

       

      Workaround:

      Reinstall 6.0.33 LTS version of Zabbix components.

      Expected:
      That dependent items with JSONpath preprocessing continuous to work.

            askolmeisters Armands Arseniuss Skolmeisters
            teab Elvijs Bokanovs
            Team C
            Votes:
            2 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - Not Specified
                Not Specified
                Logged:
                Time Spent - 19h 10m
                19h 10m