今天檢查系統(tǒng)日志發(fā)現(xiàn)有,日志中都是以下格式的日志:
專注于為中小企業(yè)提供網(wǎng)站設(shè)計(jì)制作、成都網(wǎng)站制作服務(wù),電腦端+手機(jī)端+微信端的三站合一,更高效的管理,為中小企業(yè)增城免費(fèi)做網(wǎng)站提供優(yōu)質(zhì)的服務(wù)。我們立足成都,凝聚了一批互聯(lián)網(wǎng)行業(yè)人才,有力地推動(dòng)了超過(guò)千家企業(yè)的穩(wěn)健成長(zhǎng),幫助中小企業(yè)通過(guò)網(wǎng)站建設(shè)實(shí)現(xiàn)規(guī)模擴(kuò)充和轉(zhuǎn)變。Apr 22 09:26:26 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=14006 duration=0(sec)
Apr 22 09:26:27 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=14316 duration=1(sec)
Apr 22 09:26:27 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=14323 duration=1(sec)
Apr 22 09:26:27 jsmapp4 xinetd[3158]: START: nrpe pid=15937 from=::ffff:192.168.1.60
Apr 22 09:26:27 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=15937 duration=0(sec)
Apr 22 09:27:19 jsmapp4 pptp[27991]: anon log[logecho:pptp_ctrl.c:677]: Echo Reply received.
Apr 22 09:27:26 jsmapp4 xinetd[3158]: START: nrpe pid=7318 from=::ffff:192.168.1.60
Apr 22 09:27:26 jsmapp4 xinetd[3158]: START: nrpe pid=7327 from=::ffff:192.168.1.60
Apr 22 09:27:26 jsmapp4 xinetd[3158]: START: nrpe pid=7332 from=::ffff:192.168.1.60
Apr 22 09:27:26 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=7318 duration=0(sec)
Apr 22 09:27:26 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=7327 duration=0(sec)
Apr 22 09:27:26 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=7332 duration=0(sec)
Apr 22 09:27:26 jsmapp4 xinetd[3158]: START: nrpe pid=7652 from=::ffff:192.168.1.60
Apr 22 09:27:26 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=7652 duration=0(sec)
Apr 22 09:27:27 jsmapp4 xinetd[3158]: START: nrpe pid=8952 from=::ffff:192.168.1.60
Apr 22 09:27:27 jsmapp4 xinetd[3158]: EXIT: nrpe status=0 pid=8952 duration=0(sec)
通過(guò)分析以上日志發(fā)現(xiàn):
xinetd是新一代的網(wǎng)絡(luò)守護(hù)進(jìn)程服務(wù)程序,又叫超級(jí)Internet服務(wù)器,常用來(lái)管理多種輕量級(jí)Internet服務(wù)。
這個(gè)進(jìn)程來(lái)自于192.168.1.60這個(gè)ip,明顯是內(nèi)網(wǎng)ip,以前沒(méi)有發(fā)現(xiàn)這個(gè)問(wèn)題,奇怪。
去60這臺(tái)服務(wù)器查看發(fā)現(xiàn),有nagios警告的日志:
Apr 22 09:50:02 jsmbak1 nagios: Warning: The check of host 'jsmapp1' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the host...
Apr 22 09:50:24 jsmbak1 nagios: Warning: The check of service 'check_mem' on host 'jsmapp4' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Apr 22 09:51:02 jsmbak1 nagios: Warning: The check of service 'Current Load' on host 'Nagios-Server' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Apr 22 09:51:02 jsmbak1 nagios: Warning: The check of service 'SSH' on host 'Nagios-Server' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Apr 22 09:51:02 jsmbak1 nagios: Warning: The check of service 'Total Processes' on host 'Nagios-Server' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Apr 22 09:51:02 jsmbak1 nagios: Warning: The check of service 'HTTP' on host 'jsmapp2' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Apr 22 09:51:02 jsmbak1 nagios: Warning: The check of service 'HTTP' on host 'jsmapp3' looks like it was orphaned (results never came back). I'm scheduling an immediate check of the service...
Apr 22 09:51:46 jsmbak1 xinetd[16796]: START: nrpe pid=17625 from=::ffff:127.0.0.1
Apr 22 09:51:46 jsmbak1 xinetd[16796]: EXIT: nrpe status=0 pid=17625 duration=0(sec)
Apr 22 09:52:50 jsmbak1 xinetd[16796]: START: nrpe pid=17890 from=::ffff:127.0.0.1
Apr 22 09:52:50 jsmbak1 xinetd[16796]: EXIT: nrpe status=0 pid=17890 duration=0(sec)
Nagios是一款開(kāi)源的免費(fèi)網(wǎng)絡(luò)監(jiān)視工具,能有效監(jiān)控Windows、Linux和Unix的主機(jī)狀態(tài)、交換機(jī)、路由器等網(wǎng)絡(luò)設(shè)置,打印機(jī)等。
Nagios 可以監(jiān)控的功能有:
1、監(jiān)控網(wǎng)絡(luò)服務(wù)(SMTP、POP3、HTTP、NNTP、PING等);
2、監(jiān)控主機(jī)資源(處理器負(fù)荷、磁盤利用率等);
3、簡(jiǎn)單地插件設(shè)計(jì)使得用戶可以方便地?cái)U(kuò)展自己服務(wù)的檢測(cè)方法;
4、并行服務(wù)檢查機(jī)制;
5、具備定義網(wǎng)絡(luò)分層結(jié)構(gòu)的能力,用"parent"主機(jī)定義來(lái)表達(dá)網(wǎng)絡(luò)主機(jī)間的關(guān)系,這種關(guān)系可被用來(lái)發(fā)現(xiàn)和明晰主機(jī)宕機(jī)或不可達(dá)狀態(tài);
6、當(dāng)服務(wù)或主機(jī)問(wèn)題產(chǎn)生與解決時(shí)將告警發(fā)送給聯(lián)系人(通過(guò)EMail、短信、用戶定義方式);
7、具備定義事件句柄功能,它可以在主機(jī)或服務(wù)的事件發(fā)生時(shí)獲取更多問(wèn)題定位;
8、自動(dòng)的日志回滾;
9、可以支持并實(shí)現(xiàn)對(duì)主機(jī)的冗余監(jiān)控;
10、可選的WEB界面用于查看當(dāng)前的網(wǎng)絡(luò)狀態(tài)、通知和故障歷史、日志文件等;
查看nagios進(jìn)程發(fā)現(xiàn),有多個(gè)進(jìn)程
[root@jsmbak1 ~]# ps -ef|grep "bin/nagios"
root 4913 4095 0 11:12 pts/2 00:00:00 grep bin/nagios
nagios 5146 1 0 Feb18 ? 01:12:40 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 5286 1 0 Feb19 ? 01:15:13 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 9767 1 0 Feb18 ? 01:13:52 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
使用[nagios@jsmbak1 ~]$ killall nagios,殺掉所有nagios,然后重啟
/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
如果想停止nrpe服務(wù)在xinetd下的日志輸出
修改配置文件,禁用成功狀態(tài)下的日志
[root@jsmapp3 tomcat]# vi /etc/xinetd.conf
# Define general logging characteristics.
log_type = SYSLOG daemon info
log_on_failure = HOST
# log_on_success = PID HOST DURATION EXIT
重新服務(wù)xinetd后再次查看日志,不再出現(xiàn)nrpe相關(guān)日志
[root@jsmapp3 tomcat]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。
本文題目:Centos日志處理-創(chuàng)新互聯(lián)
鏈接分享:http://jinyejixie.com/article0/dipioo.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供域名注冊(cè)、網(wǎng)站設(shè)計(jì)、響應(yīng)式網(wǎng)站、軟件開(kāi)發(fā)、企業(yè)建站、移動(dòng)網(wǎng)站建設(shè)
聲明:本網(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)
猜你還喜歡下面的內(nèi)容