How to make nagios default to showing all hosts on the status page

This was fun…. I wanted nagios to show me all my hosts instead of cutting things off at $annoying_limit.

My infrastructure isn’t crazy huge or this idea would be very bad.

So, after reading the source of status.c and cgiutils.c I eventually found my way into cgi.cfg

Here’s the solution. In cgi.cfg add this to the end of the file:

result_limit=0

That’s it. Reload nagios and you’re done.

In their defense, I did eventually find out that it was indeed mentioned in sample-config/cgi.cfg.in.

But there are so many options and only a very small codepath to the bit I cared about.

Future me, this is for you.

Leave a Reply