After the installation, the Wazuh manager and the Wazuh agent have defined a default syscheck configuration, which should be reviewed and adjusted to the particular environment. This section presents configuration examples, helping to learn how to use it in different use cases:

  1. Configuring syscheck - basic usage

  2. Configuring scheduled scans

  3. Configuring real-time monitoring

  4. Configuring who-data monitoring

  5. Configuring Windows registry

  6. Configuring reporting file and registry value changes

  7. Configuring ignoring files and Windows registry entries

  8. Configuring ignoring files via rules

  9. Configuring the alert severity for the monitored files

  10. Configuring maximum recursion level allowed

  11. Configuring syscheck process priority

  12. Configuring where the database is to be stored

  13. Configuring synchronization

Syscheck component is configured both in the Wazuh manager and in the Wazuh agent ossec.conf file. This capability can be also configured remotely using centralized configuration and the agent.conf file. The list of all syscheck configuration options is available in the syscheck section.

Configuring syscheck - basic usage

To configure syscheck, a list of files and directories must be identified. The check_all attribute of the directories option allows checks of the file size, permissions, owner, last modification date, inode, and all the hash sums (MD5, SHA1, and SHA256). By default, syscheck scans selected directories, whose list depends on the default configuration for the host's operating system.


If a directory is specified both in a centralized configuration and on the Wazuh agent's ossec.conf, the centralized configuration will take preference and override the local configuration.

  <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
  <directories check_all="yes">/root/users.txt,/bsd,/root/db.html</directories>

New in version 4.3.0.

FIM directories can be configured using * and ? wildcards in the same way you would use them in a shell or cmd terminal for listing files.

  <directories check_all="yes">/home/*/Downloads</directories>


Directories and files that match the configured pattern and are created after the initial FIM scan will be added for monitoring after the next scheduled scan is run.

Configuring scheduled scans

For the scheduled scans, syscheck has an option to configure the frequency of the system scans. In this example, syscheck is configured to run every 10 hours:


There is an alternative way to schedule the scans using the scan_time and the scan_day options. In this example, the scan will run every Saturday at the 10pm. Configuring syscheck that way might help, for example, to set up the scans outside the environment production hours:


Configuring real-time monitoring

Real-time monitoring is configured with the realtime attribute of the directories option. This attribute only works with the directories rather than with the individual files. Real-time change detection is paused during periodic syscheck scans and reactivates as soon as these scans are complete:

  <directories check_all="yes" realtime="yes">c:/tmp</directories>

Configuring who-data monitoring

Who-data monitoring is configured with the whodata attribute of the directories option. This attribute replaces the realtime attribute, which means that whodata implies real-time monitoring but adds the who-data information. This functionality uses Linux Audit subsystem and the Microsoft Windows SACL, so additional configurations might be necessary. Check the auditing who-data entry to get further information:

  <directories check_all="yes" whodata="yes">/etc</directories>


There is a known bug that affects versions 2.8.5 and 2.8.4 of audit that shows a directory as null when it has been moved adding a / at the end of the directory. This bug will cause that no alerts related to this directory will be shown until a new event related to this directory is triggered when whodata is enabled.

How to tune audit to deal with a huge amount of who-data events at the same time

It is possible to lose who-data events when a flood of events appears. The following options help the audit socket and dispatcher to deal with big amounts of events:

/etc/audit/auditd.conf  -> disp_qos = ["lossy", "lossless"]
/etc/audisp/audisp.conf -> q_dephs  = [<Numerical value>]

The disp_qos sets blocking/lossless or non-blocking/lossy communication between the audit daemon and the dispatcher. There is a 128k buffer between the audit daemon and dispatcher. This is sufficient for most uses. If lossy is chosen, incoming events going to the dispatcher are discarded when the queue is full. In this case, events are still written to disk if log_format is not nolog. Otherwise, the auditd daemon will wait for the queue to have an empty spot before logging to disk. The risk is that while the daemon is waiting for network IO, an event is not being recorded to disk. The recommended value is lossless.

The q_dephs is a numeric value, by default set to 80, that tells how big is the internal queue of the audit event dispatcher. A bigger queue handles flood of events better but could hold events that are not processed when the daemon is terminated. This value has to be increased if there are messages in the syslog indicating that the events are being dropped.

On the Wazuh side, the rt_delay variable from the internal FIM configuration can help to prevent the loss of events:

/var/ossec/etc/internal_options.conf -> syscheck.rt_delay = [Numerical value]

It sets a delay between real-time alerts in milliseconds. The value has to be decreased to process who-data events faster.

Configuring reporting new files

To report new files added to the system, syscheck can be configured with the alert_new_files option. By default, this feature is enabled on the monitored Wazuh agent, but the option is not present in the syscheck section of the configuration:


An example alert on a new file creation looks as follows:

** Alert 1585943821.46978: - ossec,syscheck,pci_dss_11.5,gpg13_4.11,gdpr_II_5.1.f,hipaa_164.312.c.1,hipaa_164.312.c.2,nist_800_53_SI.7,
2020 Apr 03 19:57:01 (agent) any->syscheck
Rule: 554 (level 5) -> 'File added to the system.'
File '/etc/new_file' added
Mode: scheduledAttributes:
- Size: 2
- Permissions: rw-r--r--
- Date: Fri Apr 3 19:56:50 2020
- Inode: 23194
- User: root (0)
- Group: root (0)
- MD5: 9a8ad92c50cae39aa2c5604fd0ab6d8c
- SHA1: a9fcd54b25e7e863d72cd47c08af46e61b74b561
- SHA256: 092fcfbbcfca3b5be7ae1b5e58538e92c35ab273ae13664fed0d67484c8e78a6

Configuring Windows registry

To configure the Windows registries, it is necessary to create a list of those registries to monitor. This is done in a similar manner to how we list directories and files, but using the label `<windows_registry>` instead. There are many attributes and options to specify, for example, all the basic checks can be enabled with the check_all attribute, the registry architecture to monitor can be specified with arch, report_changes can be used to get information on the changes made to values, and so on. A list of all the supported attributes and options can be found here: Windows registries.

  <windows_registry arch="both" check_all="yes">HKEY_LOCAL_MACHINE\SOFTWARE</windows_registry>
  <windows_registry arch="32bit" check_all="no" check_mtime="yes">HKEY_LOCAL_MACHINE\SYSTEM\Setup</windows_registry>

Configuring reporting file and registry value changes

To report the exact content changed in a text file or a Windows registry value, syscheck can be configured with the report_changes attribute of the directories or the registries options. Report_changes should be used with caution as Wazuh copies every single monitored file to a private location.

In this example, by enabling the report_changes, the alerts will show the changed content for all the text files in a listed directory and its subdirectories or for all values of a monitored Windows registry:

  <directories check_all="yes" realtime="yes" report_changes="yes">/test</directories>
  <windows_registry arch="64bit" report_changes="yes">HKEY_LOCAL_MACHINE\SYSTEM\Setup</windows_registry>
** Alert 1585758628.156629: - ossec,syscheck,pci_dss_11.5,gpg13_4.11,gdpr_II_5.1.f,hipaa_164.312.c.1,hipaa_164.312.c.2,nist_800_53_SI.7,
2020 Apr 01 16:30:28 (agent) any->syscheck
Rule: 550 (level 7) -> 'Integrity checksum changed.'
File '/test/file' modified
Mode: real-time
Changed attributes: size,mtime,inode,md5,sha1,sha256
Size changed from '14' to '13'
Old modification time was: '1585758615', now it is '1585758628'
Old inode was: '23186', now it is '23188'
Old md5sum was: 'f296597bd5a808e5d1ad8cc2ab09c9f3'
New md5sum is : 'ab68c0f2af74dc4a1c482a83c0c5a3ec'
Old sha1sum was: 'ba0fe43dcd9586c8c2703d8278a960a3aa4b4754'
New sha1sum is : '3a686748bf79db0adbad15f22ef566212a13b6c8'
Old sha256sum was: '53fe48bd127d4bf0e559f26b005ee40ee40d1bba4e971dd0437da6aa47759310'
New sha256sum is : '40e29c160ea4e9911cafb9bcdbb2bcec21904a0c13a2871936c79145ff8085c7'Attributes:
- Size: 13
- Permissions: rw-r--r--
- Date: Wed Apr 1 16:30:28 2020
- Inode: 23188
- User: root (0)
- Group: root (0)
- MD5: ab68c0f2af74dc4a1c482a83c0c5a3ec
- SHA1: 3a686748bf79db0adbad15f22ef566212a13b6c8
- SHA256: 40e29c160ea4e9911cafb9bcdbb2bcec21904a0c13a2871936c79145ff8085c7What changed:
< Original text
> Altered text
    "type": "event",
    "data": {
        "path": "HKEY_LOCAL_MACHINE\\SYSTEM\\Setup",
        "mode": "scheduled",
        "type": "modified",
        "arch": "[x64]",
        "value_name": "test_value",
        "timestamp": 1606349371,
        "attributes": {
            "type": "registry_value",
            "value_type": "REG_SZ",
            "size": 12,
            "hash_md5": "96c15c2bb2921193bf290df8cd85e2ba",
            "hash_sha1": "ca527369d9e8c1e081558bd92f90f65c4eb77e21",
            "hash_sha256": "fe32608c9ef5b6cf7e3f946480253ff76f24f4ec0678f3d0f07f9844cbff9601",
            "checksum": "56a7cc798b98bcd92a3aa49bfa3943ce3b4f4725"
        "changed_attributes": [
        "old_attributes": {
            "type": "registry_value",
            "value_type": "REG_SZ",
            "size": 17,
            "hash_md5": "84b8bc6ddfb8c2032ae2eb44d162369b",
            "hash_sha1": "c1dab0c0864b6ac9bdd3743a1408d679f1acd823",
            "hash_sha256": "bf573149b23303cac63c2a359b53760d919770c5d070047e76de42e2184f1046",
            "checksum": "76538a04f4923b9688e50802e501771cb3c0508f"
        "content_changes": "< original content\n---\n> new content\n"

If some sentive files exist in the monitored with report_changes path, nodiff option can be used. This option disables computing the diff for the listed files, avoiding data leaking by sending the files content changes through alerts:

  <directories check_all="yes" realtime="yes" report_changes="yes">/test</directories>

In this example, by adding nodiff option, syscheck will not compute the diff for a listed text file:

** Alert 1585757658.154829: - ossec,syscheck,pci_dss_11.5,gpg13_4.11,gdpr_II_5.1.f,hipaa_164.312.c.1,hipaa_164.312.c.2,nist_800_53_SI.7,
2020 Apr 01 16:14:18 (agent) any->syscheck
Rule: 550 (level 7) -> 'Integrity checksum changed.'
File '/test/private' modified
Mode: real-time
Changed attributes: size,mtime,inode,md5,sha1,sha256
Size changed from '14' to '20'
Old modification time was: '1585757413', now it is '1585757658'
Old inode was: '23187', now it is '23185'
Old md5sum was: 'ef4ad1a40d0a95ad2e1b72eccdca6d44'
New md5sum is : '158ccd88359654ac4ffd0e3cecb79a49'
Old sha1sum was: '5f34d30f7bdefe9e825bff388de047dacdc09853'
New sha1sum is : '18dfef68273c00fc733e28ce9aa1830f5e8fabd8'
Old sha256sum was: '211ae95d4e54cff5724a98f0bae0b505adfdafe1ed8b15e40570a5fe58d20c61'
New sha256sum is : '60c2a08e66f02bacea882f7b437f9c983431d75a686b703661c34e288d36de9d'Attributes:
- Size: 20
- Permissions: rw-r--r--
- Date: Wed Apr 1 16:14:18 2020
- Inode: 23185
- User: root (0)
- Group: root (0)
- MD5: 158ccd88359654ac4ffd0e3cecb79a49
- SHA1: 18dfef68273c00fc733e28ce9aa1830f5e8fabd8
- SHA256: 60c2a08e66f02bacea882f7b437f9c983431d75a686b703661c34e288d36de9dWhat changed:
<Diff truncated because nodiff option>

Configuring ignoring files and Windows registry entries

In order to avoid false positives, syscheck can be configured to ignore certain files and directories that do not need to be monitored by using the ignore option:

  <ignore type="sregex">.log$|.tmp</ignore>

Similar functionality, but for the Windows registries can be achieved by using the registry_ignore option:

 <registry_ignore type="sregex">\Enum$</registry_ignore>

Configuring ignoring files via rules

An alternative method to ignore specific files scanned by syscheck is by using rules and setting the rule level to 0. By doing that the alert will be silenced:

<rule id="100345" level="0">
  <description>Ignore changes to /var/www/htdocs</description>

Configuring the alert severity for the monitored files

With a custom rule, the level of a syscheck alert can be altered when changes to a specific file or file pattern are detected:

<rule id="100345" level="12">
  <description>Changes to /var/www/htdocs - Critical file!</description>

Configuring maximum recursion level allowed

It is possible to configure the maximum recursion level allowed for a specific directory by using the recursion_level attribute of the directories option. recursion_level value must be an integer between 0 and 320.

An example configuration may look as follows:

  <directories check_all="yes">/etc,/usr/bin,/usr/sbin</directories>
  <directories check_all="yes">/root/users.txt,/bsd,/root/db.html</directories>
  <directories check_all="yes" recursion_level="3">folder_test</directories>

Using the following directory structure and recursion_level="3":

├── file_0.txt
└── level_1
    ├── file_1.txt
    └── level_2
        ├── file_2.txt
        └── level_3
            ├── file_3.txt
            └── level_4
                ├── file_4.txt
                └── level_5
                    └── file_5.txt

The alerts will be generated for all files up to folder_test/level_1/level_2/level_3/ but not for any files in the directory deeper than level_3.

To disable the recursion and generate the alerts only for the files in the monitored folder, the recursion_level value has to be set to 0.


If recursion_level is not specified, it is set to the default value defined by syscheck.default_max_depth in the internal options configuration file.

Configuring syscheck process priority

To adjust syscheck CPU usage on the monitored system, the process_priority option can be used. It sets the nice value for syscheck process. The default process_priority is set to 10.

Setting process_priority value higher than the default, will give syscheck lower priority, less CPU resources and make it run slower. In the example below the nice value for syscheck process is set to maximum:


Setting process_priority value lower than the default, will give syscheck higher priority, more CPU resources and make it run faster. In the example below the nice value for syscheck process is set to minimum:


Configuring where the database is to be stored

When the Wazuh agent starts it performs a first scan and generates its database. By default, the database is created in disk:


Syscheck can be configured to store the database in memory instead by changing value of the database option:


The main advantage of using in memory database is the performance as reading and writing operations are faster than performing them on disk. The corresponding disadvantage is that the memory must be sufficient to store the data.

Configuring synchronization

Synchronization can be configured to change the synchronization interval, the number of events per second, the queue size and the response timeout:


If the Wazuh agent is upgraded to v3.12 and keeps its old configuration, the synchronization section will not be present in the ossec.conf file but the Wazuh agent will still use the default synchronization settings as shown above.