manage_agents:¶
manage_agents is a menu based application available on both agents and servers, but performs different tasks on each. On the server it is used to add or remove an agent and retrieve the key for the an agent. On an agent manage_agents will import an authentication key.
Available actions on the manager:¶
The available actions on the manager are to add an agent, extract the key for an agent, list the current agents, remove an agent, and quit the application. Select an action by typing the letter in parentheses.

Adding an agent:¶
Creating the key on the server:¶
- On the server run /var/ospatrol/bin/manage_agents. Notice the options provided by this application. We will be choosing a to add an agent.

- After selecting a we have to enter information about the agent. All of these items must be unique. Multiple agents using a single ID, IP, or hostname can cause i
ssues.
- The agent name does not have to be the hostname, but using the hostname may help with managing the agents.
- The IP address can be the actual IP address, a CIDR address (192.168.1.0/24), or any. It is best to be as specific as possible, but monitoring VPN or DHCP user
- s is sometimes necessary. CIDR addresses and any do not have to be unique.
- The ID will be used for a number of OSPatrol functions. Finding the ID is easy, so I typically choose the default.

- After confirming that the agent should be created and the information is correct, you will be presented with the original menu again. This time use L to list the
agents. Notice there is only 1 agent on this system. The list can get much larger, some people reportedly having over 1,000 agents on a single server.

Removing an agent:¶
Type ‘R‘ at the prompt to remove an agent. manage_agents prompts for the agent id, and confirms that the agent should be deleted. After an agent has been deleted, it cannot be un-deleted. It has to be re-added instead.

manage_agents on an agent:¶
The only option available when using manage_agents on an agent is to import the authentication key.

Using manage_agents at the command line:¶
manage_agents has a number of command line options. The most important ones are -h, -l, -e, and -i.
- -h prints the help message.
- -l lists the available agents.
- -e <id> extracts the authentication key for the agent id.
- -i <id> imports the authentication key on an agent.
manage_agents help message:
