Skip to content

Commit 46ca83f

Browse files
authored
Merge pull request #339 from atomicturtle/docs/issue-1518-fullcommand-os-maxstr
Fix for ossec issue #1518
2 parents 78fe02d + 6f57389 commit 46ca83f

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

docs/manual/monitoring/process-monitoring.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ a new port open in listening mode on our server.
8585
First, we configure OSSEC to run the ``netstat -tan |grep LISTEN`` command
8686
by adding the following to ossec.conf:
8787

88+
.. note::
89+
90+
``full_command`` captures the entire command output as one event, but output
91+
is capped at ``OS_MAXSTR`` (6144 bytes). See :ref:`ossec_config.localfile`.
92+
8893
.. code-block:: xml
8994
9095
<localfile>

docs/syntax/ossec_config.localfile.trst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,16 @@
114114
- full_command
115115
This format will be the output from the command (as run by root) defined by command_. The entire output will be treated as a single log.
116116

117+
.. note::
118+
119+
Command output is limited by the internal ``OS_MAXSTR`` buffer (6144 bytes
120+
since OSSEC 4.1.0). ``full_command`` reads at most that amount in one run;
121+
anything beyond it is discarded. Commands that produce large reports, JSON
122+
blobs, or other multi-kilobyte output will not be captured in full. Filter
123+
or summarize command output before OSSEC collects it, or use the ``command``
124+
format if line-by-line handling is acceptable (each line is also subject to
125+
``OS_MAXSTR``).
126+
117127
.. warning::
118128
``command`` and ``full_command`` cannot be used in the agent.conf, and must be configured in each system's ossec.conf.
119129

0 commit comments

Comments
 (0)