您好,登錄后才能下訂單哦!
今天檢查系統日志發現有,日志中都是以下格式的日志:
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)
通過分析以上日志發現:
xinetd是新一代的網絡守護進程服務程序,又叫超級Internet服務器,常用來管理多種輕量級Internet服務。
這個進程來自于192.168.1.60這個ip,明顯是內網ip,以前沒有發現這個問題,奇怪。
去60這臺服務器查看發現,有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是一款開源的免費網絡監視工具,能有效監控Windows、Linux和Unix的主機狀態、交換機、路由器等網絡設置,打印機等。
Nagios 可以監控的功能有:
1、監控網絡服務(SMTP、POP3、HTTP、NNTP、PING等);
2、監控主機資源(處理器負荷、磁盤利用率等);
3、簡單地插件設計使得用戶可以方便地擴展自己服務的檢測方法;
4、并行服務檢查機制;
5、具備定義網絡分層結構的能力,用"parent"主機定義來表達網絡主機間的關系,這種關系可被用來發現和明晰主機宕機或不可達狀態;
6、當服務或主機問題產生與解決時將告警發送給聯系人(通過EMail、短信、用戶定義方式);
7、具備定義事件句柄功能,它可以在主機或服務的事件發生時獲取更多問題定位;
8、自動的日志回滾;
9、可以支持并實現對主機的冗余監控;
10、可選的WEB界面用于查看當前的網絡狀態、通知和故障歷史、日志文件等;
查看nagios進程發現,有多個進程
[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下的日志輸出
修改配置文件,禁用成功狀態下的日志
[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 ]
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。