1. nagios安装
2. nagiox插件安装
3. nrpe安装
4.安装配置Nginx nagios的完整WEB配置 server { listen 80; server_name 1.1.1.2; root /usr/local/nagios/share; index index.html index.htm index.php default.html default.htm default.php; location ~ .*.php?$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; include fastcgi_params; fastcgi_param SCRIPT_FILENAME /usr/local/nagios/share$fastcgi_script_name; auth_basic "nagios admin"; auth_basic_user_file /usr/local/nagios/etc/nagiosAdmin.net; } location ~ .*.cgi$ { root /usr/local/nagios/sbin; rewrite ^/nagios/cgi-bin/(.*).cgi /$1.cgi break; fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_index index.cgi; fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin$fastcgi_script_name; include fastcgi_params; auth_basic "nagios admin"; auth_basic_user_file /usr/local/nagios/etc/nagiosAdmin.net; } location /nagios { alias /usr/local/nagios/share; auth_basic "nagios admin"; auth_basic_user_file /usr/local/nagios/etc/nagiosAdmin.net; } location ~ .*.pl$ { fastcgi_pass unix:/var/run/fcgiwrap.socket; fastcgi_index index.pl; fastcgi_param SCRIPT_FILENAME /usr/local/nagios/sbin$fastcgi_script_name; include fastcgi_params; } } 5、Nagios换主题 http://exchange.nagios.org/directory/Addons/Frontends-%28GUIs-and-CLIs%29/Web-Interfaces/Themes-and-Skins/Nuvola-Style/details 下载下来文件,然后解压,把html重命名为share。覆盖/usr/local/nagios/share即可,建立先备份原来的share。最终效果如下
错误总结: 1、安装nrpe的时候报错 checking for SSL libraries... configure: error: Cannot find ssl libraries
解决办法: #dpkg -L libssl-dev #找到libssl.so文件做个链接 root@node2:/usr/lib# ln -s /usr/lib/x86_64-linux-gnu/libssl.so /usr/lib/libssl.so
2、页面提示 It appears as though you do not have permission to view information for any of the services you requested...
If you believe this is an error, check the HTTP server authentication requirements for accessing this CGI
解决办法: # vim /usr/local/nagios/etc/cgi.conf use_authentication=1 #第78行,把1改为0 (责任编辑:IT) |