500 error when accessing Nagios API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

500 error when accessing Nagios API

Post by andrewatmacys »

Version of Nagios is 5.4.13 on RHEL 7

When attempting to get host status, I'm getting a 500 error from the Nagios API:
nagios API2_LI.jpg
nagiosAPI.png
It was working not very long ago, a few days ago to my knowledge, so I'm not sure what might be causing a 500 internal server error.
You do not have the required permissions to view the files attached to this post.
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Re: 500 error when accessing Nagios API

Post by andrewatmacys »

I should note that when searching individually for hosts it works but not for all hosts.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: 500 error when accessing Nagios API

Post by tgriep »

If the server has a lot of Hosts, you may have to increase some settings for PHP and Apache so the system can process them and allow you to display the data.

Edit the /etc/php.ini file and change the following from

Code: Select all

max_execution_time = 30
max_input_time = 60
memory_limit = 128M
to

Code: Select all

max_execution_time = 120
max_input_time = 240
memory_limit = 1024M
add this to the bottom of that file

Code: Select all

max_input_vars=50000
Save the file

Then edit this file

Code: Select all

/etc/httpd/conf/httpd.conf

Code: Select all

add this to the bottom of that file
LimitRequestLine 100000
Save the file and restart Apache for the changes to take affect.

Code: Select all

service httpd restart
If the above variables have been changed already on the server to values larger than the examples, increase them further.

Let us know if this works.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked