1
有助於編寫腳本。下面是日誌格式。 我想編寫一個在LIVE日誌中搜索關鍵詞的腳本。假設有些人已經停止服務器,它會顯示關機或force_shutdown ,它也顯示在日誌「服務器關機已由$ user發起」。使用shell腳本和發送郵件進行日誌監控
<Apr 19, 2017 1:11:00 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to STARTING>
<Apr 19, 2017 1:11:06 PM EDT> <Notice> <Log Management> <BEA-170027> <The Server has established connection with the Domain level Diagnostic Service successfully.>
<Apr 19, 2017 1:11:06 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to shutdown>
<Apr 19, 2017 1:11:06 PM EDT> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to force_shutdown>
<Jan 9, 2008 6:50:30 PM EST> <Notice> <WebLogicServer> <BEA-000388> <JVM
called WLS shutdown hook. The server will force shutdown now>
<Jan 9, 2008 6:50:30 PM EST> <Alert> <WebLogicServer> <BEA-000396> <Server shutdown has been requested by <WLS Kernel>>
<Jan 9, 2008 6:50:30 PM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
希望到grep與準確的時間戳所有的信息服務器IP和服務器主機,當它是攤牌,並通過用戶。而將郵件發送到該用戶的所有細節,以用戶。 請幫我