设为首页 收藏本站
查看: 935|回复: 0

icinga +pnp4nagios

[复制链接]

尚未签到

发表于 2019-1-14 13:52:16 | 显示全部楼层 |阅读模式
  icinga中文包:http://sourceforge.net/projects/icinga-cn/files/icinga-cn/
  icinga英文包:https://www.icinga.org/download/packages/
  

  1.安装icinga说需要的包
#> yum install httpd gcc glibc glibc-common gd gd-devel
#> yum install libjpeg libjpeg-devel libpng libpng-devel
#> yum install net-snmp net-snmp-devel net-snmp-utils  

  2.安装icinga(icinga-cn-1.9以这个为案例)
  2.1 添加icinga运行的相关用户和组
  2.2 编译安装
#> /usr/sbin/useradd -m icinga
#> passwd icinga
#> /usr/sbin/groupadd icinga
#> /usr/sbin/groupadd icinga-cmd
#> /usr/sbin/usermod -a -G icinga-cmd icinga
#> /usr/sbin/usermod -a -G icinga-cmd www-data
#> cd /usr/src/
#> tar xvzf icinga-1.9.tar.gz
#> cd icinga-1.9
#> ./configure --with-command-group=icinga-cmd --disable-idoutils
#> make all
#> make install
#> make install-init
#> make install-config
#> make install-eventhandlers
#> make install-commandmode
#> make install-config
#> vi /usr/local/icinga/etc/objects/contacts.cfg
#> make cgis
#> make install-cgis
#> make install-html
#> make install-webconf
#> htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
#> htpasswd /usr/local/icinga/etc/htpasswd.users
#> service httpd restart  3.安装Nagios-plugin
#> cd /usr/src
#> tar xvzf nagios-plugins-1.4.16.tar.gz
#> cd nagios-plugins-1.4.16
#> ./configure \
--prefix=/usr/local/icinga --with-cgiurl=/icinga/cgi-bin \
--with-nagios-user=icinga --with-nagios-group=icinga
#> make
#> make install  4.设置防火墙和selinux
  4.1这里测试就清空iptbales :iptables -F
#> getenforce
Set SELinux in "permissive" mode
#> setenforce 0
#> chcon -R -t httpd_sys_script_exec_t /usr/local/icinga/sbin/
#> chcon -R -t httpd_sys_content_t /usr/local/icinga/share/
#> chcon -R -t httpd_sys_script_rw_t /usr/local/icinga/var/rw/  5.设置开启启动项

#> chkconfig --add icinga
#> chkconfig icinga on
验证下配置文件是否正确
#> /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
或: #> /etc/init.d/icinga show-errors
启动 icinga
#> /etc/init.d/icinga start  

  6.访问
http://yourdomain.com/icinga/  

  7.Nrpe的安装
#> yum install openssl openssl-devel
#> wget http://sourceforge.net/projects/nagios/files/nrpe-2.x/nrpe-2.12/nrpe-2.12.tar.gz -O nrpe.tgz
#> tar xzf nrpe.tgz
#> cd icinga-nrpe
#> ./configure
#> make all
#> make install-plugin
FirstTest:
#> /usr/src/icinga-nrpe/src/nrpe -n \
-c /usr/src/icinga-nrpe/sample-config/nrpe.cfg -d
#> /usr/local/icinga/libexec/check_nrpe -H 127.0.0.1 -n  8.PNPnagios的安装
yum install rrdtool -y
wget http://cdnetworks-kr-1.dl.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.6.tar.gz
tar -xvzf pnp4nagios-0.6.6.tar.gz
cd pnp4nagios-0.6.6
./configure --with-nagios-user=icinga --with-nagios-group=icinga
make all
make install
make install-webconf
make install-config
make install-init  9.配置pnpnagios:
  参照下面链接配置:
http://docs.icinga.org/latest/en/icinga-web-pnp.html#idp12815568  

  nagios-snmp
  wget http://nchc.dl.sourceforge.net/project/nagios-snmp/nagios-snmp-plugins/1.1.1/nagios-snmp-plugins.1.1.1.tgz
安装snmp
1) By CPAN (best)
on command line, as root :
[your_host]# perl -MCPAN -e shell
cpan shell -- CPAN exploration and modules installation (v1.76)
ReadLine support enabled
cpan> install Net::SNMP

  tar xf nagios-snmp-plugins
  cd nagios_plugins/
  sh install.sh
  输入安装的相关参数。
  

  参考:
  nagios 的snmp插件用法:http://nagios.manubulon.com/index_commands.html#load
  

  https://wiki.icinga.org/display/howtos/Setting+up+PNP+with+Icinga#SettingupPNPwithIcinga-RRDToolandPerlBindings
  icinga +pnp4nagios

  参考文档:
  http://docs.icinga.org/latest/en/quickstart-idoutils.html
  http://docs.icinga.org/latest/en/
  

  附录:nagios +pnp的文档:
  http://wenku.baidu.com/view/4daf21a0284ac850ad02426c.html
  pnp4nagios监控网卡流量:http://www.xmydlinux.org/201011/51.html
  check_linux_stats:http://storysky.blog.运维网.com/628458/696749
  http://blog.sina.com.cn/s/blog_6eee53080101a1dm.html
  

  

  

  

  

  





运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-663242-1-1.html 上篇帖子: Nagios的配置详解 下篇帖子: 搭建nagios监控
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表