-
Incident report
-
Resolution: Won't fix
-
Minor
-
None
-
2.4.5
-
None
I'm going to create jmx item via Zabbix API. But I faced with syntax issue trying create item for jmx. There is an example of working key for item:
jmx["\"kafka.server\":name=\"apps-BytesOutPerSec\",type=\"BrokerTopicMetrics\"","Count"]
There is one of few requests I tried execute:
{"jsonrpc":"2.0","method":"item.create","params":{"name":"aps-BytesInPerSec_BrokerTopicMetrics","key_":"jmx["\"kafka.server\":name=\"apps-BytesInPerSec\",type=\"BrokerTopicMetrics\"","Count"]","hostid":"108","type":"16","value_type":"3","interfaceid":"0","delay":"300","delta":"1","history":"90"}
I need symbol " to separate two variables with quoted strings in the key of item, but I can't add it because I receive an error:
{"jsonrpc":"2.0","error":{"code":-32600,"message":"Invalid Request.","data":"JSON-rpc version is not specified."},"id":null}
I tried a lot of variants to do it.
As I understand the root cause of it is "key_":"jmx[". Ofcourse I can use backslash "key_":"jmx[\", but how I can separate two variables in this case?
Could you please look into it?