Hello Ive,
Sorry for the late response, as Michel said it is possible to compile and run the Wazuh agent in FreeBSD based systems.
I have installed pfsense and configured it to send sylog to the manager and I was able to get alerts from it:
{"timestamp":"2021-01-04T11:11:20.938+0000","rule":{"level":5,"description":"syslog: User authentication failure.","id":"2501","firedtimes":1,"mail":false,"groups":["syslog","access_control","authentication_failed"],"pci_dss":["10.2.4","10.2.5"],"gpg13":["7.8"],"gdpr":["IV_35.7.d","IV_32.2"],"hipaa":["164.312.b"],"nist_800_53":["AU.14","AC.7"],"tsc":["CC6.1","CC6.8","CC7.2","CC7.3"]},"agent":{"id":"000","name":"manager"},"manager":{"name":"manager"},"id":"1609758680.15887","full_log":"Jan 4 11:11:20 php-fpm[341]: /index.php: webConfigurator authentication error for user 'admin' from: 192.168.18.154","predecoder":{"timestamp":"Jan 4 11:11:20","hostname":"php-fpm[341]:"},"decoder":{},"location":"192.168.18.36"}
Indeed the lack of hostname breaks the parsing of the log as it is taking php-fpm[341], as you said the problem lies in way FreeBSD sends the log through remote syslog, as it skips the hostname.
A possible work arround would be to use syslog-ng instead of the default syslogd, you will need to install the syslog-ng package and set the following configuration:
destination remote_log_server {
udp("manager_ip" port(514));
};
log { source(src); destination(remote_log_server); };
This is an example of the previous alert but using syslog-ng instead of syslogd:
{"timestamp":"2021-01-04T15:53:36.644+0000","rule":{"level":5,"description":"syslog: User authentication failure.","id":"2501","firedtimes":4,"mail":false,"groups":["syslog","access_control","authentication_failed"],"pci_dss":["10.2.4","10.2.5"],"gpg13":["7.8"],"gdpr":["IV_35.7.d","IV_32.2"],"hipaa":["164.312.b"],"nist_800_53":["AU.14","AC.7"],"tsc":["CC6.1","CC6.8","CC7.2","CC7.3"]},"agent":{"id":"000","name":"manager"},"manager":{"name":"manager"},"id":"1609775616.77019","full_log":"Jan 4 16:53:34 pfSense php-fpm[341]: /index.php: webConfigurator authentication error for user 'admin' from: 192.168.18.231","predecoder":{"program_name":"php-fpm","timestamp":"Jan 4 16:53:34","hostname":"pfSense"},"decoder":{},"location":"192.168.18.235"}
As you can see it is the hostname has been set correctly to pfsense.
Regards,
Daniel Folch