You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/manual/syscheck/index.rst
+39Lines changed: 39 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -121,6 +121,15 @@ Real time Monitoring
121
121
OSSEC supports realtime (continuous) file integrity monitoring on Linux (support was added kernel version 2.6.13) and Windows systems.
122
122
123
123
The configuration is very simple. In the ``<directories>`` option where you specify what directories to monitor, adding ``realtime="yes"`` will enable it.
124
+
125
+
.. warning::
126
+
127
+
**``realtime="yes"`` does not make every ``check_*`` option instantaneous.** Realtime
128
+
monitoring uses filesystem notifications (inotify on Linux, ``ReadDirectoryChangesW`` on
129
+
Windows) to detect changes quickly, but only **file content integrity** (checksum/size
130
+
changes on existing files) is evaluated in near real time. See :ref:`syscheck-realtime-limits`
131
+
below.
132
+
124
133
For example:
125
134
126
135
.. code-block:: xml
@@ -132,6 +141,36 @@ For example:
132
141
133
142
In this case, the directories /etc, /usr/bin and /usr/sbin will be monitored in real time. The same applies to Windows too.
134
143
144
+
.. _syscheck-realtime-limits:
145
+
146
+
Realtime limitations
147
+
^^^^^^^^^^^^^^^^^^^^
148
+
149
+
Although ``check_all="yes"`` enables permission, ownership, group, size, and checksum
150
+
monitoring for a directory, **realtime mode only alerts immediately for content integrity
151
+
changes** (for example MD5, SHA1, or SHA256 hash changes) on files already present in the
152
+
syscheck database.
153
+
154
+
The following are **not** detected immediately when only realtime monitoring is enabled:
155
+
156
+
* **Permission changes** (``check_perm``) — ``chmod`` and similar attribute updates are
157
+
picked up on the next **scheduled scan**, not instantly.
158
+
* **Ownership or group changes** (``check_owner``, ``check_group``) — same as permissions;
159
+
wait for the next scheduled scan.
160
+
* **New files** — requires the ``alert_new_files`` option and a full scan; see
161
+
:doc:`Why aren't new files creating an alert? </docs/faq/syscheck>`.
162
+
163
+
Additionally:
164
+
165
+
* **`auto_ignore`** is enforced on the manager when processing syscheck events from
166
+
scheduled scans. It **does not apply** to alerts generated by the realtime monitoring
167
+
path. For frequently changing files in realtime directories, use ``<ignore>`` or a local
168
+
rule instead.
169
+
170
+
If you need immediate alerting on permission or ownership changes, combine realtime with an
171
+
appropriate scan ``frequency`` and accept that metadata-only changes may lag until the next
172
+
scan completes.
173
+
135
174
.. warning::
136
175
137
176
The real time monitoring will not start immediately. First ossec-syscheckd needs to scan the file system and add each sub-directory to the realtime queue.
0 commit comments