cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Log Processing Rule - classic

JhonU
Contributor

Hello everyone, I'm new to using pattern language. I'm coming to the community because I'm having trouble getting the fields and values ​​from a json format that comes from log ingestion. The Json format is the following. I've managed to get the value up to this point, but I can't extract the information. I'm interested in getting the "accountNumber" and "transferType" fields. Maybe you can help me with your experience in this.

  "valor": "Sending. data: {\"ordererDetails\":{\"accountInfo\":\"YES\",\"customerInfo\":{\"firstName\":\"FISRT\"}},\"beneficiaryDetails\":{\"accountInfo\":{\"accountNumber\":\"111111\",\"accountType\":\"AAA\"},\"customerInfo\":{\"firstName\":\"FABS FABS\",}},\"transferDetails\":{\"transferType\":\"CASH_NOW\",\"amount\":10}}. trackingId: 111"

 

5 REPLIES 5

Hi Jhon,

I think this could work:

PARSE(content,"JSON:parsedJson")| FIELDS_ADD(accountNumber: parsedJson["accountNumber"],transferType:parsedJson["transferType"])
| FIELDS_REMOVE(parsedJson)

Test the rule before enabling the rule.

Here you have examples.

Hope it helps.

Regards,

Elena.

 

thanks so much

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Hello @erh_inetum 

I require your help in interpreting an error code for parsing/presentation as a table field.

2024-12-10 09:44:45.255 ERROR [users,CIBW,9f812ead596fb3f1fb1c3c10e0ffafb5,8a17037d4d18df4a,CIBW12100943945135fe9f48ab6b346d56b,http-nio-8080-exec-6] com.abcdefg.ib.commons.advice.ErrorAdvice.handleIntegrationException:92 | Boom! Code: E000000, Message:E000000,

Regards,

Babar

Hi Babar,

Sorry but I don't understand exactly what you need to.
Do you need to capture what goes behind ERROR and Code?

Could you explain a bit more what you need, please?
Thanks in advance.

Elena.

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Hello @erh_inetum 

I aim to extract solely the Code: E000000 from the error logs and present it in a tabular format within the logs.

Babar_Qayyum_0-1733890857324.png

Regards,

Babar

Featured Posts