Query and Update the Agent from the HQ Portal on Unix-Based Platforms
On Unix-based systems, use this command and a supported command switch to invoke agent operations from a command shell:
$AGENT_HOME%/bin/hq-agent.sh
Command switches are shown below.
The paragraphs that follow provide useful information about agent configuration data---how it is initially supplied, where it is saved, and how to change it.
How an Agent Obtains its Configuration at First Startup
When you install the agent, you do not supply any configuration
information.
Where Agent Startup Configuration Data is Stored
The configuration choices you must supply for the agent to start
up specify where and how to communicate with the HQ
Server.
Note that upon successful startup, the HQ Agent saves its setup
configuration data it two locations:
The agent properties that govern communications are the ones that are absolutely required for an agent to start up. In addition, there are a number of other agent properties that you can use to configure optional agent features and behaviors. Unlike the setup properties, which the agent obtains from its data directory and the HQ database, the properties that control optional agent behaviors are persisted only in agent.properties.
For a complete list of agent properties, see Agent
Properties.
Supported Locations for agent.properties
When you install the HQ 4.0 Agent, agent.properties is placed in AgentHome/conf.
On Unix-based platforms, the agent honors an external (from the
agent installation) location for the properties file: an .hq
directory under the home directory of the user under which the
agent runs.
Storing agent.properties external to the agent installation
directory is useful, because some upgrade scenarios will overwrite
the /conf directory.
Once you have an operational 4.0 agent installation, you can
upgrade it by installing an agent bundle only - you can perform
this upgrade operation from the HQ user interface or using a manual
procedure, if you prefer.
What Happens when an Agent Starts Up
If you are having trouble starting an agent, or need to change its startup configuration, it is helpful to understand how the agent obtains its startup settings.
1. When an agent starts up, it looks in its /data directory for the information it needs to be able to connect to the HQ Server. If it finds that information, the agent connects to the HQ server and gets additional startup settings from the database.
2. If the agent doesn't find the connection information that allows it to connect to the HQ Server in its /data directory---either because it has not been started previously, or because the data directory's contents are corrupt or missing, it looks for uncommented agent.setup.* properties in the agent.properties file. The agent looks for the properties file in these locations, in this order:
If the agent finds the connection properties it needs in the agent.properties file, those property values are saved—the server connection information in the AgentHome/data directory, and the agent connection information in the HQ database.
3.
If the user supplies values that enable it to connect to the HQ server, those values are persisted, as described above.
How to Change Agent Setup Configuration Properties
As described in
How an Agent Obtains its Configuration at First Startup, you
configure an agent's setup properties - the properties that begin
with "agent.setup" - the first time you start it up. The properties
that relate to where and how to contact the HQ server, are saved in
the agent's /data directory; those related to how the server can
reach the agent are
If you need to make changes to those configuration values for an
agent at a later time, you can delete the agent's /data directory,
edit the agent.setup.* properties in the agent.properties file, and
restart the agent.
If you prefer to change the startup configuration (other than agent listen port) without having to restart the agent, run the following command in a command shell, while the agent is running.
AgentHome/hq-agent.sh setup
This will allow you to interactively supply new values for the
setup properties, as described in
Configuring Agent Startup Settings Interactively at First
Startup. This will this cause all properties in the properties
file to be re-read, and take effect.
Understanding Agent - Server Communications
By default, communications between an HQ Agent and an HQ Server is bidirectional.
If your security policies dictate, you can configure the agent to initiate all communications with the HQ Server. You can configure unidirectional communications at first startup of a new 4.x agent, or an upgraded 4.x agent. If you want to change from bidirectional to unidirectional communications at a later time, see Changing Between Unidirectional and Bidirectional Agent Communications.
HQ 4.0 Agent Installation Directory Structure
In HQ 4.0, the agent directory structure has changed. The new
structure is shown below.
HQ_AGENT_HOME
jre
data
插入表情