Skip to main content
adem_netsys
Explorer III
June 22, 2025
Question

Json Log Parsing

  • June 22, 2025
  • 1 reply
  • 486 views

Hi all,

 

We convert a log I get with API to syslog with logstash and take it to SIEM. Log comes in json format. I need a parser for this. Has anyone written a parser for json before?

 

thanks in advance

    1 reply

    Rob_SIEM
    Staff
    Staff
    June 23, 2025

    Hi Adem, 

     

    Any custom logs we can build parsers for in FortiSIEM, you just need a distinct header format of the log to make it distinguishable from other logs. 

     

    If the data first hits logstash then you have full control to modify how the data appears. The easiest format would be: <timestamp> <hostname> vendor=MyVendor product=MyCustomAppABC json={ ... your json log body received from api .. }

     

    e.g. 2025-06-22T10:10:00Z mystash.example.com vendor=SomeVendor product=SomeVendorsApp json={...}

     

    Then we can easily build a parser to parse this data, and the <eventFormatRecognizer> of the parser can match on the vendor=xxx product=xxx keywords. 

     

    If you update logstash to output in that preferred format attach some sanitized log samples here. 

     

    Thanks,

    Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
    Fortinet Flag the Hack. Wednesday, August 26, 9:00 AM - 5:00 PM ET, COSM, Atlanta, GA.