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:
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.
500 error when accessing Nagios API
-
andrewatmacys
- Posts: 114
- Joined: Tue Feb 06, 2018 9:25 am
500 error when accessing Nagios API
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
I should note that when searching individually for hosts it works but not for all hosts.
Re: 500 error when accessing Nagios API
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
to
add this to the bottom of that file
Save the file
Then edit this file
Save the file and restart Apache for the changes to take affect.
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.
Edit the /etc/php.ini file and change the following from
Code: Select all
max_execution_time = 30
max_input_time = 60
memory_limit = 128MCode: Select all
max_execution_time = 120
max_input_time = 240
memory_limit = 1024MCode: Select all
max_input_vars=50000Then edit this file
Code: Select all
/etc/httpd/conf/httpd.confCode: Select all
add this to the bottom of that file
LimitRequestLine 100000Code: Select all
service httpd restartLet us know if this works.
Be sure to check out our Knowledgebase for helpful articles and solutions!