Error parsing JSON for XI Daemon, Jobs and IO services

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Error parsing JSON for XI Daemon, Jobs and IO services

Post by hbouma »

Lately, we have been seeing issues where XI is unable to parse the JSON when checking another XI instance. This randomly happens and then goes back to normal. We are not yet sure what is happening to cause the JSON information to pass a body of "false".

I have turned on verbose output from the checks, and here is a sample output (Scrubbed for Hostnames, IP's and API Keys)

Code: Select all

ACCESSING URL: https://SERVERA/nagiosxi/api/v1/system/statusdetail?apikey=APIKEY
RESULT:
Array
(
[headers] => Array
(
[Date] => Mon, 04 Feb 2019 20:17:28 GMT
[Server] =>XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[X-Powered-By] => PHP/5.4.16
[Access-Control-Allow-Orgin] => *
[Access-Control-Allow-Methods] => *
[Content-Length] => 6
[Content-Type] => application/json
)

[body] => false

[info] => Array
(
[url] => https://SERVERA/nagiosxi/api/v1/system/statusdetail?apikey=APIKEY
[content_type] => application/json
[http_code] => 200
[header_size] => 283
[request_size] => 233
[filetime] => -1
[ssl_verify_result] => 0
[redirect_count] => 0
[total_time] => 0.268786
[namelookup_time] => 0.004181
[connect_time] => 0.004438
[pretransfer_time] => 0.131426
[size_upload] => 0
[size_download] => 6
[speed_download] => 22
[speed_upload] => 0
[download_content_length] => 6
[upload_content_length] => 0
[starttransfer_time] => 0.268781
[redirect_time] => 0
[certinfo] => Array
(
)

[primary_ip] => HOSTIP
[primary_port] => PORT
[local_ip] => LOCALIP
[local_port] => LOCALPORT
[redirect_url] => 
)

)
Error: Could not parse JSON from https://SERVERA/nagiosxi (false
)
We are running Nagios XI 5.5.7 on Red Hat 7 64bit VM's.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error parsing JSON for XI Daemon, Jobs and IO services

Post by tgriep »

If the system is busy and does not return the json data quick enough, the check could timeout and cause the issue you are having.

Try this, edit the checks and add the following option to increase the timeout to 30 seconds and see if that is enough time for the check to run and stop the intermittent parsing errors.

Code: Select all

--timeout=30
Be sure to check out our Knowledgebase for helpful articles and solutions!
hbouma
Posts: 483
Joined: Tue Feb 27, 2018 9:31 am

Re: Error parsing JSON for XI Daemon, Jobs and IO services

Post by hbouma »

I have made this change. Since this is an intermittent issue, it may take up to a week before we know if this fixed out issue.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Error parsing JSON for XI Daemon, Jobs and IO services

Post by tgriep »

OK, I kind of figured that so report back if it happens again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked