I am starting with OSSEC for file integrity check in a bunch of Windows servers and CentOS. And I would like to keep a centralized configuration of what to check for all my agents, based on they OS.
Rerearching about Centralized agent configuration I found out that i can make a /var/ossec/etc/shared/agent.conf which spreads my will to all my agents, but I am struggling to understand how to use it.
Based on OSSEC docs example, i want to do something like this:
<agent_config os="Linux">
<localfile>
<location>/var/log/my.log2</location>
<log_format>syslog</log_format>
<syscheck>
<frequency>7200</frequency>
<auto_ignore>no</auto_ignore>
<alert_new_files>yes</alert_new_files>
<directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
<directories check_all="yes">/bin,/sbin</directories>
</syscheck>
</localfile>
</agent_config>
<agent_config os="Windows">
<localfile>
<location>C:\myapp\my.log</location>
<log_format>syslog</log_format>
<syscheck>
<frequency>7200</frequency>
<auto_ignore>no</auto_ignore>
<alert_new_files>yes</alert_new_files>
<directories check_all="yes">ProgramFiles</directories>
<directories check_all="yes">ProgramFiles(x86)</directories>
<directories check_all="yes">System32 </directories>
<directories check_all="yes">SysWOW64</directories>
</syscheck>
</localfile>
</agent_config>