今天檢查系統日志發(fā)現有,日志中都是以下格式的日志:
專注于為中小企業(yè)提供網站設計制作、成都網站制作服務,電腦端+手機端+微信端的三站合一,更高效的管理,為中小企業(yè)增城免費做網站提供優(yōu)質的服務。我們立足成都,凝聚了一批互聯網行業(yè)人才,有力地推動了超過千家企業(yè)的穩(wěn)健成長,幫助中小企業(yè)通過網站建設實現規(guī)模擴充和轉變。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ā)現:
xinetd是新一代的網絡守護進程服務程序,又叫超級Internet服務器,常用來管理多種輕量級Internet服務。
這個進程來自于192.168.1.60這個ip,明顯是內網ip,以前沒有發(fā)現這個問題,奇怪。
去60這臺服務器查看發(fā)現,有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是一款開源的免費網絡監(jiān)視工具,能有效監(jiān)控Windows、Linux和Unix的主機狀態(tài)、交換機、路由器等網絡設置,打印機等。
Nagios 可以監(jiān)控的功能有:
1、監(jiān)控網絡服務(SMTP、POP3、HTTP、NNTP、PING等);
2、監(jiān)控主機資源(處理器負荷、磁盤利用率等);
3、簡單地插件設計使得用戶可以方便地擴展自己服務的檢測方法;
4、并行服務檢查機制;
5、具備定義網絡分層結構的能力,用"parent"主機定義來表達網絡主機間的關系,這種關系可被用來發(fā)現和明晰主機宕機或不可達狀態(tài);
6、當服務或主機問題產生與解決時將告警發(fā)送給聯系人(通過EMail、短信、用戶定義方式);
7、具備定義事件句柄功能,它可以在主機或服務的事件發(fā)生時獲取更多問題定位;
8、自動的日志回滾;
9、可以支持并實現對主機的冗余監(jiān)控;
10、可選的WEB界面用于查看當前的網絡狀態(tài)、通知和故障歷史、日志文件等;
查看nagios進程發(fā)現,有多個進程
[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服務在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
重新服務xinetd后再次查看日志,不再出現nrpe相關日志
[root@jsmapp3 tomcat]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
另外有需要云服務器可以了解下創(chuàng)新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡單易用、服務可用性高、性價比高”等特點與優(yōu)勢,專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。