1) Check the rule is working as you expect, here you need to use the logtest like the following:
[root@localhost ~]# /var/ossec/bin/wazuh-logtest
Starting wazuh-logtest v4.3.10
Type one log per line
{"date":"14/02/2023","src_ip":"","name":"FIREWALL1"}
**Phase 1: Completed pre-decoding.
full event: '{"date":"14/02/2023","src_ip":"","name":"FIREWALL1"}'
**Phase 2: Completed decoding.
name: 'json'
date: '14/02/2023'
name: 'FIREWALL1'
{"date":"14/02/2023","src_ip":"192.168.1.198","name":"FIREWALL1"}
**Phase 1: Completed pre-decoding.
full event: '{"date":"14/02/2023","src_ip":"192.168.1.198","name":"FIREWALL1"}'
**Phase 2: Completed decoding.
name: 'json'
date: '14/02/2023'
name: 'FIREWALL1'
src_ip: '192.168.1.198'
**Phase 3: Completed filtering (rules).
id: '100555'
level: '3'
description: 'FIREWALL1 traffic'
groups: '['firewall1']'
firedtimes: '1'
mail: 'False'
**Alert to be generated.
So, with this test, you will be sure about your custom rule is working as you expect, in this example, my rule
100555, is alerting when the log line has the field src_ip not empty.
2) The other issue is regarding the log.
To check this, you will need to verify the behavior when a new line is written on your log file. you can test according to what I mentioned in my other post, keeping a tail -f to the logs files, the "
archive.log" should be written every time that you add a new line to your log,
keeping in mind that your last line should have a "next line", and the
alerts.json should write just only when the alarm is triggered (
only when the logline has src_ip not empty).
Like the image below, every new line that you add to the file should have a new line at the end:

Please let me know about your tests or if you have some questions about this.
Regards!