zoukankan      html  css  js  c++  java
  • Nagios的客户端的安装

    一、Linux服务器的nagios客户端的安装

    步骤:

    1、  创建目录,上传文件到该目录

    mkdir /data

    nagios-plugins-2.1.1.tar.gz

    nrpe-2.12.tar.gz

    2、  创建nagios组和用户

    groupadd nagios

    mkdir /usr/local/nagios

    useradd nagios -d /usr/local/nagios -s /sbin/nologin -g nagios

    chown -R nagios:nagios /usr/local/nagios/

    3、  安装nagios-plugins

    tar zxvf nagios-plugins-2.1.1.tar.gz

    cd nagios-plugins-2.1.1

    ./configure --prefix=/usr/local/nagios --with-user=nagios --with-nagios-group=nagios

    make && make install

    4、  安装nrpe

    tar zxvf nrpe-2.12.tar.gz

    cd nrpe-2.12

    ./configure --prefix=/usr/local/nagios

    make all

    make install-plugin

    make install-daemon

    make install-daemon-config

    make install-xinetd

    chown -R nagios:nagios /usr/local/nagios/

    5、  增加服务

    vi /etc/services

    nrpe            5666/udp                #nrpe

    nrpe            5666/tcp                #nrpe

    6、  允许nagios服务访问

    vi /etc/xinetd.d/nrpe

    • only_from       = 10.0.0.10

    故障:checking for SSL headers... configure: error: Cannot find ssl headers

    解决:yum -y install openssl-devel

    故障:checking for cl.exe... no

    解决:yum install -y gcc-c++

    注:如果没有安装xinetd服务,需要安装

    yum -y install xinetd

    7、  重启xinetd服务

    /etc/init.d/xinetd restart

    8、  测试服务是否正常

    netstat –ntlup 看5666端口是否监听状态

            服务器端使用

            /usr/local/nagios/libexec/check_nrpe -H 10.0.0.20

            获取版本信息

            NRPE v2.12

  • 相关阅读:
    sqlserver2005系统表、视图研究2
    SQLServer2005新分页方法
    应该多了解一些工具
    关于SQLServer的小技巧
    EasyUI DataGrid使用Json加载不了数据
    js跨域及解决方案
    关于Master Page的css和js文件引用问题
    嵌套母版页
    SSMS获取存储过程中的返回值和output值
    静态构造函数
  • 原文地址:https://www.cnblogs.com/networking/p/5329447.html
Copyright © 2011-2022 走看看