Icinga快速安装与配置/* body */body { margin: 20px; padding: 0; font-family: "Lucida Grande", "Lucida Sans Unicode", Verdana, Helvetica, Arial, sans-serif; font-size: 0.72em; color: #262625; /*background: #EFEFEF;*/ background: #FFFFFF; font-family: verdana, sans-serif;}
/* urls */a:link, a:visited, a:active { color: #1F1F1F; font-weight: normal; text-decoration: underline;}
a:hover { color: #FFB600; font-weight: normal; text-decoration: underline;}
ul, ol, dl, p, h1, h2, h3, h4, h5, h6 { margin-top: 10px; margin-bottom: 10px; padding-top: 0; padding-bottom: 0;}/* remove margins on sub-lists */ul ul, ul ol, ol ul, ol ol { margin-top: 0; margin-bottom: 0;}
/* code style */code, pre { font-family: "Courier New", Courier, monospace; font-size: 1em;}pre { overflow: auto; word-wrap: normal; padding-bottom: 1.5em; overflow-y: hidden;}abbr[title], acronym[title] { border-bottom: 1px dotted;}
hr { display: block; height: 2px; border: none; margin: 0.5em auto; color: #cccccc; background-color: #cccccc;}
/* use the body's font size in tables, too: */table { font-size: 1em; margin: 0; padding: 0; background: none; border: 0;}
/* block shadows */pre.literallayout,.screen,.synopsis,.programlisting,.refsynopsysdiv p,div.note,.warning,.important.informataltable { -moz-box-shadow: 3px 3px 5px #DFDFDF; -webkit-box-shadow: 3px 3px 5px #DFDFDF; -khtml-box-shadow: 3px 3px 5px #DFDFDF; -o-box-shadow: 3px 3px 5px #DFDFDF; box-shadow: 3px 3px 5px #DFDFDF;}
/* block layout */pre.literallayout,.screen,.synopsis,.programlisting,.refsynopsysdiv p,div.note,.warning,.important,.informataltable { color: black; border-width: 1px; border-style: solid; padding: 2ex; margin: 2ex 0 2ex 2ex; overflow: auto; -moz-border-radius: 8px; -webkit-border-radius: 8px; -khtml-border-radius: 8px; border-radius: 8px;}
/* non programlisting blocks */pre.literallayout,pre.synopsis,.refsynopsis p,.screen { border-color: #CFCFCF; background-color: #F7F7F7;}
/* programlisting special */pre.programlisting { border-color: #CFCFCF; background-color: #EFEFEF; border: 1px dashed black; margin-right: 0.5in;}
/* informaltable special */div.informaltable,.informaltable.table,.informaltable.table tr,.informaltable.table td { border-collapse: collapse; border-spacing: 10px; font-size: 1em; border-color: #CFCFCF; background-color: #EFEFEF; border: 1px dotted black; margin: 2px 5px; padding: 0.5em;}
div.informaltable p { /* line-height: 1.1em; */}
/* note, important special */div.note,.warning,.important { background-color: #FFFFFF; border: 1px solid #000000;}
/* headers */h1 { font-size: 34px; line-height: 1.2; margin: 0.3em 0 10px; }h2 { font-size: 28px; line-height: 1.3; margin: 1em 0 .2em; }h3 { font-size: 24px; line-height: 1.3; margin: 1em 0 .2em; }h4 { font-size: 19px; margin: 1.33em 0 .2em; }h5 { font-size: 1.3em; margin: 1.67em 0; font-weight: bold; }h6 { font-size: 1.15em; margin: 1.67em 0; font-weight: bold; }
/* center some titles */.book .title, .book .corpauthor, .book .copyright { text-align: center;}
/* decoration for formal examples */div.example { padding-left: 15px; border-style: solid; border-width: 0px; border-left-width: 2px; border-color: black; margin: 0.5ex;}
/* less dense spacing of TOC */.booc .toc DL DT { padding-top: 1.5ex; padding-bottom: 1.5ex;}
.book .toc DL DL DT { padding-top: 0ex; padding-bottom: 0ex;}
/* miscellaneous */pre.literallayout, .screen, .synopsis, .programlisting { margin-left: 4ex;}
.comment { color: red; }
var { font-family: monospace; font-style: italic; }/* Konqueror's standard style for ACRONYM is italic. */acronym { font-style: inherit; }
.screen { margin-right: 0.5in;}

Icinga快速安装与配置

1.1. 简述

说明

如果没有安装Icinga,你可使用适用于您的操作系统的软件包.

如果你打算从源代码安装,那么请使用官方发布的压缩包.

提示

除非你有问题,需要通过目前的开发版本来解决,否则请不要使用git快照.

本指南旨在为您提供简单的如何从源(代码)安装Icinga的说明,并在20分钟内监控您的本地计算机.

这里不会对进阶安装选项进行讨论 - 只需基本操作大多数的用户就可以开始使用.

目前提供三种不同的Linux发行版的例子: Fedora, UbuntuopenSuSE. 类似发行版也可以正常使用. 这应该包括 RedHat, CentOS, DebianSLES.

最终您会得到结果是什么

如果您按照这些说明操作,最终结果:

  • Icinga和插件将安装到 /usr/local/icinga

  • 配置Icinga监视您本地系统的几个方面 (CPU负载, disk使用率, 例如.)

  • Icinga经典web界面可以通过http://localhost/icinga/ 或 http://yourdomain.com/icinga访问

  • Icinga使用IDOUtils加载数据库

1.2. 前提条件

部分安装过程中,你需要具有root权限.

再继续安装之前,请确保你已经安装以下软件包. 如果安装IDOUtils,需要使用libdb和libdbi-drivers的开发库. 下面的例子将显示如何安装icinga和IDOUtils.

  • Apache或Nginx

  • GCC 编译器

  • C/C++ 开发库

  • GD 开发库

  • libdbi/libdbi-drivers, 如MySQL或PostgreSQL数据库(如果不安装IDOUtils请跳过此部分)

    说明

    PostgreSQL: 由于INSERT语句的变化 PostgreSQL 8.1 无法再运作(2010年11月以来已经 结束产品生命期), 所以请使用8.2或高于8.4的版本. 字符串转义在PostgreSQL 9.x处于实验阶段(请参阅 issue #1974).

1.3. 安装软件包

1.3.1 您可以运行以下命令(以root或使用sudo)安装这些软件包.

备注

如果没有发现相应软件包,请使用您的包管理器的搜索选项来获得新的不同版本之间的变化名称:

  • yum search <package name> ( Fedora/RHEL/CentOS )

  • apt-cache search <package name> ( Debian/Ubuntu )

  • zypper search <package name> ( openSuSE/SLES )

  • Fedora/RHEL/CentOS:

     #> yum install httpd gcc glibc glibc-common gd gd-devel #> yum install libjpeg libjpeg-devel libpng libpng-devel
    备注

    您可能需要使用到libjpeg-turbo和libjpeg-turbo-devel代替

    • MySQL:

       #> yum install mysql mysql-server \ libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql
    • PostgreSQL:

       #> yum install postgresql postgresql-server \ libdbi libdbi-devel libdbi-drivers libdbi-dbd-pgsql
  • Debian/Ubuntu:

     #> apt-get install apache2 build-essential libgd2-xpm-dev #> apt-get install libjpeg62 libjpeg62-dev libpng12 libpng12-dev
    备注

    Debian 6.0 / Ubuntu 10.10开始使用libpng-12-0包, dev-package名称不变.

    • MySQL:

       #> apt-get install mysql-server mysql-client libdbi1 libdbi-dev libdbd-mysql
    • PostgreSQL:

       #> apt-get install postgresql libdbi0 libdbi0-dev libdbd-pgsql
  • openSuSE:

    请使用YaST安装包 gd, gd-devel, libjpeg, libjpeg-devel, libpng, libpng-devel 和, optionally, net-snmp, net-snmp-devel 和 perl-Net-SNMP.

    使用zypper:

     #> zypper install gd gd-devel libjpeg libjpeg-devel libpng libpng-devel #> zypper install net-snmp net-snmp-devel perl-Net-SNMP
    备注

    开发包可能位于SDK DVDs.

    • MySQL:

      使用YaST安装RDBMS包,你要使用,例如. "mysql", "mysql-devel", "mysql-client" 和 libdbi 包s "libdbi", "libdbi-devel", "libdbi-drivers" 和 "libdbi-dbd-mysql", 或 alternatively zypper.

       #> zypper install mysql mysql-devel mysql-client \ libdbi libdbi-devel libdbi-drivers libdbi-dbd-mysql
      备注

      在OpenSuSE 11 (SLES 11)中 "mysql-devel" 已更改为 "libmysqlclient-devel".

    • PostgreSQL:

      使用YaST安装RDBMS包,你要使用, 例如. "postgresql", "postgresql-devel", "postgresql-server" 和libdbi包 "libdbi", "libdbi-devel" and "libdbi-drivers", 或 alternatively zypper.

       #> zypper install postgresql postgresql-devel postgresql-server #> zypper install libdbi libdbi-devel libdbi-drivers
    备注

    使用旧的OpenSuSE (SLES)版本,包括版本10目前可能还没有任何libdbi包. 所以你必须下载并编译源代码. 您可以使用如mysql或pgsql代替所需的. 请记住,Oracle驱动程序还无法工作和请使用ocilib代替libdbi.

    1.3.2 使用源码安装

    首先需要确认gd是否支持TTC,如果不支持请重新编译gd

    1. 编译GD(freetype+libjpeg+libpng+fontconfig)

       #> tar zxvf libiconv-1.14.1.tar.gz #> cd libiconv-1.14.1 #>./configure --prefix=/usr/local/libiconv  #> make  #> make install  #> /sbin/ldconfig
       #> tar xvzf gd-2.0.35.tar.gz #> cd gd-2.0.35 #> ./configure --prefix=/usr/local/gd2 --with-libiconv-prefix=/usr/local/libiconv #> make #> make install
    2. 安装libdbi. 你还可以指定额外的配置选项(例如 --prefix=/usr ... )

       #> cd libdbi-0.8.3 #> ./configure --disable-docs #> make #> make install
    3. 安装libdbi-drivers

       #> cd libdbi-drivers-0.8.3-1 #> ./configure --with-<rdbm> --disable-docs #> make #> make install
    4. 备注

      在64-bit版本上使用,你必须指定include-和lib-dir的路径:

       #> ./configure --with-<rdbm> \ --with-<rdbm>-incdir=/usr/include/<rdbm>/ \ --with-<rdbm>-libdir=/usr/lib64/ --disable-docs

1.4. 创建帐户信息

 $> su -l

创建一个新的Icinga帐户,并设置一个密码.

 #> /usr/sbin/useradd -m icinga  #> passwd icinga 

在某些发行版本 你需要在这一个步骤中添加组:

 #> /usr/sbin/groupadd icinga
 #> /usr/sbin/usermod -a -G icinga www-data

(或 www, wwwrun, apache取决于发行版本)

1.5. 编译和安装Icinga(包括IDOUtils)

提取Icinga源代码tarball

 #> tar jxvf icinga-cn-1.11.5.tar.gz  #> cd icinga-cn-1.11.5 #> ./configure --prefix=/usr/local/icinga --with-icinga-user=icinga -with-icinga-group=icinga \  --with-command-user=icinga --with-command-group=icinga --with-mail=/usr/bin/mutt \ --with-gd-lib=/usr/local/gd2/lib --with-gd-inc=/usr/local/gd2/include --enable-nanosleep --enable-event-broker
备注

--enable-idoutils #数据库支持(默认)

--enable-embedded-perl #启用嵌入式Perl解释器

--enable-ssl #使本地的SSL支持

--with-mail #设置邮件通知使用的程序,默认为Mutt.

--enable-oraclel #启用oraclel支持.
a.如果没有安装Oracle库路径,您需要指定--with-oracle-lib=/path/to/instantclient
b.如果ocilib没有安装到默认路径(/usr/local), 您需要指定 --with-ocilib-lib=/path/to/ocilib/lib --with-ocilib-inc=/path/to/ocilib/include

此外,如果您要使用PostgreSQL将不宜使用参数--enable-pgsq, 因为它目前还不被支持.

备注

如果您想从Oracle作为MRDB, 您需要重新编译和安装IDOUtils!

Oracle使用IDOUtils1.5.0至少需要OCILIB3.9.2 - 不要安装3.9.0或3.9.1,因为它们仍然有bug。

 #> make distclean #> ./configure --prefix=/usr/local/icinga --with-icinga-user=icinga -with-icinga-group=icinga \  --with-command-user=icinga --with-command-group=icinga --enable-idoutils \ --with-httpd-conf=/etc/httpd/conf.d --enable-nanosleep --enable-event-broker

1.5.1. 编译和安装

 #> make all

安装二进制文件, 初始化脚本, 配置文件样本, 一些事件处理函数, 和设置外部命令目录的权限.

 #> make install #> make install-init #> make install-config #> make install-eventhandlers #> make install-commandmode #> make install-idoutils 

或使用

 #> make fullinstall #> make install-config
备注

从Icinga 1.5.0开始 make install-config 不包括在 make fullinstall中,以避免意外覆盖您的配置文件.

只要使用 "make install" 就可以安装IDOUtil和适用的event broker模块.

ldd ido2db查看加载模块

libdbi.so.1 => /lib64/libdbi.so.1

libdbi.so.1默认的路径是/lib64或/lib

不要启动Icinga- 还有更多的事情需要做...

1.6. 定制配置

使用 "make install-config" 安装简单配置文件到 /usr/local/icinga/etc/

 #> cd /usr/local/icinga/etc/ #> vi idomod.cfg #> vi ido2db.cfg

如果启用 --enable-ssl, 您需要更改 idomod.cfg文件:

 use_ssl=1 output_type=tcpsocket output=127.0.0.1

如果您的数据库没有位于本机,您需要更改ido2db.cfg:

 use_ssl=1 socket_type=tcp 
备注

如果在ido2db上启用SSL, 但对于不同的idomod客户端 - 将会出现数据丢失现象 - 需要在所有的节点上做相同的SSL配置!!!

1.6.1. 启用idomod event broker 模块

提示

在正常情况下,下面的模块定义已经存在于modules/idoutils.cfg-sample

	define module{ module_name idomod module_type neb path /usr/local/icinga/lib/idomod.so args config_file=/usr/local/icinga/etc/idomod.cfg	}

所以没有必要编辑主配置文件启用broker_module条目!

 #> mv idoutils.cfg-sample idoutils.cfg

1.7.数据库创建和IDOUtils

备注

如果刚安装了一个新的数据库系统,在您创建新数据库之前,你必须启动数据库服务. 如 MySQL可能使用 /etc/init.d/mysqld start (或 /etc/init.d/mysql, 这取决于您的发行版本).

  • MySQL:

    创建数据库,用户, 授权:

     #> mysql -u root -p mysql> CREATE DATABASE icinga;
    GRANT USAGE ON icinga.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
    GRANT SELECT, INSERT, UPDATE, DELETE, DROP, CREATE VIEW, INDEX, EXECUTE ON icinga.* TO 'icinga'@'localhost'; FLUSH PRIVILEGES;
    quit
    备注

    从Icinga 1.8 开始icinga用户另外需要EXECUTE权限.

    向MySQL导入数据库架构:

     #> cd /path/to/icinga-src/module/idoutils/db/mysql #> mysql -u root -p icinga < mysql.sql

    升级MySQL数据库:

     #> cd /path/to/icinga-src/module/idoutils/db/mysql/upgrade #> mysql -u root -p icinga < mysql-upgrade-x.sql

    编辑DB配置文件自定义IDOUtils

     #> vi /usr/local/icinga/etc/ido2db.cfg
     db_servertype=mysql db_port=3306 db_user=icinga db_pass=icinga
  • PostgreSQL:

    创建数据库和用户:

     #> su - postgres $ psql postgres=# CREATE USER icinga; postgres=# ALTER USER icinga WITH PASSWORD 'icinga'; postgres=# CREATE DATABASE icinga; postgres=# \q $ createlang plpgsql icinga;

    从PostgreSQL 9.1开始 "createlang ..."已经过时.

    • Debian:

       #> vi /etc/postgresql/8.x/main/pg_hba.conf
    • Fedora/RHEL/CentOS:

       #> vi /var/lib/pgsql/data/pg_hba.conf

    编辑配置文件 例如. 这样 (本地用户必须信任)

     # database administrative login by UNIX sockets local all postgres ident # TYPE DATABASE USER CIDR-ADDRESS METHOD  #icinga local icinga icinga trust # "local" is for Unix domain socket connections only local all all trust # IPv4 local connections host all all 127.0.0.1/32 md5 # IPV6 local connections host all all ::1/128 md5

    重新载入和配置数据库架构.

     #> /etc/init.d/postgresql-8.x reload
     #> cd /path/to/icinga-src/module/idoutils/db/pgsql #> psql -U icinga -d icinga < pgsql.sql

    升级PostgreSQL数据库.

     #> cd /path/to/icinga-src/module/idoutils/db/pgsql/upgrade #> psql -U icinga -d icinga < pgsql-upgrade-x.sql

    编辑DB配置文件自定义IDOUtils

     #> vi /usr/local/icinga/etc/ido2db.cfg
     db_servertype=pgsql db_port=5432 db_user=icinga db_pass=icinga
  • Oracle:

    创建一个数据库结构描述和用户名/密码 (请参阅Oracle文档 http://www.oracle.com ,或咨询您的DBA). 使用sqlplus导入数据库结构描述 (或 您的首选方法). 复制 module/idoutils/db/oracle/* 到 $ORACLE_HOME 和编辑 icinga_defines.sql 以匹配表空间和用户认证信息.

     #> su - oracle $> sqlplus dbuser/dbpass SQL> @oracle.sql

    编辑DB配置文件自定义IDOUtils. 请记住Oracle忽略的db主机, 代替指向 db_name 到 //DBSERVER/DBNAME

     #> vi /usr/local/icinga/etc/ido2db.cfg
     db_servertype=oracle db_port=1521 db_user=icinga db_pass=icinga

1.8. 配置经典的Web界面

安装Icinga附带的经典web界面("CGIs")

 #> make cgis #> make install-cgis #> make install-html

安装经典web配置文件到Apache的conf.d目录下.

 #> make install-webconf

创建 icingaadmin 账户,登录到Icinga经典web界面. 记住您分配给这个帐户的密码 -稍后你会需要它.

 #> htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin

如果你想改变用户密码,或添加另一个用户,请使用以下命令:

 #> htpasswd /usr/local/icinga/etc/htpasswd.users <USERNAME>
备注

这取决于您的发行版本和Apache版本,您还可能使用到 htpasswd2 代替.

重新载入/重新启动Apache使新的设置生效.

  • Fedora/RHEL/CentOS:

     #> service httpd restart
  • Ubuntu/openSuSE:

     #> service apache2 restart
  • Debian:

     #> /etc/init.d/apache2 reload

1.9. 编译和安装Icing插件

#> tar -jxvf nagios-cn-plugins-1.5.tar.bz2 #> cd nagios-cn-plugins-1.5 

编译并安装插件安装到目录/usr/local/icinga

 #> ./configure --prefix=/usr/local/icinga \ --with-package-name=icinga-plugins \ --with-icinga-user=icinga --with-icinga-group=icinga  #> make  #> make install 
备注

#查看播件文件是否已安装在这个目录

ls /usr/local/icinga/libexec

1.9.1. 安装check_nrpe 插件

#> tar -zxvf nrpe-2.14.tar.gz  #> cd nrpe-2.14  #> ./configure --prefix=/usr/local/icinga --enable-ssl  #> make all #> make install-plugin

2.0. 调整SELinux的设置

RHEL和衍生版本(如Fedora和CentOS) 出厂时激活了SELinux(Security Enhanced Linux) 并运行在"enforcing"模式. 当你尝试调用Icinga-CGIs时,可能导致 "内部服务器错误" 消息.

检查SELinux是否运行在enforcing模式

#> getenforce 

设置SELinux处于"permissive"模式

#> setenforce 0

如果要永久更改,你必须调整/etc/selinux/config中的该设置并重新启动系统.

如果不停用SELinux或将它设置成permissive模式,您可以在enforcing/targeted模式下,使用下面的命令来运行CGIs:

 #> 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/

此外你也可以看看这个 http://www.linuxquestions.org/questions/blog/sag47-492023/selinux-and-icinga-34926/.

2.1. 启动IDOUtils和Icinga

在启动Icinga之前必须先启动和运行IDOUtils.

启动 IDOUtils:

  • Fedora/RHEL/CentOS/Ubuntu/openSuSE:

     #> service ido2db start
  • Debian:

     #> /etc/init.d/ido2db start

停止 IDOUtils:

  • Fedora/RHEL/CentOS/Ubuntu/openSuSE:

     #> service ido2db stop
  • Debian:

     #> /etc/init.d/ido2db stop

验证Icinga的配置文件样本.

 #> /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg 

一切正常将显示OK信息。如何有任何错误将会显示相应错误出现的未知. 启动 Icinga.

  • Fedora/RHEL/CentOS/Ubuntu/openSuSE:

     #> service icinga start
  • Debian:

     #> /etc/init.d/icinga start

2.1.1. 配置Icinga开机启动

添加Icinga到服务列表和在系统启动时自动启动 (在次之前确保您已经安装了init脚本).

  • Fedora/RHEL/CentOS/openSuSE:

     #> chkconfig --add icinga chkconfig icinga on
  • Debian/Ubuntu:

     #> update-rc.d icinga defaults

2.1.2. 登录到经典的Web界面

通过下面的网址,您现在应该能够访问到Icinga的经典Web界面. 系统将提示您先前指定的用户名 (例如. icingaadmin ) 和密码.

 http://localhost/icinga/

 http://yourdomain.com/icinga/ 

2.2. 其它修改

请确保您的系统的防火墙规则配置为允许访问到Web服务器,如果您要远程访问的Icinga的经典Web界面.

 #> iptables -A INPUT -p tcp -m tcp --dport 80 -j ACCEPT

2.3. 客户端主机的配置

添加用户(普通账户)icinga

 #> /usr/sbin/useradd icinga #> passwd icinga

2.3.1. 客户端编译和安装Icinga插件

 #> tar jxvf nagios-cn-plugins-1.5.tar.bz2 #> cd nagios-cn-plugins-1.5  #> ./configure -prefix=/usr/local/icinga \ --with-package-name=icinga-plugins \ --with-nagios-user=icinga --with-nagios-group=icinga  #> make #> make install
备注

#查看播件文件是否已安装在这个目录

ls /usr/local/icinga/libexec

2.3.2. 客户端编译和安装Nrpe

 #> tar xvzf icinga-nrpe-2.14.tar.gz #> cd icinga-nrpe-2.14  #> ./configure --prefix=/usr/local/icinga --with-nrpe-user=icinga --with-nrpe-group=icinga \  --with-icinga-user=icinga --with-icinga-group=icinga #> make all #> make install #> make install-plugin #> make install-daemon #> make install-daemon-config #> make install-init

2.3.3. 配置客户端Nrpe

添加nrpe服务器地址,允许服务器对其读取信息

 #> vi /usr/local/icinga/etc/nrpe.cfg #> allowed_hosts=127.0.0.1,IPADDRESS

增加command字段来添加要监控的服务

 command[check_users]=/usr/local/icinga/libexec/check_users -w 5 -c 10 command[check_load]=/usr/local/icinga/libexec/check_load -w 15,10,5 -c 30,25,20 command[check_hda1]=/usr/local/icinga/libexec/check_disk -w 20% -c 10% -p /dev/hda1  command[check_zombie_procs]=/usr/local/icinga/libexec/check_procs -w 5 -c 10 -s Z  command[check_total_procs]=/usr/local/icinga/libexec/check_procs -w 150 -c 200  command[check_ssh]=/usr/local/icinga/libexec/check_ssh -H localhost  command[check_swap]=/usr/local/icinga/libexec/check_swap -w 20% -c 10%  command[check_mysql]=/usr/local/icinga/libexec/check_mysql -H localhost -uroot -ptomcat2008  command[check_apache]=/usr/local/icinga/libexec/check_apachestatus -H localhost -p 80  command[check_ntp]=/usr/local/icinga/libexec/check_ntp -H localhost -w 0.5 -c 1  command[check_snmp]=/usr/local/icinga/libexec/check_snmp_service -H localhost -C monitor_energysh 

启动Nrpe

  • Fedora/RHEL/CentOS:

     #> service icinga-nrpe start
  • Debian/Ubuntu/openSuSE:

     #> /etc/init.d/icinga-nrpe start  或 #> service icinga-nrpe start
备注

检测服务端check_nrpe与客户端运行的nrpedaemon之间的通信

/usr/local/icinga/libexec/check_nrpe -H ClientIPADDRESS

© 2009-2013 Icinga Development Team, http://www.icinga.org

© 2009-2013 Icinga 中文化项目组, http://sourceforge.net/projects/icinga-cn

Icinga快速安装与配置的更多相关文章

  1. Centos6.5 安装MYSQL 5.5 -5.6.-5.7 一键yum快速安装 ,初始配置

    Centos6.5 安装MYSQL 5.5 ---5.6---5.7 一键yum快速安装 ,初始配置 第一步:安装mysql-5.5---- 5.6 ---- 5.7的yum源 [root@sv03 ...

  2. kubernetes(K8S)快速安装与配置集群搭建图文教程

    kubernetes(K8S)快速安装与配置集群搭建图文教程 作者: admin 分类: K8S 发布时间: 2018-09-16 12:20 Kubernetes是什么? 首先,它是一个全新的基于容 ...

  3. 快速安装与配置kubernetes集群搭

    Kubernetes是什么? 首先,它是一个全新的基于容器技术的分布式架构领先方案.这个方案尽然很新,但它是谷歌十几年以来大规模应用容器技术的经验积累和升华的一个重要成果.确切地说,kubernete ...

  4. CentOS下Subversion(SVN)的快速安装与配置

    如果你是一个软件开发者,你一定对Subversion不会感到陌生.Subversion是一个自由开源的版本控制系统.在Subversion管理下,文件和目录可以超越时空.Subversion将文件存放 ...

  5. Discuz常见小问题-如何快速安装和配置

    下载PHPNOW 可以解压到本地的某个目录,最好不要有中文路径,然后查看Readme进行安装,双击Setup.cmd 安装结束之后,会要求输入一个初始化的密码,不要忘记,会自动弹出一个测试页面,可以测 ...

  6. Linux下Moodle平台的快速安装方案

    一种快速安装与配置Moodle平台的方案,基本步骤: 1.选择与安装Linux系统 2.配置网络,开启shh和网络端口 3.一键安装集成环境(使用oneinstack方案) 4.服务器配置,端口和PH ...

  7. OpenStack云计算快速入门之二:OpenStack安装与配置

    原文:http://blog.chinaunix.net/uid-22414998-id-3265685.html OpenStack云计算----快速入门(2) 该教程基于Ubuntu12.04版, ...

  8. Redis快速入门:安装、配置和操作

    本文是有关Redis的系列技术文章之一.在之前的文章中介绍了<Redis快速入门:初识Redis>,对Redis有了一个初步的了解.今天继续为大家介绍Redis如何安装.配置和操作. 系列 ...

  9. EBS R12.2快速安装前没有配置Global Inventory报错

    EBS R12.2快速安装前没有配置Global Inventory,导致验证时"file systems"这一项没有通过,被标记了"X": (本图其它两个验证 ...

随机推荐

  1. 学习使用monkey 测试

    一.Monkey测试简介Monkey测试是Android平台自动化测试的一种手段,通过Monkey程序模拟用户触摸屏幕.滑动Trackball.按键等操作来对设备上的程序进行压力测试,检测程序多久的时 ...

  2. Android——数据库相关(课堂整理)

    layout文件: <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:an ...

  3. There is already an open DataReader associated with this Command which must be closed first." exception in Entity Framework

    Fixing the "There is already an open DataReader associated with this Command which must be clos ...

  4. Apache Shiro简介

    作者:var dump链接:https://zhuanlan.zhihu.com/p/23300328最近要做一个基于Java C/S架构的项目,主要涉及权限管理这方面的东西.了解到Apache Sh ...

  5. SQL2005 : 如何在SQL Server Profiler (事件查看器)中 跟踪查看死锁恢复

    SQL Profiler 通过 SQL Profiler 工具程序,可监控应用程序如何访问数据库引擎.普通来说,当系统性能需要优化或是应用程序对数据库访问的结果不合预期,都可以使用该工具确认视图问题所 ...

  6. 10 Common Problems Causing Group Policy To Not Apply

    10 Common Problems Causing Group Policy To Not Apply Group Policy is a solid tool and is very stable ...

  7. Hadoop学习11--Ha集群配置启动

    理论知识: http://www.tuicool.com/articles/jameeqm 这篇文章讲的非常详细了: http://www.tuicool.com/articles/jameeqm 以 ...

  8. GC之六--SystemGC完全解读

    概述 JVM的GC一般情况下是JVM本身根据一定的条件触发的,不过我们还是可以做一些人为的触发,比如通过jvmti做强制GC,通过System.gc触发,还可以通过jmap来触发等,针对每个场景其实我 ...

  9. c# 高效率导出多维表头excel

    [DllImport("User32.dll", CharSet = CharSet.Auto)] public static extern int GetWindowThread ...

  10. Windows下单机安装Spark开发环境

    机器:windows 10 64位. 因Spark支持java.python等语言,所以尝试安装了两种语言环境下的spark开发环境. 1.Java下Spark开发环境搭建 1.1.jdk安装 安装o ...