Hi Vishnu,
Although you also created another thread for fortigate decoders here:
https://groups.google.com/d/msg/wazuh/J7K5csLn1mk/yvlTn8JQAgAJ and that thread was solved, I wanted to answer this one as well so that anyone that reads it can find the right answer.
I have verified that the decoder provided by my colleague Jonathan on the other thread is valid for the logs provided on the logs.docx file of this thread.
<decoder name="fortigate">
<prematch>\d+.\d+.\d+\d+ date=\.*time\.*devname=\.*devid=\.*logid=\.*type=\.*subtype=\.*</prematch>
<regex>(\d+.\d+.\d+.\d+) date=(\.*) time=(\.*) devname="(\.*)" devid="(\.*)" logid="(\.*)" type="(\.*)" subtype="(\.*)" level="(\.*)" vd="(\.*)" eventtime=(\.*) srcip=(\.*) srcintf=(\.*) srcintfrole="(\.*)" dstip=(\.*) dstintf=(\.*) dstintfrole="(\.*)" sessionid=(\.*) proto=(\.*) action="(\.*)" policyid=(\.*) service="(\.*)" dstcountry="(\.*)" srccountry="(\.*)" trandisp="(\.*)" app="(\.*)" duration=(\.*) sentbyte=(\.*) rcvdbyte=(\.*) sentpkt=(\.*) rcvdpkt=(\.*) appcat="(\.*)"</regex>
<order>ip,date,time,devname,devid,logid,type,subtype,level,vd,eventtime,srcip,srcintf,srcintfrole,dstip,dstintf,dstintfrole,sessionid,proto,action,policyid,service,dstcountry,srccountry,trandisp,app,duration,sentbyte,rcvdbyte,sentpkt,rcvdpkt,appcat</order>
</decoder>
I notice that the ossec-logtest output you provide is using a different input which includes trailing characters as Ranjith mentions, these characters should not be included when using ossec-logtest.
Finally, I wanted to let you know that rules and decoders specific to Fortigate v6 have been developed and are included in Wazuh 4.0 that will be released soon. You may see these decoders and rules in this pull request:
https://www.github.com/wazuh/wazuh-ruleset/pull/578Regards,
Sandra