Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions docs/programs/manage_agents.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,13 @@ manage_agents argument options

.. option:: -f <file>

Generate clients in bulk from <file> (Manager only). The file is a comma delimited file containing the IP addresses and agent names to be added.
This file should be located within ``/var/ossec``, and referenced by its path relative to ``/var/ossec``.
Generate clients in bulk from ``<file>`` (Manager only). The file is a
comma-delimited list of ``IP,NAME`` pairs (one per line).

Pass ``-`` as the file name to read the same format from standard input
(for example ``manage_agents -f - < agents.csv`` or a pipeline).

Bulk load does not chroot, so ``<file>`` may be any readable path.

**Example:**

Expand All @@ -55,9 +60,9 @@ manage_agents argument options
192.168.1.2,host02
192.168.1.3,host03

# /var/ossec/bin/manage_agents -f /k
Bulk load file: /k
Opening: [/k]
# /var/ossec/bin/manage_agents -f /var/ossec/k
Bulk load file: /var/ossec/k
Opening: [/var/ossec/k]
Agent information:
ID:002
Name:host02
Expand All @@ -71,6 +76,20 @@ manage_agents argument options

Agent added.

**Example (stdin):**

.. code-block:: console

# printf '192.168.1.4,host04\n' | /var/ossec/bin/manage_agents -f -
Bulk load file: -
Reading bulk agents from stdin
Agent information:
ID:004
Name:host04
IP Address:192.168.1.4

Agent added.


Usage
-----
Expand Down
Loading