아래 로그 파일의 grok 패턴을 파악하려고합니다. 성공 로그 1 행과 경고 로그 1 항목이 들어 있습니다.이 로그 파일에 grok 작성하는 방법
2016-09-03T12:53:31-04:00 DEV SampleFileService INFO 512132:414618:SampleFileService-2-FTS EXECUTING: Error Handling Client Request started
2016-09-03T12:53:31-04:00 DEV SampleFileService WARNING 512133:414618:SampleFileService-2-FTS ERROR: Error while sending ErrorHandler request to IEHS Queue: test.queue.publish
Retry count 1 of 3,
Error:
<ns0:ErrorReport xmlns:ns0="http://www.tibco.com/pe/EngineTypes">
<StackTrace>Job-414618 Error in [Process-Path!!]
There was an unexpected error while sending a message.
at com.tibco.plugin.share.jms.impl.JMSSender.send(Unknown Source)
at com.tibco.plugin.share.jms.impl.JMSSender.send(Unknown Source)
at com.tibco.plugin.jms.JMSAbstractTransmitActivity.eval(Unknown Source)
at com.tibco.pe.plugin.Activity.eval(Unknown Source)
at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
at com.tibco.pe.core.Job.a(Unknown Source)
at com.tibco.pe.core.Job.k(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
caused by: com.tibco.plugin.share.jms.impl.JMSExceptionWrapper: javax.jms.JMSException: Failure storing message
at com.tibco.plugin.share.jms.impl.JMSPluginException.<init>(Unknown Source)
at com.tibco.plugin.share.jms.impl.JMSSender.send(Unknown Source)
at com.tibco.plugin.share.jms.impl.JMSSender.send(Unknown Source)
at com.tibco.plugin.jms.JMSAbstractTransmitActivity.eval(Unknown Source)
at com.tibco.pe.plugin.Activity.eval(Unknown Source)
at com.tibco.pe.core.TaskImpl.eval(Unknown Source)
at com.tibco.pe.core.Job.a(Unknown Source)
at com.tibco.pe.core.Job.k(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.a(Unknown Source)
at com.tibco.pe.core.JobDispatcher$JobCourier.run(Unknown Source)
Caused by: javax.jms.JMSException: Failure storing message
at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:612)
at com.tibco.tibjms.TibjmsxSessionImp._publish(TibjmsxSessionImp.java:1544)
at com.tibco.tibjms.TibjmsMessageProducer._publish(TibjmsMessageProducer.java:246)
at com.tibco.tibjms.TibjmsQueueSender.send(TibjmsQueueSender.java:74)
... 9 more
</StackTrace>
<Msg>There was an unexpected error while sending a message.</Msg>
<FullClass>com.tibco.plugin.share.jms.impl.JMSPluginException</FullClass>
<Class>JMSPluginException</Class>
<ProcessStack>Stack-Path!!</ProcessStack>
<MsgCode>BW-JMS-100039</MsgCode>
</ns0:ErrorReport>
은 당신이 당신의 로그에서 추출 할 것을 나타낼 수 :
그런 다음 당신은 다음이 grok 수 패턴을 사용할 수 있습니까? 검색 할 정보가 없으면 Grok 필터가 쓸모가 없기 때문입니다. – baudsp
또한 도움을 요청하십시오 : [grok filter tester] (http://grokconstructor.appspot.com/do/match#result), [grok 필터 설명서] (https://www.elastic.co/guide/en/logstash /current/plugins-filters-grok.html) 및 [grok 패턴] (https://github.com/logstash-plugins/logstash-patterns-core/blob/master/patterns/grok-patterns)을 참조하십시오. – baudsp
첫 번째 줄을 고려하면 타임 스탬프 -> 2016-09-03T12 : 53 : 31-04 : 00, Env -> Dev, Application -> SampleFileService, 레벨 -> 정보, 스레드 -> 512132 :스레드를 고려해야합니다. 414618 : SampleFileService-2-FTS, 상태 -> 실행 중, 메시지 -> (메시지 미리 알림) 두 번째 줄에는 '메시지'필드에 대해 더 많은 정보가 기록됩니다 .. –