nagiosBP安装手顺 下载本文

内容发布更新时间 : 2024/5/22 3:50:45星期一 下面是文章的全部内容请认真阅读。

NagiosBP安装手顺

准备

1. Nagios (http://www.nagios.org) 已安装并可运行。

2. NDOUTILS(Nagios Data Output Utils将nagios中状态和事件信息保存入Mysql数据库)工具已安装

3. web服务器软件 Apache已安装。 4. Perl > 5.8 已安装 5.Perl模块安装。

5.1 cpanm工具安装

此工具通过访问互联网自动安装需要模块和此模块依赖模块。 解压App-cpanminus-1.7001.tar.gz文件

进入解压目录下,依次运行一下4条命令。 perl Makefile.PL make make test make install

5.2 Perl-Modul CGI::Simple必须安装 运行以下命令确认是否安装 perl -e \ 输出“OK”则此模块已安装,报错则未安装。 安装方法:输入命令cpanm 模块下载地址,如下:

cpanm http://search.cpan.org/CPAN/authors/id/A/AN/ANDYA/CGI-Simple-1.113.tar.gz 将自动完成下载安装,且依赖模块也将一起安装完成。 5.3 Perl-Modul DBI必须安装

运行以下命令确认是否安装perl -e \ 输出“OK”则此模块已安装,报错则未安装。 安装方法:输入命令cpanm 模块下载地址,如下:

cpanm http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.630.tar.gz

5.4 Perl-Modul JSON::XS 必须安装

运行以下命令确认是否安装perl -e \ 输出“OK”则此模块已安装,报错则未安装。 安装方法:输入命令cpanm 模块下载地址,如下:

cpanm http://search.cpan.org/CPAN/authors/id/M/ML/MLEHMANN/JSON-XS-3.01.tar.gz

5.5 Perl-Modul LWP::UserAgent 必须安装

运行以下命令确认是否安装perl -e \ 输出“OK”则此模块已安装,报错则未安装。

安装方法:输入命令cpanm 模块下载地址,如下:

cpanm

http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-6.05.tar.gz

安装

已root用户登录系统. 解压下载文件 tar xvzf nagios-business-process-addon-.tar.gz cd nagios-business-process-addon-

if using Nagios: For installation in the default path (/usr/local/nagiosbp/) type ./configure

if using Icinga: For installation in the default path (/usr/local/nagiosbp/) type ./configure --with-nagcgiurl=/icinga/cgi-bin --with-naghtmurl=/icinga --with-nagetc=/usr/local/icinga/etc/ --with-apache-authname=\

If You want to install somewhere else or if Your nagios or icinga is not installed in the default path (/usr/local/nagios/ or /usr/local/icinga), you can call configure with different parameters, see ./configure --help for details.

At the end, all important parameters are listed. If they are ok, type make install

to install Nagios Business Process AddOns.

Apache needs to know about the new files. Therefore a file nagiosbp.conf has been put into Your Apache's conf.d directory.

The default is, that the given configuration is included in all of

Apache's virtual hosts. If this is not what you want, You can copy the content of nagiosbp.conf into the according VirtualHost section of Your httpd.conf and delete nagiosbp.conf afterwards.

Another possibility is, to install the file in some other path, by calling configure e. g. with ./configure --with-httpd-conf=/usr/local/nagiosbp/etc/apache-conf.d/ and afterwards add an include statement into Apache's section for the according VirtualHost: Include /usr/local/nagiosbp/etc/apache-conf.d/nagiosbp.conf

Concerning the AuthName directives (there are two) in this file:

make sure they are exactly the same as in Nagios' or Icingas Apache config file (conf.d/nagios.conf or conf.d/icinga.conf)

Otherwise in the web GUI you are prompte twice for Your username and password. Once when accessing a page of Nagios or Icinga and once when accessing a page of the Business Process AddOns.

You can give the correct AuthName when calling configure by giving the additional parameter --with-apache-authname or by editing the file conf.d/nagiosbp.conf afterwards.

If You are done with Your Apache configuration, by typing apachectl configtest

You can check Your configuration. If it reports no error, reload Your Apache.

For Nagios Business Impact Analysis, a cron job has been created for You, that throws away old session files. It is normally located in /etc/cron.d

在nogios中添加此插件链接

修改页面文件 /usr/local/nagios/share/side.html 在文件中加入以下两个连接

Now move etc/ndo.cfg-sample to etc/ndo.cfg and edit it change all the parameters there according to Your setup and - if using a database backend - the user You just created all parameters have comments there. If You did install all components with their default path and settings, You probably will not have to change a lot.

Now You have finished the installation. Go ahead by configuring Your Business Processes as described in README

建立mysql登录用户 只有select权限

Especially do not miss nagios-bp-check-ndo-connection.pl