icinga

参考文档 http://www.cnblogs.com/mchina/archive/2013/02/20/2883404.html

安装:

监控机

apt-get install icinga   nagios-plugins   nagios-plugins-contrib  nangios-nrpe-pluginsnagios-nrpe-server

copy (360)里的案例 icinga-example.tar.gz


客户端               (批量操作时要包括监控机都要安装这个)

apt-get install   nagios-plugins  nagios-nrpe-plugins  nagios-nrpe-server


再下载安装Sys-Statistics-Linux-0.66  (我的360)

http://exchange.nagios.org/directory/Plugins/Operating-Systems/Linux/check_linux_stats/details


再拷贝plugins 在 /usr/lib/nagios/plugins 下  (我的360)

cd   /usr/lib/nagios/plugins

sudo chmod 755 ./*

sudo chown root:nagios resource.cfg

copy(我的360) 里的nrpe.conf 替换/etc/nagios/下面的

注意修改里面的 allowed_hosts=

 /usr/lib/nagios/plugins/check_nrpe -H  IP  -c  check_(all innrpe.cfg


usr/lib/nagios/plugins           所有插件    可以在nrpe.cfg里定义命令的插件


安装fcgiwrap  并修改端口

cd /etc/nginx/scgi_params

scgi_param    REQUEST_METHOD        $request_method;
scgi_param    REQUEST_URI        $request_uri;
scgi_param    QUERY_STRING        $query_string;
scgi_param    CONTENT_TYPE        $content_type;

scgi_param    DOCUMENT_URI        $document_uri;
scgi_param    DOCUMENT_ROOT        $document_root;
scgi_param    SCGI            1;
scgi_param    SERVER_PROTOCOL        $server_protocol;

scgi_param    REMOTE_ADDR        $remote_addr;
scgi_param    REMOTE_PORT        $remote_port;
scgi_param    SERVER_PORT        $server_port;
scgi_param    SERVER_NAME        $server_name;


cat /etc/nginx/site-enabled/icinga

#server {   
#
#        listen       80;  
#
#        server_name     192.168.122.101;
#
#        auth_basic            "Restricted Nagios Area!";  
#
#        auth_basic_user_file  /etc/icinga/htpasswd.users;  
#
#        charset utf-8;  
#
#        root  /usr/share/icinga/htdocs;
#
#
#       if ($host != "192.168.122.101" ) {
#                 rewrite ^ http://192.168.122.101$request_uri permanent;
#       }   
#
#       index index.php index.html index.htm;
#           
#        location = /robots.txt {
#                allow all;
#                log_not_found off;
#                access_log off;
#       }   
#        #Deny all attempts to access hidden files such as .htaccess, .htpasswd
#       location ~ /\. {
#                deny all;
#                access_log off;
#                log_not_found off;
#       }   
#       location /icinga {
#              alias   /usr/share/icinga/htdocs;
#              index  index.html;
#              auth_basic              "Icinga Access";
#              auth_basic_user_file    /etc/icinga/htpasswd.users;
#      }   
#       location / {
#              auth_basic              "Icinga Access";
#              auth_basic_user_file    /etc/icinga/htpasswd.users;
#       }   
#       location /icinga/stylesheets {
#                alias /etc/icinga/stylesheets;
#       }   
#       location /stylesheets {
#                alias /etc/icinga/stylesheets;
#       }   
#       location /icinga/images {
#                alias /usr/share/icinga/htdocs/images;
#       }   
#        location ~ \.cgi$ {   
#
#                root /usr/lib/cgi-bin/icinga;  
#
#                rewrite ^/cgi-bin/icinga/(.*)$ /$1;  
#
#                include /etc/nginx/fastcgi_params;  
#
#                fastcgi_pass 127.0.0.1:8900;
#
#                fastcgi_param AUTH_USER $remote_user;
#
#                fastcgi_param REMOTE_USER $remote_user;
#
#                fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/icinga$fastcgi_script_name;
#
#        }
#
#}








  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值