Page 1 of 1

NagiosXI API "service" endpoint: internal server error

Posted: Fri Mar 08, 2019 8:42 am
by PeterDK
Hi,

We are having an issue with 1 endpoint of the NagiosXI API:
The following doesn't work: https://NAGIOSHOST/nagiosxi/api/v1/obje ... Y&pretty=1
But when trying other endpoints like host, hostgroup, hostgroupmembers, servicegroup... those are still working.

When going to "service", we are getting an "Internal server error" (500) back. Trying that from the help menu -> object reference we are getting "This page isn't working".

We are running NagiosXI 5.5.7, so we can still upgrade to a later version and hope that this will solve our problem (planned for the upcoming weeks), but is there already something that can be fixed at the moment?
We have a test environment were this service endpoint still works, but can't find any other significant differences between the two environments.
In the httpd logs we also see the error 500, but no other details as far as I can see.

Possibly worth mentioning that we migrated from CentOS6 to CentOS7, so this might have something to do with it. But then I would expect other things to be broken as well and everything else is just working fine.

Kind regards,
Peter

Re: NagiosXI API "service" endpoint: internal server error

Posted: Fri Mar 08, 2019 2:50 pm
by cdienger
500 messages like this can be due to php memory settings. Check out https://support.nagios.com/kb/article/n ... e-611.html to increase the setting.

Re: NagiosXI API "service" endpoint: internal server error

Posted: Mon Mar 11, 2019 4:49 am
by PeterDK
OK! Thanks for the tip.
It's solved.

Indeed one thing I forgot to check/compare when migrating.
I changed the following settings in /etc/php.ini:
- max_execution_time = 300 (from 60)
- max_input_vars = 10000 (from 5000)
- memory_limit = 512M (from 256M)

Re: NagiosXI API "service" endpoint: internal server error

Posted: Mon Mar 11, 2019 7:16 am
by scottwilkerson
PeterDK wrote:OK! Thanks for the tip.
It's solved.

Indeed one thing I forgot to check/compare when migrating.
I changed the following settings in /etc/php.ini:
- max_execution_time = 300 (from 60)
- max_input_vars = 10000 (from 5000)
- memory_limit = 512M (from 256M)
Great!

Locking thread