I was working with Logstash to structure the following types of logs:
2023-09-05 11:53:25 (152.32.73.6)-Logistics Request Approved: {"id":7355,"lr_number":"LR-M006108","lr_type":"2","lr_type_list":"1","lr_type_others":null,"lr_username":"XXXXX","expected_date":"2023-08-31","company":"XXXX","branch":null,"contact_person":"XXXXX \/ XXXXX","contact_number":"XXXXX","delivery_address":"XXXXXXX","city_id":"4689","email_address":"XXXXXX","po_number":null,"jira_ticket":null,"delivery_ticket":"1","delivery_instruction":null,"my_contact":"00000000000000000000","payment_method":"4","coll_contact_person":null,"coll_contact_number":null,"coll_department":"COLLECTIONS DEPARTMENT","is_external":"1","lr_current":"FFV","lr_status":"For Validation","dr_number":"230472, 230473,230474, 230475","si_number":null,"delivery_method":null,"delivery_reference":null,"delivery_driver":null,"created_at":"2023-08-30T06:12:32.000000Z","updated_at":"2023-09-05T03:53:25.000000Z","lr_userdept":"XXXXXXX","or_number":null,"location_id":1,"assignment_id":2,"am_assigned":"XXXXX","is_plant":"1","date_created":"2023-08-30 14:12:17","is_invoice":"2"}
and I wanted to extract the following data out of it
TIMESTAMP
ID
LR_NUMBER
LR_TYPE
LR_TYPE_LIST
LR_TYPE_OTHERS
LR_USERNAME
EXPECTED_DATE
COMPANY
BRANCH
CONTACT_PERSON
CONTACT_NUMBER
DELIVERY_ADDRESS
CITY_ID
EMAIL_ADDRESS
PO_NUMBER
JIRA_TICKET
DELIVERY_TICKET
DELIVERY_INSTRUCTION
MY_CONTACT
PAYMENT_METHOD
COLL_CONTACT_PERSON
COLL_OONTACT_NUMBER
COLL_DEPARTMENT
IS_EXTERNAL
LR_CURRENT
LR_STATUS
DR_NUMBER
LOCATION_ID
ASSIGNMENT_ID
IS_PLANT
DATE_CREATED
IS_INVOICE
However, I'm not able to figure out an appropriate filter for such a large log event. I've gone through Logstash grok documentation as well, but still couldn't extract the required fields.
Please suggest an approach to this and how to directly filter the following fields without creating extra fields like time and date.
Your help is appreciated!
Thank you.