Hi Mithun Haridas,
Yes, you're correct, you can achieve your use case using the fts(First Time Seen) syntax. Here's an example to illustrate it:
Suppose your log looks like this:
web: [10.150.46.225] FAILED_LOGIN (admin)
You can create a decoder like the following:
<decoder name="barracuda-web">
<prematch>web: </prematch>
</decoder>
<decoder name="barracuda-failed-login">
<parent>barracuda-web</parent>
<prematch>FAILED_LOGIN</prematch>
<regex>web: [(\d+.\d+.\d+.\d+)] FAILED_LOGIN \p(\.+)\p</regex>
<fts>srcip</fts>
<ftscomment>First time ip detected command</ftscomment>
<order>srcip,user</order>
</decoder>
Make sure the decoder includes both <fts> and <ftscomment> tags. The fts field must be a static field extracted by the decoder, in this case, srcip (
<fts>srcip</fts> ).
Refer to
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/decoders.html#fts
Next, you can create a custom rule like this:
<group name="web">
<rule id="100003" level="3">
<if_sid>1002</if_sid>
<decoded_as>barracuda-web</decoded_as>
<if_fts />
<description>login failed from $(srcip)</description>
</rule>
</group>
Refer to
https://documentation.wazuh.com/current/user-manual/ruleset/ruleset-xml-syntax/rules.html#if-fts
This rule will trigger only the first time a unique IP address appears in the logs, because of <if_fts />, which ensures the rule fires only on the first match when scrip is new

Let me know if you need any further assistance!