Imported Upstream version 2.7
[ossec-hids.git] / doc / manage_agents.txt
1
2 == How to add an agent without any keyboard input ==
3
4 By default, to add an agent from server side, you must provide your agent
5 information  to `manage_agents` program, by using its interactive mode.
6 This is really tedious if you have many servers / agents to add. Luckily,
7 you can use following environment variables as responses
8
9      | variable name          | value   | description          |
10      +------------------------+---------+----------------------+
11      | OSSEC_ACTION           | A/a     | add an agent         |
12      | OSSEC_AGENT_NAME       | string  | name of agent        |
13      | OSSEC_AGENT_IP         | CIDR    | ip address of agent  |
14      | OSSEC_AGENT_ID         | integer | max length = 8       |
15      | OSSEC_AGENT_KEY        | string  | base64 format        | (*)
16      | OSSEC_ACTION_CONFIRMED | y/Y/n/N | y -> confirmed       |
17
18     (*) OSSEC_AGENT_KEY is used only on agent (when key is being imported)
19
20 Please note that it's your duty to ensure that name, ip,... of agent are
21 valid. Otherwise, the program will fall back to interactive mode. In most
22 case, you should ensure that you new agent has an unique name/id. You can
23 simply know that by using `manage_agents -l` to list all known agents.
24
25 For more details, please refer to OSSEC document
26     http://www.ossec.net/doc/manual/agent/agent-management.html
27
28 PS: you may use some tools (`expect`) to send strings to `manage_agents`,
29 insead of using the above environment variables. It's your choice.
30
31 --
32 Anh K. Huynh <kyanh@viettug.org>