AIOps|揭秘海量日志異常檢測
AIOps(Artificial Intelligence for IT Operations)即智能運維,將AI應用于運維領域,基于已有的運維數據(日志、監控信息、應用信息等),通過機器學習的方式來進一步解決自動化運維沒辦法解決的問題。華為AIOps使能服務沉淀了10+開箱即用的智能APP,覆蓋網絡維護、網絡體驗、網絡規劃、設備故障預測等應用領域,包含KPI異常檢測、硬盤異常檢測、故障識別及根因定位、日志異常檢測等。其中日志異常檢測(Log Anomaly Detection,LAD)實時監控日志,識別并推薦根因異常,輔助運維人員定位故障根因,提升運維效率。
"
一、為什么需要日志異常檢測?
圖2?四種不同規范的日志樣例數據[1]
二、日志異常檢測是如何實現的?
2.1日志解析
2.2異常檢測
DeepLog模型
Step1:?取待檢測的推理日志,通過日志解析得到模板序列;
Step2:?按task_id(或線程號、任務號)提取模板序列;
Step3:?加載訓練后的模型,對各個task_id對應的序列滑動窗口依次檢測;
Step4:?對每一個檢測樣本計算出概率最大topN模板集合,若則正常,否則為異常;
模板ID
模板內容
One-hot編碼
1
Interface * changed state to down
[1, 0, 0]
2
Vlan-Interface * changed state to up
[0, 1, 0]
3
Vlan-Interface * changed state to down
[0, 0, 1]
Template2Vec模型
Step 1 :?在WordNet[8]中對模板內容中的自然語言單詞進行同義詞和反義詞搜索(如圖7中的down和up),之后,運維人員再對具有業務知識的詞匯識別同義詞和反義詞(如圖中的Interface和Vlan-Interface),并將其轉化為正常的自然語言詞匯。
Step 2:?應用dLCE?[9]生成模板中單詞的詞向量,如圖7中的Word vectors。
Step 3:?模板向量是模板中單詞的詞向量的加權平均值。如圖中的Templates vectors
Log2Vec模型
AIOps中的日子異常檢測模型服務,能夠實時監控日志,識別并推薦根因異常。內置多種類型算法,無需定制即可支持不同網元日志的異常檢測;具備在線學習能力,持續提升檢測精度,輔助運維人員定位故障根因,提升運維效率。
例如,對某個網元的某個計算節點的日志監控過程中,如圖10所示,實時統計出現的異常量,給出各個異常對應的關鍵日志。若算法報出的結果存在誤報,如圖11所示,用戶可以加入業務反饋,反饋的誤報異常點將會被在以后的檢測中被過濾掉。由于日志包含了豐富的領域業務知識,如圖12所示,每條關鍵日志都會給出上下文,輔助運維人員定位具體的異常內容。
圖10異常檢測與關鍵日志推薦
圖11可以加入用戶反饋
圖12 異常日志上下文
參考文獻
[1] https://github.com/logpai/loghub
[2] Shilin He, Jieming Zhu, Pinjia He, Michael R. Lyu. Experience Report: System Log Analysis for Anomaly Detection, IEEE International Symposium on Software Reliability Engineering (ISSRE), 2016. (ISSRE Most Influential Paper).
[3] Min Du, Feifei Li, Guineng Zheng, Vivek Srikumar. DeepLog: Anomaly Detection and Diagnosis from System Logs through Deep Learning. CCS-2017
[4] Meng W, Liu Y, Zhu Y, et al. LogAnomaly: Unsupervised Detection?of Sequential and Quantitative Anomalies in Unstructured Logs[C]//IJCAI. 2019: 4739-4745.
[5] Meng W, Liu Y, Huang Y, et al. A semantic-aware representation framework for online log analysis[C]//2020 29th International Conference on Computer Communications and Networks (ICCCN). IEEE, 2020: 1-7.
[6] Pinjia He, Jieming Zhu, Zibin Zheng, and Michael R. Lyu. Drain: An Online Log Parsing Approach with Fixed Depth Tree. ICWS'2017
[7] Tomas Mikolov, Kai Chen, Greg Corrado, and Jeffrey Dean. Efficient estimation of word representations in vector space. arXiv preprint arXiv:1301.3781, 2013.
[8] George A Miller. Wordnet: a lexical database for english. Communications of the ACM, 38(11):39–41, 1995.
[9] Kim Anh Nguyen, Sabine Schulte im Walde, and Ngoc Thang Vu. Integrating distributional lexical contrast into word embeddings for antonym-synonym distinction. arXiv preprint arXiv:1605.07766, 2016.
[10] Katrin Fundel, Robert K¨uffner, and Ralf Zimmer. Relex—relation extraction using dependency parse trees. Bioinformatics, 23(3):365–371, 2007.
[11] Yuval Pinter, Robert Guthrie, and Jacob Eisenstein. Mimicking word embeddings using subword rnns. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 102–112, 2017.
AI 機器學習
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。
版權聲明:本文內容由網絡用戶投稿,版權歸原作者所有,本站不擁有其著作權,亦不承擔相應法律責任。如果您發現本站中有涉嫌抄襲或描述失實的內容,請聯系我們jiasou666@gmail.com 處理,核實后本網站將在24小時內刪除侵權內容。