nagios Connection refused by host

來源:互聯網
上載者:User

標籤:服務端   用戶端   

服務端(192.168.2.110)無法訪問用戶端的NRPE: 

[[email protected] ~]# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1

NRPE v2.12

[[email protected] ~]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.120

Connection refused by host

 

用戶端(192.168.2.120):

[[email protected] etc]# lsof -i :5666

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

nrpe    18703 nagios    4u  IPv4  85766      0t0  TCP localhost:5666 (LISTEN)#只在本地有效,所有外部的IP無法訪問

[[email protected] etc]# vim nrpe.conf +44

將以下內容注釋掉:

#server_address=127.0.0.1

[[email protected] etc]# pkill nrpe

[[email protected] etc]# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d

[[email protected] etc]# lsof -i :5666

COMMAND   PID   USER   FD   TYPE DEVICE SIZE/OFF NODE NAME

nrpe    18766 nagios    4u  IPv4  89670      0t0  TCP *:5666 (LISTEN)

這個就可以正常訪問了

 

服務端訪問:

[[email protected] etc]# /usr/local/nagios/libexec/check_nrpe -H 192.168.2.120 -c check_iostat

IOSTAT OK - user 0.28 nice 0.00 sys 0.30 iowait 0.31 idle 0.00  | iowait=0.31%;; idle=0.00%;; user=0.28%;; nice=0.00%;; sys=0.30%;;

 

 

 


本文出自 “阮勝昌的技術部落格” 部落格,謝絕轉載!

nagios Connection refused by host

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.