温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Nagios+Nagvis+pnp4+MKlivestatus+gearman on suse SLESSP3

发布时间:2020-06-28 21:58:32 来源:网络 阅读:915 作者:潘麟 栏目:移动开发

zypper in gcc-c++ glibc-devel libstdc++-devel apache2

php53 apache2-mod_php53 php53-gd php53-gettext php53-mbstring

php53-json php53-pdo graphviz rrdtool libboost_program_options1_36_0

php53-zlib


useradd -m nagios

groupadd nagios

usermod -G nagios nagios

groupadd nagcmd

usermod -A nagcmd nagios

usermod -A nagcmd wwwrun


tar zxf nagios-3.5.1.tar.gz

cd nagios/

./configure --with-command-group=nagcmd

make all

make install

make install-init

make install-config

make install-commandmode

make install-webconf

htpasswd2 -c /usr/local/nagios/etc/htpasswd.users nagiosadmin


tar zxf nagios-plugins-2.1.1.tar.gz 

cd nagios-plugins-2.1.1/

./configure --with-nagios-user=nagios --with-nagios-group=nagios

make

make install


chkconfig --add nagios

chkconfig nagios on

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

service nagios start

service apache2 start


rpm -ivh sqlite2-2.8.17-134.12.x86_64.rpm

rpm -ivh php53-sqlite-5.3.17-0.13.7.x86_64.rpm

rpm -ivh php53-sockets-5.3.17-0.13.7.x86_64.rpm

tar zxf mk-livestatus-1.2.6p16.tar.gz

cd mk-livestatus-1.2.6p16/

./configure

make

make install

vi /usr/local/nagios/etc/nagios.cfg

broker_module=/usr/local/lib/mk-livestatus/livestatus.o /usr/local/nagios/var/rw/live

service nagios restart


tar zxf nagvis-1.8.5.tar.gz 

cd nagvis-1.8.5/

./install.sh

service apache2 restart


tar zxf pnp4nagios-0.6.25.tar.gz 

cd pnp4nagios-0.6.25/

./configure

make all

make fullinstall

a2enmod rewrite

service apache2 restart


rpm -ivh gearmand-server-0.33-2.sles11sp3.x86_64.rpm

rpm -ivh gearmand-0.33-2.sles11sp3.x86_64.rpm

rpm -ivh gearmand-devel-0.33-2.sles11sp3.x86_64.rpm

rpm -ivh mod_gearman-1.5.2-1.sles11sp3.x86_64.rpm

vi /usr/local/nagios/etc/nagios.cfg

broker_module=/usr/lib64/mod_gearman/mod_gearman.o config=/etc/mod_gearman/mod_gearman_neb.conf

process_performance_data=0--->process_performance_data=1

vi /usr/local/nagios/etc/objects/templates.cfg

define host {

   name       host-pnp

   action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_

   register   0

}


define service {

   name       srv-pnp

   action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$

   register   0

}

vi /usr/local/nagios/etc/objects/localhost.cfg

use linux-server--->use linux-server,host-pnp

use local-service--->use local-service,srv-pnp

service nagios stop

service gearmand start

/etc/init.d/mod_gearman_worker start

service nagios start

tar zxf String-CRC32-1.5.tar.gz

cd String-CRC32-1.5

perl Makefile.PL

make

make test

make install

tar zxf Gearman-1.12.tar.gz

cd Gearman-1.12.tar

perl Makefile.PL

make

make test

make install

tar zxf Test-Simple-1.001014.tar.gz

cd Test-Simple-1.001014

perl Makefile.PL

make

make test

make install

tar zxf Crypt-Rijndael-1.13.tar.gz

cd Crypt-Rijndael-1.13

perl Makefile.PL

make

make test

make install

/etc/init.d/pnp_gearman_worker start

cd /usr/local/pnp4nagios/share

mv install.php install.php.bak


向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI