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

jsonpath was unexpectedly terminated during LLD processing

    XMLWordPrintable

    Details

    • Type: Problem report
    • Status: Confirmed
    • Priority: Trivial
    • Resolution: Unresolved
    • Affects Version/s: 4.4.4
    • Fix Version/s: None
    • Component/s: Server (S)
    • Labels:
      None
    • Environment:
      Ubuntu 18.04 / Zabbix 4.4.4

      Description

      Recently I noticed that one of my discovery scripts (to discover PHP-FPM pools) started acting up where the frontend shows "Cannot create item: invalid value for preprocessing step #1: jsonpath was unexpectedly terminated.".

      I have tried removing the data-item (as recommended) but this didn't help either.

      Oddly, it does seem to receive data and create items and none are being removed as a result of not being discovered again. 

      I have checked the JSON and the validator says its valid. 

      Other discovery scripts work just fine, so it must not like something in the JSON input I am providing?

      Steps to reproduce:

      1. Configure a discovery with:
        1. Type: Zabbix Agent (active)
        2. Update Interval: 1m
        3. No pre-processing settings
        4. No LLD Macro's
        5. No Filters
      2. Ensure the configured item key returns the following JSON output in a discovery:
      {
         "data" : [
            {
               "{#PINGPATH}" : "/ping",
               "{#POOLNAME}" : "www",
               "{#LISTEN}" : "/run/php/php7.3-fpm.sock",
               "{#STATUSPATH}" : "/status"
            },
            {
               "{#LISTEN}" : "/etc/php/7.3/tmp/fpm_zabbix_example_com.sock",
               "{#STATUSPATH}" : "/status",
               "{#POOLNAME}" : "zabbix_example_com",
               "{#PINGPATH}" : "/ping"
            }
         ]
      }
      

      Result:

      1. Discovery tab of the host shows an exclamation mark
      2. Logs show:
        2946:20200117:111701.342 query [txnlev:0] [update item_rtdata set state=0,error='Cannot create item: invalid value for preprocessing step #1: jsonpath was unexpectedly terminated.
      Cannot create item: invalid value for preprocessing step #1: jsonpath was unexpectedly terminated.
      ' where itemid=30282;
      ]
        2946:20200117:111701.347 End of lld_process_task()
        2946:20200117:111701.347 In zbx_ipc_socket_write()
        2946:20200117:111701.347 End of zbx_ipc_socket_write():SUCCEED
        2946:20200117:111701.347 zbx_setproctitle() title:'lld worker #1 [processed 1 LLD rules, idle 119.768535 sec during 119.857494 sec]'
      

      Expected:
      No error

        Attachments

          Activity

            People

            Assignee:
            zabbix.dev Zabbix Development Team
            Reporter:
            frank Frank
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: