Page 1 of 1

API Call Returning 500 Error

Posted: Mon Apr 27, 2020 2:36 pm
by hixavier
Hi,

On only one of our XI instances, we are getting HTTP 500 Errors for an API Object Reference(GET objects/servicestatus
). What's odd is that the other API Object References work fine for this XI instance. Any help?

Re: API Call Returning 500 Error

Posted: Mon Apr 27, 2020 2:52 pm
by tgriep
How many Host and Services are setup on the server that is having the issue?
If it has a significant number of checks, you may need to increase the PHP settings so it can have enough space and time to run the API call.
Follow this KB article to increase the settings.
https://support.nagios.com/kb/article/n ... e-611.html

If this does not help, run the following is a root shell on the XI server.

Code: Select all

tail -f /var/log/httpd/*error_log
Run the API call and if it errors out, post the output of the tail command so we can see the errors.
Thanks

Re: API Call Returning 500 Error

Posted: Tue Apr 28, 2020 7:51 am
by hixavier
"you may need to increase the PHP settings so it can have enough space and time to run the API call"

Yup, after checking the error logs, this is the issue. Thanks!

Re: API Call Returning 500 Error

Posted: Tue Apr 28, 2020 11:08 am
by tgriep
Your welcome. Glad to help and that it is working now.
I'll close and lock the post as solved but feel free to open a new post in the future if needed.