Hello,
This is how the data looks like after logstash execution:
{"systemId":"MIS_FULL","packagePartDatas":[{"packageId":"1700","fileId":"F74F869EFFEF7FBDE053020011AC63DD","serviceRequestId":"ADFDF0645EDB486496E41B520DCF4482","size":126624,"lastPart":true,"partCounter":1}],"packageId":"1700","platform":"P36","package_id":"1700","@timestamp":"2023-03-21T02:53:31.845Z","connectXmlFileId":"","errorData":{"errorCode":"BATCH_FRAMEWORK_1041","errorMessage":"The input parameter \"nodeClassName\" must not be null.","stackTrace":"[xyz.connect.integration.jobs.inform.service.klkl.transform(klkl.java:106), xyz.connect.integration.jobs.inform.service.connectNow.doProcess(connectNow.java:47), xyz.connect.integration.jobs.inform.processor.yesstarted.process(yesstarted.java:54), xyz.connect.integration.jobs.inform.processor.yesstarted.process(yesstarted.java:1), sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344), org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198), org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163), org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137), org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124), org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186), org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215), com.sun.proxy.$Proxy161.process(Unknown Source), org.springframework.batch.core.step.item.SimpleChunkProcessor.doProcess(SimpleChunkProcessor.java:134), org.springframework.batch.core.step.item.SimpleChunkProcessor.transform(SimpleChunkProcessor.java:319), org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:210), org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:77), org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407), org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331), org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140), org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273), org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82), org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375), org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215), org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145), org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258), org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208), org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:152), org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68), org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68), org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169), org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144), org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:137), org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320), org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:149), org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50), org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140), xyz.connect.integration.batch.framework.AbstractConnectIntegrationBatchJobRunner.launchJob(AbstractConnectIntegrationBatchJobRunner.java:219), xyz.connect.integration.jobs.inform.informJobApplication.main(informJobApplication.java:47)]"},"type":"mis-package-details","packageStateHistories":[{"status":"READY_FOR_PROCESSING","errorData":null,"lastModificationDate":1679291172626,"creationDate":1679291172626},{"status":"MERGED","errorData":null,"lastModificationDate":1679293118971,"creationDate":1679293118971},{"status":"ERROR","errorData":{"errorCode":"BATCH_FRAMEWORK_1041","errorMessage":"The input parameter \"nodeClassName\" must not be null.","stackTrace":"[xyz.connect.integration.jobs.inform.service.klkl.transform(klkl.java:106), xyz.connect.integration.jobs.inform.service.connectNow.doProcess(connectNow.java:47), xyz.connect.integration.jobs.inform.processor.yesstarted.process(yesstarted.java:54), xyz.connect.integration.jobs.inform.processor.yesstarted.process(yesstarted.java:1), sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344), org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198), org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163), org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:137), org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124), org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186), org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215), com.sun.proxy.$Proxy161.process(Unknown Source), org.springframework.batch.core.step.item.SimpleChunkProcessor.doProcess(SimpleChunkProcessor.java:134), org.springframework.batch.core.step.item.SimpleChunkProcessor.transform(SimpleChunkProcessor.java:319), org.springframework.batch.core.step.item.SimpleChunkProcessor.process(SimpleChunkProcessor.java:210), org.springframework.batch.core.step.item.ChunkOrientedTasklet.execute(ChunkOrientedTasklet.java:77), org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:407), org.springframework.batch.core.step.tasklet.TaskletStep$ChunkTransactionCallback.doInTransaction(TaskletStep.java:331), org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140), org.springframework.batch.core.step.tasklet.TaskletStep$2.doInChunkContext(TaskletStep.java:273), org.springframework.batch.core.scope.context.StepContextRepeatCallback.doInIteration(StepContextRepeatCallback.java:82), org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375), org.springframework.batch.repeat.support.RepeatTemplate.executeInternal(RepeatTemplate.java:215), org.springframework.batch.repeat.support.RepeatTemplate.iterate(RepeatTemplate.java:145), org.springframework.batch.core.step.tasklet.TaskletStep.doExecute(TaskletStep.java:258), org.springframework.batch.core.step.AbstractStep.execute(AbstractStep.java:208), org.springframework.batch.core.job.SimpleStepHandler.handleStep(SimpleStepHandler.java:152), org.springframework.batch.core.job.flow.JobFlowExecutor.executeStep(JobFlowExecutor.java:68), org.springframework.batch.core.job.flow.support.state.StepState.handle(StepState.java:68), org.springframework.batch.core.job.flow.support.SimpleFlow.resume(SimpleFlow.java:169), org.springframework.batch.core.job.flow.support.SimpleFlow.start(SimpleFlow.java:144), org.springframework.batch.core.job.flow.FlowJob.doExecute(FlowJob.java:137), org.springframework.batch.core.job.AbstractJob.execute(AbstractJob.java:320), org.springframework.batch.core.launch.support.SimpleJobLauncher$1.run(SimpleJobLauncher.java:149), org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50), org.springframework.batch.core.launch.support.SimpleJobLauncher.run(SimpleJobLauncher.java:140), xyz.connect.integration.batch.framework.AbstractConnectIntegrationBatchJobRunner.launchJob(AbstractConnectIntegrationBatchJobRunner.java:219), xyz.connect.integration.jobs.inform.informJobApplication.main(informJobApplication.java:47)]"},"lastModificationDate":1679293124721,"creationDate":1679293124721}],"creationDate":1679291172616,"userId":"?","creation_date":"2023-03-20T05:46:12.621Z","last_mod_date":"2023-03-20T06:18:44.721Z","@version":"1","status":"ERROR","lastModificationDate":1679293124721,"size":0,"packageKind":"FULL"}
output {
file {
path => "/l/new/mis/logstash/logstash-7.9.1/logs/myfile"
codec => json_lines
}
}
I'm still unsure how can I get data like below:
packagePartDatas.serviceRequestId
packagePartDatas.partCounter
packagePartDatas.size
packagePartDatas.fileid
packageStateHistories.status:
packageStateHistories.errorData
packageStateHistories.creationDate
packageStateHistories.lastModDate