install
$ ./rhqctl install --help
15:40:50,087 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
usage: rhqctl install [options]
Installs RHQ services.
--agent Install RHQ agent. The install
directory will be [/home/bob/rhq-agent]
--agent-auto-start <arg> If an agent is to be installed it
will, by default, also be started.
However, if this option is set to
false, the agent will not be started
after it gets installed.
--agent-config <arg> An alternate XML file to use in place
of the default agent-configuration.xml
--agent-preference <arg> An agent preference setting (whose
argument is in the form 'name=value')
to be set in the agent. More than one
of these is allowed.
--server Install RHQ server. If you have not
yet installed an RHQ storage node
somewhere in your network, you must
specify --storage to install one.
--server-config <arg> An alternate properties file to use in
place of the default
rhq-server.properties
--storage Install RHQ storage node. The install
directory will be
[/home/bob/rhq-storage]. Note
that this option implies --agent which
means an agent will also be installed,
if one is not yet installed.
--storage-config <arg> A properties file with keys that
correspond to option names of the
storage installer. Each property will
be translated into an option that is
passed to the storage installer.
--storage-data-root-dir <arg> The root directory under which all
storage data directories will be
placed.
When no options are specified rhqctl installs all services - the storage node followed by the server and then the agent. Installation includes laying the bits down on disk, configuring the service, and then starting the service. When the install command finishes (and no options are supplied), the storage node, the server, and the agent should all be up and running.
--agent
When the --agent option is supplied, rhqctl will install the agent. If the agent is already installed, a warning message will be displayed and agent installation will be skipped.
--server
When the --server option is supplied, rhqctl will install the server. If the server is already installed, a warning message will be displayed and server installation will be skipped.
--storage
When the --storage option is supplied, rhqctl will install the storage node. If the storage node is already installed, a warning message will be displayed and storage node installed will be skipped.
Executing rhqctl install --storage results in both the storage node and agent being installed even though the agent option is not specified. This is because RHQ requires an agent to be installed along side a storage node so that it can be fully managed.
--agent-config
Specifies an alternative XML file to use in place of the default agent-configuration.xml. You can use this if you want to preconfigure your agent with your own custom settings.
--server-config
Specifies an alternative properties file to use in place of the default rhq-server.properties. This properties file will replace the default rhq-server.properties.
--storage-config
Specifies a properties file where each property corresponds to a storage installer option. You can find the names of the storage options that are valid (as well as a description of them), run the rhq-storage-installer script with the -help option. All options (minus the "-" prefix, are the names of the storage options.
If a relative path is specified with the agent-config, server-config, and storage-config options, it will be resolved relative to <rhq-server-dir>.
A few options are not relevant for the properties file and have been omitted from the list. Specifically --dir, --start, --upgrade.
$ ./rhq-storage-installer.sh --help
Starting RHQ Storage Installer ...
15:47:13,049 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
15:47:13,172 INFO [org.rhq.storage.installer.StorageInstaller] Running RHQ Storage Node installer...
usage: rhq-storage-installer.sh|bat [options]
-c,--client-port <PORT> The port on which to listen for client
requests. Defaults to 9142
--check-status <true|false> Check the node status to verify that it
is up after starting it. This option is
ignored if the start option is not set.
Defaults to true.
--commitlog <DIR> The directory where the storage node
keeps commit log files. Defaults to
/var/lib/rhq/storage/commitlog (on Linux)
or %HOMEDRIVE%\rhq\storage\commitlog
(on Windows).
--data <DIR> The directory where the storage node
keeps data files. Defaults to
/var/lib/rhq/storage/data (on Linux)
or %HOMEDRIVE%\rhq\storage\data
(on Windows).
-h,--help Show this message.
--heap-new-size <arg> The value to use for the new generation
of the heap. This value is passed
directly to the -Xmn option of the Java
executable
--heap-size <arg> The value to use for both the min and
max heap. This value is passed directly
to the -Xms and -Xmx options of the Java
executable.
-j,--jmx-port <PORT> The port on which to listen for JMX
connections. Defaults to 7299.
-n,--hostname <HOSTNAME> The hostname or IP address on which the
node will listen for requests. If not
specified, defaults to the hostname for
localhost.
-s,--seeds <SEEDS> A comma-delimited list of hostnames or
IP addresses that serve as contact
points. Nodes use this list to find each
other and to learn the cluster topology.
It does not need to specify all nodes in
the cluster. Defaults to this node's
hostname.
--saved-caches <DIR> The directory where the storage node
keeps saved cache files. Defaults to
/var/lib/rhq/storage/saved_caches (on Linux)
or %HOMEDRIVE%\rhq\storage\saved_caches
(on Windows).
--ssl-storage-port <PORT> The port on which to listen for
encrypted requests from other nodes.
Only used when encryption is enabled.
Defaults to 7101
--stack-size <arg> The value to use for the thread stack
size. This value is passed directly to
the -Xss option of the Java executable.
--storage-port <PORT> The port on which to listen for requests
from other nodes. Defaults to 7100
Values are treated like Java strings. So:
-
Use forward slashes where possible, especially in directory or file paths (including Windows!). For example: /var/lib or C:/my/folder.
-
If you need an explicit backslash, escape it using a double-backslash.
If using non-default settings for the data, commitlog, and/or saved-caches directories, each directory should be unique. Do not share the same directory.
See Storage Node Installer for more information about the storage installer.
--storage-data-root-dir
By default, the RHQ Storage Node will persist its data on the filesystem under /var/lib. However, this requires root access; if you do not wish to allow the RHQ Storage Node to run as root, you must specify a different root directory that the RHQ Storage Node will have read-write access to.
Examples
This is the basic install command which will install all components (an RHQ Server, RHQ Storage Node, and RHQ Agent):
To install only the server, you would run the following (which assumes you already have a RHQ Storage Node installed and configured elsewhere):
$ rhqctl install --server
Install an RHQ Storage Node with non-default options. Note this does not install an RHQ Server but does install an RHQ Agent along with the RHQ Storage Node:
$ rhqctl install --storage --storage-config=/tmp/storage.properties
where storage.properties looks like,
commitlog=/tmp/rhq/storage/commit_log
data=/tmp/rhq/storage/data
saved-caches=/tmp/rhq/storage/saved_caches
upgrade
$ ./rhqctl upgrade --help
12:08:54,374 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
usage: rhqctl upgrade [options]
Upgrades RHQ services from an earlier installed version
--agent-auto-start <arg> If an agent is to be upgraded it
will, by default, also be started.
However, if this option is set to
false, the agent will not be started
after it gets upgraded.
--from-agent-dir <arg> Full path to install directory of
the RHQ Agent to be upgraded.
Required only if an existing agent
exists and is not installed in the
default location:
<from-server-dir>/../rhq-agent
--from-server-dir <arg> Full path to install directory of
the RHQ Server to be upgraded.
Required.
--run-data-migrator <arg> This option is valid only when
upgrading from older systems that
did not have storage nodes. The
existing metric data needs to
migrate to the metric storage. The
upgrade process can trigger this or
give you an estimate on the
duration. If you want to have fine
control over the process, please run
the migrator on the command line.
Options are none (do nothing),
estimate (estimate the migration
time only), print-command (print the
command line for a manual run),
do-it (run the migration)
--storage-config <arg> This option is valid only when
upgrading from older systems that
did not have storage nodes. Use this
option to specify non-default
storage installer options. It is the
path to a properties file with keys
that correspond to option names of
the storage installer. Each property
will be translated into an option
that is passed to the storage
installer.
--storage-data-root-dir <arg> This option is valid only when
upgrading from older systems that
did not have storage nodes. Use this
option to specify a non-default base
directory for the data directories
created by the storage node. For
example, if the default directory is
not writable for the current user
(/var/lib on Linux) or if you simply
prefer a different location.
--use-remote-storage-node <arg> By default a server is co-located
with a storage node. However, if
this option is set to true, no local
storage node will be upgraded and it
is assumed a remote storage node is
configured in rhq-server.properties.
--from-server-dir
This points to the location of the old server installation - this is the server you want to upgrade.
--from-agent-dir
If you installed your agent in a place other than the directory "rhq-agent" which is a peer directory to the --from-server-dir, then you must specify --from-agent-dir in order to upgrade the old agent. If you have no agent to upgrade, this need not be specified.
Examples
Upgrade the server. If this was an older server that did not have a storage node, an RHQ Storage Node and RHQ Agent will be installed when upgrading that server.
$ ./rhqctl upgrade --from-server-dir /opt/rhq/rhq-server
Upgrade the server and the agent. If this was an older server that did not have a storage node, an RHQ Storage Node will be installed when upgrading that server.
$ ./rhqctl upgrade --from-server-dir /opt/rhq/rhq-server --from-agent-dir /home/rhq/rhq-agent
Upgrade the server and put the storage node's data directories under the given root directory:
$ ./rhqctl upgrade --from-server-dir /opt/rhq/rhq-server --storage-data-root-dir /home/rhq/storage-data
Upgrade the server but do not install or upgrade any storage node. This requires that you have already configured your rhq-server.properties to point to a remote storage node cluster. Without a storage node (either remote or local), the server will fail to operate correctly.
$ ./rhqctl upgrade --from-server-dir /opt/rhq/rhq-server --use-remote-storage-node true
start
$ ./rhqctl start --help
11:56:00,344 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
usage: rhqctl start [options]
Starts RHQ services.
--agent Start RHQ agent
--server Start RHQ server
--storage Start RHQ storage node
When no options are specified rhqctl will start all installed services that are not already running.
--storage
Start the storage node. If the storage node is already running, rhqctl will log a message to indicate that it is already running. A warning is logged if the storage node is not installed.
--server
Start the server. If the server is already running, rhqctl will log a message to indicate that it is already running. A warning is logged if the server is not installed.
--agent
Start the agent. If the agent is already running, rhqctl will log a message to indicate that it is already running. A warning is logged if the agent is not installed.
Examples
Start only the storage node.
$ ./rhqctl start --storage
Start the storage node and the server.
$ ./rhqctl.sh start --storage --server
Start only the agent.
stop
$ ./rhqctl stop --help
11:58:02,183 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
usage: rhqctl stop [options]
Stops RHQ services
--agent Stop RHQ agent
--server Stop RHQ server
--storage Stop RHQ storage node
When no options are specified, rhqctl will stop all installed services that are running.
--storage
Stop the storage node. Log a warning message if the storage node is not installed.
--server
Stop the server. Log a warning message if the server is not installed.
--agent
Stop the agent. Log a warning message if the agent is not installed.
Examples
Stops only the storage node. If there is a server running, you must have other RHQ Storage Nodes running that the server can access; otherwise, errors will occur when the server attempts to persist data to storage.
$ ./rhqctl stop --storage
Stop the storage node and the server.
$ ./rhqctl stop --storage --server
Stop only the agent.
status
$ ./rhqctl status --help
12:00:06,518 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
usage: rhqctl status [options]
Check status of RHQ services
--agent Check status of RHQ agent
--server Check status of RHQ server
--storage Check status of RHQ storage node
When no options are are specified, rhqctl will report the status of all installed services, indicating whether or not they are running.
--storage
Report the status of the storage node. Log a warning if the storage node is not installed.
--server
Report the status of the server. Log a warning if the server is not installed.
--agent
Report the status of the agent. Log a warning if the agent is not installed.
Examples
Report the status of the storage node.
$ ./rhqctl status --storage
Report the status of the storage node and the server.
$ ./rhqctl status --storage --server
Report the status of the agent.
$ ./rhqctl status --agent
console
$ ./rhqctl console --help
12:00:55,501 INFO [org.jboss.modules] JBoss Modules version 1.2.0.CR1
usage: rhqctl console [options]
Starts an RHQ service in the foreground. Only --server or --storage is
supported. To start the agent in the foreground, use the
<RHQ_AGENT_HOME>/bin/rhq-agent.(sh|bat) script.
--server Start the RHQ server in the foreground
--storage Start the RHQ storage node in the foreground
The console command is different from the start command in that it requires you to specify one and only one component to start. When no options are specified or when multiple options are specified, rhqctl just displays the usage message shown above.
--storage
Start the storage node in the foreground. Log a warning if the storage node is not installed or if it is already running.
--server
Start the server in the foreground. Log a warning if the server is not installed or if it is already running.
--agent
The --agent option is not yet fully implemented and therefore not a valid option. See BZ 970953