Hello,
Couple notes.
It seems "brew link openssl --force" no longer works (deprecated?) plus I don't like to use brew in production anyways so as a solution I compiled OpenSSL 1.0.2 from source. I've also include some other fixes to help get wazuh-ossec running in OS X.
Install Xcode command-line tools (git + gcc)
xcode-select --install
mkdir /usr/local/opt/
Or just use /usr/local/ as "openssldir" when compiling and match the path in the ossec-wazuh Makefile. OS X doesn't natively include ./opt any longer.
cd ./openssl
./Configure darwin64-x86_64-cc shared enable-ec_nistp_64_gcc_128 no-ssl2 no-ssl3 no-comp --openssldir=/usr/local/opt/openssl
make depend
make install
Before installing ossec-wazuh, run the fix /ossec-wazuh/src/init/osx105-addusers.sh, this will create the three users required to run the agent.
This fixed Error #1210 issues I was having.
(optional) Hide the users:
dscl . create /Users/ossec IsHidden 1
dscl . create /Users/ossecm IsHidden 1
dscl . create /Users/ossecr IsHidden 1
Modify the /ossec-wazuh/src/Makefile per Santiago B. namely, adding: CFLAGS & OSSEC_LDFLAGS.
Run the installer /ossec-wazuh/install.sh
Delete /Library/StartupItems/OSSEC/, that uses an old init method that has been deprecated. Instead you'll need to create a Launchd plist to start the service @boot. Put it in /Library/LaunchDaemons/ with ownership to root:wheel and 644 perms. Use plutil -lint /path/to/plist for validating. Best prac says plist Label key and the plist filename should be the same.
Heres a simple example:
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>Label</key>
<string>your.org.identification.here.ossec-wazuh</string>
<key>ProgramArguments</key>
<array>
<string>/var/ossec/bin/ossec-control</string>
<string>start</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
Enable and load into Launchd:
launchctl enable system/your.org.identification.here.ossec-wazuh
launchctl load -w /Library/LaunchDaemons/your.org.identification.here.ossec-wazuh.plist
Once loaded the agent daemon should start
Tested on Yosemite 10.10.5 & El Capitan 10.11.5 without disabling OSX's built in System Integrity Protection, GL.
Christopher Waian
Robert M Hadley Company Inc
Ventura, CA, USA