安裝nrpe客戶端:
創(chuàng)新互聯(lián)建站是創(chuàng)新、創(chuàng)意、研發(fā)型一體的綜合型網(wǎng)站建設(shè)公司,自成立以來(lái)公司不斷探索創(chuàng)新,始終堅(jiān)持為客戶提供滿意周到的服務(wù),在本地打下了良好的口碑,在過(guò)去的10多年時(shí)間我們累計(jì)服務(wù)了上千家以及全國(guó)政企客戶,如加固等企業(yè)單位,完善的項(xiàng)目管理流程,嚴(yán)格把控項(xiàng)目進(jìn)度與質(zhì)量監(jiān)控加上過(guò)硬的技術(shù)實(shí)力獲得客戶的一致夸獎(jiǎng)。
[root@svr1 ~]# useradd nagios
[root@svr1 ~]# tar -xzf nagios-plugins-1.4.15.tar.gz
[root@svr1 ~]# cd nagios-plugins-1.4.15
[root@svr1 nagios-plugins-1.4.15]# ./configure
[root@svr1 nagios-plugins-1.4.15]# make && make install
[root@svr1 ~]# tar -xzf nrpe-2.12.tar.gz
[root@svr1 ~]# cd nrpe-2.12
[root@svr1 nrpe-2.12]# ./configure
*** Configuration summary for nrpe 2.12 03-10-2008 ***:
General Options:
-------------------------
NRPE port: 5666
NRPE user: nagios
NRPE group: nagios
Nagios user: nagios
Nagios group: nagios
[root@svr1 nrpe-2.12]# make all && make install-plugin
cd ./src/ && make install-plugin
make[1]: Entering directory `/root/nrpe-2.12/src'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/libexec
/usr/bin/install -c -m 775 -o nagios -g nagios check_nrpe /usr/local/nagios/libexec
make[1]: Leaving directory `/root/nrpe-2.12/src'
[root@svr1 nrpe-2.12]# make install-daemon
cd ./src/ && make install-daemon
make[1]: Entering directory `/root/nrpe-2.12/src'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 775 -o nagios -g nagios nrpe /usr/local/nagios/bin
make[1]: Leaving directory `/root/nrpe-2.12/src'
[root@svr1 nrpe-2.12]# make install-daemon-config
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/etc
/usr/bin/install -c -m 644 -o nagios -g nagios sample-config/nrpe.cfg /usr/local/nagios/etc
[root@svr1 nrpe-2.12]# make install-xinetd
/usr/bin/install -c -m 644 sample-config/nrpe.xinetd /etc/xinetd.d/nrpe
[root@svr1 nrpe-2.12]# vim /etc/xinetd.d/nrpe
# default: on
# description: NRPE (Nagios Remote Plugin Executor)
service nrpe
{
flags = REUSE
socket_type = stream
port = 5666
wait = no
user = nagios
group = nagios
server = /usr/local/nagios/bin/nrpe
server_args = -c /usr/local/nagios/etc/nrpe.cfg --inetd
log_on_failure += USERID
disable = no
only_from = 10.1.1.40
}
[root@svr1 nrpe-2.12]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
[root@svr1 nrpe-2.12]# chkconfig --list | grep nrpe
nrpe: on
[root@svr1 nrpe-2.12]# netstat -tnlp | grep nrpe
tcp 0 0 0.0.0.0:5666 0.0.0.0:* LISTEN 25360/nrpe
[root@svr1 nrpe-2.12]# vim /usr/local/nagios/etc/nrpe.cfg
修一行:
allowed_hosts=127.0.0.1,10.1.1.40
本機(jī)測(cè)試!
[root@svr1 nrpe-2.12]# /usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
[root@svr1 nrpe-2.12]# /usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
OK - load average: 0.00, 0.00, 0.00|load1=0.000;15.000;30.000;0; load5=0.000;10.000;25.000;0;
load15=0.000;5.000;20.000;0;
備注:有時(shí)候在客戶端本機(jī)上測(cè)試時(shí),發(fā)現(xiàn)會(huì)報(bào)錯(cuò)。CHECK_NRPE: Error - Could not complete SSL handshake.
這個(gè)時(shí)候,注意下xinetd.d/nrpe 以及nrpe.conf 里關(guān)于allowed相關(guān)的選項(xiàng),另外就是防火墻。
使用xinetd后發(fā)現(xiàn)重啟xinetd并不能重啟nrpe,只有將其 T掉然后再開。
從遠(yuǎn)程主機(jī)上測(cè)試下:
[root@svr4 ~]# /usr/local/nagios/libexec/check_nrpe -H 10.1.1.10 -c check_total_procs
PROCS CRITICAL: 249 processes
當(dāng)前名稱:安裝nrpe客戶端
轉(zhuǎn)載來(lái)源:http://jinyejixie.com/article20/psijjo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供、外貿(mào)網(wǎng)站建設(shè)、動(dòng)態(tài)網(wǎng)站、網(wǎng)站營(yíng)銷、建站公司、定制開發(fā)
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)