Hello again Kelvin,
Thanks for clarifying the log obtention method. In that case, I believe the best way for the manager to collect those logs is to create an empty file, restart the manager to make sure that the logcollector is taking that file into account, and then writing the logs in that file with a tool like `cat`, so the steps to follow could be the following:
1. Move the file s1.json to another location, or change its name for logcollector to stop trying to read that file. E.g.: `mv /home/wazuh-user/s1.json /home/wazuh-user/source_s1.json`
2. Create the empty file with the name provided in the configuration. In this case: `touch /home/wazuh-user/s1.json`
3. Restart wazuh-manager to make sure logcollector is now monitoring the newly created file which, at the moment, is empty.
4. After the successful restart of the manager, write the contents of `source_s1.json` into `s1.json`, you can use the command `cat`: `cat /home/wazuh-user/source_s1.json >> /home/wazuh-user/s1.json`
5. Now logcollector should be getting the JSON logs
As to the JSON format, when the documentation talks about "single-line format" it means one JSON object per line. In the example you showed, unless formatted to improve readibility, it seems like one JSON object spans across multiple lines.
And the objects also seem to be wrapped in brackets, but JSON objects should have curly braces at the outermost level. Lists/Arrays are supported as values for a field in JSON.
We hope you find this information useful. Let us know if you need more help.
Regards,
Juan Manuel