NagiosXI API "service" endpoint: internal server error

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
PeterDK
Posts: 25
Joined: Tue Jun 05, 2018 9:19 am

NagiosXI API "service" endpoint: internal server error

Post 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
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

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

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
PeterDK
Posts: 25
Joined: Tue Jun 05, 2018 9:19 am

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

Post 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)
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

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

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked