API Return Limit

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Maxwellb99
Posts: 97
Joined: Tue Jan 26, 2016 5:29 pm

API Return Limit

Post by Maxwellb99 »

Hi Guys,

I'm running 20,000+ checks on a Nagios instance. I'm trying to return the Services object(s) through the API. Subsequently Nagios is returning a 500 error. What's the Max number of JSON objects I can return via the API? Note: Filtering via say "host_name" works.

Thanks,
Maxwell Ramirez
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: API Return Limit

Post by scottwilkerson »

There isn't a maximum, however you are likely hitting a php memory_limit

edit /etc/php.ini and increase the memory_limit

Code: Select all

memory_limit = 256M
restart httpd

Code: Select all

service httpd restart
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Maxwellb99
Posts: 97
Joined: Tue Jan 26, 2016 5:29 pm

Re: API Return Limit

Post by Maxwellb99 »

haha, yeah I trust you. It works for me on python so I figured it was some config holding me back. I threw 2G of mem at it, but I think I'm going to have to split it up. Well it was fun while it lasted. Still getting a 500 error, but we're ok. Please close this thread. Thanks.
services.PNG
checks.PNG
You do not have the required permissions to view the files attached to this post.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: API Return Limit

Post by scottwilkerson »

Maxwellb99 wrote:haha, yeah I trust you. It works for me on python so I figured it was some config holding me back. I threw 2G of mem at it, but I think I'm going to have to split it up. Well it was fun while it lasted. Still getting a 500 error, but we're ok. Please close this thread. Thanks.
services.PNG
checks.PNG
closing
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked