Nagios Core with NGINX

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
fritnes
Posts: 1
Joined: Thu Nov 22, 2018 2:31 am

Nagios Core with NGINX

Post by fritnes »

hello,

I tried to install Nagios on Nginx. I used https://gist.github.com/vietdien2005/87 ... 3a9c24d6d7. After installation, new map, trends and histogram do not work.
"Warning: Monitoring process may not be running!"

Can someone tell me what's wrong?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Core with NGINX

Post by ssax »

Please try changing this section of your /etc/nginx/conf.d/nagios.conf:

Code: Select all

    location ~ .cgi$ {
        root /usr/local/nagios/sbin/;
        include fastcgi_params;
        rewrite ^/nagios/cgi-bin/(.*).cgi /$1.cgi break;
        fastcgi_param AUTH_USER $remote_user;
        fastcgi_param REMOTE_USER $remote_user;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
        fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin/$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
    }

To this:

Code: Select all

    location ~ .cgi$ {
        root /usr/local/nagios/sbin/;
        include fastcgi_params;
        rewrite ^/cgi-bin/(.*).cgi /$1.cgi break;
        fastcgi_param AUTH_USER $remote_user;
        fastcgi_param REMOTE_USER $remote_user;
        fastcgi_pass unix:/var/run/fcgiwrap.socket;
        fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin/$fastcgi_script_name;
        fastcgi_param PATH_INFO $fastcgi_script_name;
    }
Then restart nginx and try it again:

Code: Select all

service nginx restart
Let us know the results.
Locked