-
Problem report
-
Resolution: Unresolved
-
Trivial
-
None
-
4.4.4
-
None
-
Ubuntu 18.04 / Zabbix 4.4.4
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:
- Configure a discovery with:
- Type: Zabbix Agent (active)
- Update Interval: 1m
- No pre-processing settings
- No LLD Macro's
- No Filters
- 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:
- Discovery tab of the host shows an exclamation mark
- 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