Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

9.3. Changing the Agent Configuration After an RPM Install


There are two parts to the agent configuration:
  • The agent connection properties, which define the agent instance and how it communicates to the server
  • The agent JVM properties, which manage agent performance and options

9.3.1. Changing Agent Connection Configuration

The agent connection properties are defined when the agent is installed. This includes information like the server for it to connect to, its port number, and whether to use SSL connections.
That agent connection configuration is initially read from agent-configuration.xml and overlaid with the values entered at the setup prompts at start up. After the agent is initially configured, the agent persists that configuration in its Java preferences (/var/lib/jboss-on/agent/prefs/.java/.userPrefs/rhq-agent/default/) and never refers to the agent-configuration.xml again.
For that information to be changed, the agent connection information has to be wiped out and reset.
To change the agent connection (registration) configuration, use the config service command to run through the setup options again. This cleans out the preferences store, re-reads the agent-configuration.xml file, and runs through the configuration setup again.

Important

When the JBoss ON agent is installed from an RPM, it is automatically configured as a system service. For data consistency and agent performance, always manage the agent connection configuration using the service tools, rather than attempting to edit the configuration files or JVM startup properties directly.
For example:
[jsmith@server ~]$ sudo service jon-agent config
RHQ 4.4.0.JON311GA [6910991] (Wed Aug 01 18:43:03 EDT 2012)
** Advanced Setup **
Agent Name [agent.example.com] : agent1
Agent Hostname or IP Address [!*] :
Agent Port [16163] :
Agent Transport Protocol [socket] :
... 8< ...
Copy to Clipboard Toggle word wrap
The config service command opens the agent start script and automatically passes a series of options which edit the agent connection configuration:
  • --cleanconfig, to wipe the previous configuration settings
  • --setup and --advanced, which force the agent to run its configuration setup again
  • --daemon and --nostart, which runs the agent command prompt without starting the agent process and then exits (so that the agent can be started as a service)
So, the service jon-agent config command is equivalent to starting the agent with all those options:
rhq-agent.sh --cleanconfig --setup --advanced --daemon --nostart
Copy to Clipboard Toggle word wrap

9.3.2. Changing Agent JVM and Other Init Configuration

After the agent is configured, optional JVM settings (the persisted configuration) are set in the init script, /etc/init.d/jon-agent file, or in the environment script, rhq-agent-env.sh. Both files are loaded every time the agent starts; it is recommended to edit the init script, which sets the additional JAVA_OPTS values.
For example:
RHQ_AGENT_ADDITIONAL_JAVA_OPTS="-Drhq.agent.data-directory=$RHQ_AGENT_DATA_DIR -Djava.util.prefs.userRoot=$RHQ_AGENT_PREFS_DIR -Xms64m -Xmx128m -Djava.net.preferIPv4Stack=true"
export RHQ_AGENT_ADDITIONAL_JAVA_OPTS
Copy to Clipboard Toggle word wrap
The Java settings can also be edited using agent prompt commands like setconfig. This is described in Configuring JBoss ON Servers and Agents.
Nach oben
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2025 Red Hat