API Call Returning 500 Error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
hixavier
Posts: 12
Joined: Tue Jul 30, 2019 6:57 am

API Call Returning 500 Error

Post 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?
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: API Call Returning 500 Error

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
hixavier
Posts: 12
Joined: Tue Jul 30, 2019 6:57 am

Re: API Call Returning 500 Error

Post 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!
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: API Call Returning 500 Error

Post 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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked