9.3. Changing the Agent Configuration After an RPM Install
- 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
agent-configuration.xmland 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
configservice command to run through the setup options again. This cleans out the preferences store, re-reads the
agent-configuration.xmlfile, and runs through the configuration setup again.
[jsmith@server ~]$ sudo service jon-agent config RHQ 4.4.0.JON311GA  (Wed Aug 01 18:43:03 EDT 2012) ** Advanced Setup ** Agent Name [agent.example.com] : agent1 Agent Hostname or IP Address [!*] : Agent Port  : Agent Transport Protocol [socket] : ... 8< ...
configservice 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
--advanced, which force the agent to run its configuration setup again
--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)
service jon-agent configcommand is equivalent to starting the agent with all those options:
rhq-agent.sh --cleanconfig --setup --advanced --daemon --nostart
9.3.2. Changing Agent JVM and Other Init Configuration
/etc/init.d/jon-agentfile, 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.
-Xms64m -Xmx128m -Djava.net.preferIPv4Stack=true" export RHQ_AGENT_ADDITIONAL_JAVA_OPTS
setconfig. This is described in Configuring JBoss ON Servers and Agents.