Availability Report just spins for particular Host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
ksafa
Posts: 86
Joined: Wed Jan 15, 2014 3:05 pm

Availability Report just spins for particular Host

Post by ksafa »

Hello All,
I'm trying to generate an availability report for a host and all services. After clicking run it just never returns the report and shows the data. I tried individual services and it works for individual services but not all services. I also tried running wkhtmltopdf from command line and get following errors:

Error: Failed to load *****with network status code 2 and http status code 200 - Connection closed
Exit with code 1 due to network error: RemoteHostClosedError

Thanks
jsimon
Posts: 105
Joined: Wed Aug 23, 2023 11:27 am

Re: Availability Report just spins for particular Host

Post by jsimon »

Hi @ksafa,

Can you let us know what version of XI you're running and what OS/version you're running it on? OS will give some more insight into where to look for error logging, among other things.
ksafa
Posts: 86
Joined: Wed Jan 15, 2014 3:05 pm

Re: Availability Report just spins for particular Host

Post by ksafa »

Nagios XI version: 5.11.2
Red Hat Enterprise Linux release 8.9 (Ootpa)
ksafa
Posts: 86
Joined: Wed Jan 15, 2014 3:05 pm

Re: Availability Report just spins for particular Host

Post by ksafa »

I do see following error in http error_log:

==> /var/log/httpd/error_log <==
[Thu Apr 11 20:53:52.370975 2024] [proxy_fcgi:error] [pid 5561:tid 140378564970240] (70007)The timeout specified has expired: [client X.X.X.X:60005] AH01075: Error dispatching request to : (polling), referer: http://X.X.X.X/nagiosxi/reports/availability.php?&=
[Thu Apr 11 20:56:34.023147 2024] [proxy_fcgi:error] [pid 5845:tid 140378883729152] (70007)The timeout specified has expired: [client X.X.X.X:60358] AH01075: Error dispatching request to : (polling), referer: http://X.X.X.X/nagiosxi/reports/availability.php?&=
jsimon
Posts: 105
Joined: Wed Aug 23, 2023 11:27 am

Re: Availability Report just spins for particular Host

Post by jsimon »

Sounds like your server is busy enough that it is timing out before finishing this particular request. I would recommend manually increasing the timeout setting like so:

Edit this file:

Code: Select all

/etc/httpd/conf.d/php.conf
Change this specific part (around line 46):

Code: Select all

<IfModule !mod_php5.c>
  <IfModule !mod_php7.c>
    # Enable http authorization headers
    SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    <FilesMatch \.(php|phar)$>
        SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
    </FilesMatch>
  </IfModule>
</IfModule>
Add this:

Code: Select all

Timeout 600
    RequestReadTimeout header=600,minrate=50
    RequestReadTimeout body=600,minrate=50
    <Proxy "unix:/run/php-fpm/www.sock|fcgi://localhost">
        ProxySet timeout=600
    </Proxy>
So it looks like this:

Code: Select all

<IfModule !mod_php5.c>
  <IfModule !mod_php7.c>
    # Enable http authorization headers
    SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
    Timeout 600
    RequestReadTimeout header=600,minrate=50
    RequestReadTimeout body=600,minrate=50
    <Proxy "unix:/run/php-fpm/www.sock|fcgi://localhost">
        ProxySet timeout=600
    </Proxy>
    <FilesMatch \.(php|phar)$>
        SetHandler "proxy:unix:/run/php-fpm/www.sock|fcgi://localhost"
    </FilesMatch>
  </IfModule>
</IfModule>
You'll need to restart php-fpm after saving your changes: (or just reboot the server)

Code: Select all

sudo systemctl restart php-fpm
Let us know if you run into any issues with these steps! I've assumed some file locations based on your RHEL version.
Post Reply