Hi Azhar,
Regarding the rules, there are two problems. First of all, this is failing probably because you do not have any decoder called fortigate-custom. The decoders I have sent you before are named FW_FORTI1000D, so if you want this to work, in the local_rules.xml file, in the rule 222000 change the field <decoded_as>fortigate-custom</decoded_as>, for <decoded_as> FW_FORTI1000D</decoded_as>.
The <decoded_as>NAME</decoded_as> field means that the log was decoded using a decoder whose name is NAME. If there isn't any decoder with this particular name, as in your case, fortigate-custom, you will obtain an error.
The other issue that you have in the rule file is that the rules 222000 and 100110 have to be concatenated. What I mean is that the rule 222000 is for ANY event which has been decoded with the FW_FORTI1000D decoder. This is the parent rule for all the events from FortiGate. I strongly suggest you uncomment it, thus the next rule (100110) is dependant on 222000. Once you have the rule 222000 uncommented, in the rule 1001100 change the field <if_sid>100002</if_sid> for <if_sid>222000</if_sid> thus making it a child of 222000. I have set the rule 100002 as this was the id I have set for the first rule.
The <if_sid>NUMBER</if_sid> field means that in order to trigger the current rule the rule whose id is NUMBER had to be triggered before.
If you do not want to receive all the alerts that 222000 is generating (which are a lot) just lower its level from 3 to 2. This way you will only be alerted by the rule 100110.
Once you have performed the changes, restart the manager. However, I strongly recommend you using the binary /var/ossec/bin/ossec-logtest to see if there is any problem with the rules and decoders, before actually committing the changes.
Regarding your questions:
2) About the files with customized rules and decoders. In the link above, you can find more information about this topic, but basically, you can add custom rules to the file /var/ossec/etc/rules/local_rules.xml but also you can create your own rule files, meaning that besides having the local_rules.xml you can have a field called my_custom_rules.xml, or some other name. The only condition is that this file must be an .xml type and it has to be allocated in the /var/ossec/etc/rules/ directory. The same happens with the decoders, with the only exception that the decoder directory is called /var/ossec/etc/decoders/
Let me know if you have any doubts.
Regards,
Yana.