icinga check_nrpe 报错收集

运维监控   nrpe  


  • checking for SSL headers... configure: error: Cannot find ssl headers
  • 原因是缺少openssl-devel包,解决办法
  • CentOS
    • yum -y install openssl-devel
  • debian
  • apt-get install libssl-dev


  • CHECK_NRPE: Socket timeout after 10 seconds
  • Connection refused or timed out


  • CHECK_NRPE: Received 0 bytes from daemon. Check the remote server logs for error messages.
  • 重新编译nrpe
  • CentOS
    • ./configure --prefix=/usr/local/icinga --enable-ssl --with-nrpe-user=nagios --with-nrpe-group=nagios --with-nagios-user=nagios --with-nagios-group=nagios --enable-command-args
  • Debian

    • ./configure --prefix=/usr/local/icinga --enable-ssl --with-nrpe-user=nagios --with-nrpe-group=nagios --with-nagios-user=nagios --with-nagios-group=nagios --enable-command-args --with-ssl-lib=/usr/lib/x86_64-linux-gnu
  • 测试
    /usr/local/icinga/libexec/check_nrpe -H x.x.x.x -c check_disk_args -a 4% 11% data

四、check_icmp check_dhcp 权限问题

  • 由于对 icinga/libexec 执行了chown nagios.nagios . -R出现如下错误
    Warning: This plugin must be either run as root or setuid root.
  • 解决办法
    chown root.nagios check_icmp
    chown root.nagios check_dhcp chmod 4750 check_icmp
    chmod 4750 check_dhcp