Centos日志處理

今天檢查系統(tǒng)日志發(fā)現(xiàn)有,日志中都是以下格式的日志:

公司主營業(yè)務(wù):網(wǎng)站建設(shè)、成都網(wǎng)站建設(shè)、移動(dòng)網(wǎng)站開發(fā)等業(yè)務(wù)。幫助企業(yè)客戶真正實(shí)現(xiàn)互聯(lián)網(wǎng)宣傳,提高企業(yè)的競(jìng)爭能力。創(chuàng)新互聯(lián)建站是一支青春激揚(yáng)、勤奮敬業(yè)、活力青春激揚(yáng)、勤奮敬業(yè)、活力澎湃、和諧高效的團(tuán)隊(duì)。公司秉承以“開放、自由、嚴(yán)謹(jǐn)、自律”為核心的企業(yè)文化,感謝他們對(duì)我們的高要求,感謝他們從不同領(lǐng)域給我們帶來的挑戰(zhàn),讓我們激情的團(tuán)隊(duì)有機(jī)會(huì)用頭腦與智慧不斷的給客戶帶來驚喜。創(chuàng)新互聯(lián)建站推出宣恩免費(fèi)做網(wǎng)站回饋大家。

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)

 

通過分析以上日志發(fā)現(xiàn):

xinetd是新一代的網(wǎng)絡(luò)守護(hù)進(jìn)程服務(wù)程序,又叫超級(jí)Internet服務(wù)器,常用來管理多種輕量級(jí)Internet服務(wù)。

這個(gè)進(jìn)程來自于192.168.1.60這個(gè)ip,明顯是內(nèi)網(wǎng)ip,以前沒有發(fā)現(xiàn)這個(gè)問題,奇怪。

去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是一款開源的免費(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、簡單地插件設(shè)計(jì)使得用戶可以方便地?cái)U(kuò)展自己服務(wù)的檢測(cè)方法;

4、并行服務(wù)檢查機(jī)制;

5、具備定義網(wǎng)絡(luò)分層結(jié)構(gòu)的能力,用"parent"主機(jī)定義來表達(dá)網(wǎng)絡(luò)主機(jī)間的關(guān)系,這種關(guān)系可被用來發(fā)現(xiàn)和明晰主機(jī)宕機(jī)或不可達(dá)狀態(tài);

6、當(dāng)服務(wù)或主機(jī)問題產(chǎn)生與解決時(shí)將告警發(fā)送給聯(lián)系人(通過EMail、短信、用戶定義方式);

7、具備定義事件句柄功能,它可以在主機(jī)或服務(wù)的事件發(fā)生時(shí)獲取更多問題定位;

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ǎng)站名稱:Centos日志處理
當(dāng)前路徑:http://muchs.cn/article30/ijogpo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供建站公司、網(wǎng)站導(dǎo)航、全網(wǎng)營銷推廣、網(wǎng)站設(shè)計(jì)公司網(wǎng)站改版、域名注冊(cè)

廣告

聲明:本網(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í)需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)