Hi All,
Since the migration of my zabbix server (3.0 to 3.2), we have problem with the API.
We are using py-zabbix but now we have the following error.
The problem seems not coming from the module because I tried with curl and I have the same issue
Thank you in advance for your help.
Since the migration of my zabbix server (3.0 to 3.2), we have problem with the API.
We are using py-zabbix but now we have the following error.
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
# curl -k -H "Content-Type: application/json" --data @version https://myzabbix/api_jsonrpc.php
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
# cat version
{
"jsonrpc": "2.0",
"method": "apiinfo.version",
"params": [],
"id": 1
}
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
# cat version
{
"jsonrpc": "2.0",
"method": "apiinfo.version",
"params": [],
"id": 1
}
# curl -k -H "Content-Type: application/json" --data @data https://myzabbix/api_jsonrpc.php
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
# cat data
{
"jsonrpc": "2.0",
"method": "user.login",
"params": {
"user": "MyzabbixAPI",
"password": "MyPass"
},
"id": 1
}
{"jsonrpc":"2.0","error":{"code":-32700,"message":"Parse error","data":"Invalid JSON. An error occurred on the server while parsing the JSON text."},"id":null}
# cat data
{
"jsonrpc": "2.0",
"method": "user.login",
"params": {
"user": "MyzabbixAPI",
"password": "MyPass"
},
"id": 1
}
# cat version | json_verify
JSON is valid
JSON is valid
Comment