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

  • 相关阅读:
    详细剖析js中的object对象
    js中数据、内存、变量的概念及三者之间的关系
    清除浏览器默认样式的reset.css(转载于reset.css的官方)
    CSS元素层级的概念及性质
    浮动引发的高度塌陷问题及其解决方法(BFC相关概念及性质)
    git命令操作
    let和const的区别以及let和var的区别
    弹性盒布局的属性和属性值
    vue和jquery的对比
    软件质量保障初探
  • 原文地址:https://www.cnblogs.com/networking/p/5329447.html
Copyright © 2011-2022 走看看