elasticsearch - 解析 log4net 日志并转发到 Logstash
问题描述
2018-05-07 11:38:56,748 [15] 错误 Library.Logger.Log4NetLogger [(null)] - {"Component":"Service","Message":"Exception in Authorization.Exception:No Roles were found for登录 ID: Domain\user0 ","Exception":{"ClassName":"System.Exception","Message":"没有找到登录 ID: Domain\User0","Data":{} 的角色, "InnerException":null,"HelpURL":null,"StackTraceString":" 在 AuthorizationBll.cs 中的 Authorization.GetRoles(String loginId):line 146\r\n 在 AuthorizationBll.CheckAuthorization(String loginId, String operationName) 在 \Services \AuthorizationBll.cs:第 61 行","RemoteStackTraceString":null,"RemoteStackIndex":0,"ExceptionMethod":"8\nGetRoles\nServices。BusinessLogic,版本=1.0.0.0,文化=中性,PublicKeyToken=null\nAuthorizationBll\nSystem.Collections.Generic.List`1[System.String] GetRoles(System.String)","HResult":-2146233088,"Source" :"Services.BusinessLogic","WatsonBuckets":null},"ErrorLevel":1,"ErrorLevelType":"Error","CurrentDateTime":"2018-05-07T11:38:56.6918708+05:30","ManagedThreadId ":15,"AdditonalData":null,"Context":null}ErrorLevelType":"Error","CurrentDateTime":"2018-05-07T11:38:56.6918708+05:30","ManagedThreadId":15,"AdditonalData":null,"Context":null}ErrorLevelType":"Error","CurrentDateTime":"2018-05-07T11:38:56.6918708+05:30","ManagedThreadId":15,"AdditonalData":null,"Context":null}
我有这个日志,我想从文本中提取 4 件事并放入弹性搜索。我正在使用以下 grok
%{GREEDYDATA:消息}
- 组件名称 2。消息 3:异常 4:堆栈跟踪。
如何才能做到这一点 ?
解决方案
推荐阅读
- algorithm - 曼德布罗集边界的保守渲染
- google-cloud-firestore - 如何触发 onwrite 将数据复制到不同 Firestore 中的集合
- c# - 在时区获取当前时间没有考虑夏令时(我认为)
- actionscript-3 - FlashDevelop 将整个类路径放在新实例声明中
- c++ - How do I keep a running total of an input variable inside of a switch?
- shell - How do I get grep working in a function while assigned to a new variable?
- git - I Can not merge my work into develop branch using SourceTree?
- npm - 是否安装 NPM
还运行该 pkg 的 npm start 吗? - ruby-on-rails - Create index with new searchkick options in rails console
- split - How to download "Split" CSV files from H2O DAI?