The Red Hat Enterprise Virtualization Manager installation includes a log collection tool. This allows you to easily collect relevant logs from across the Red Hat Enterprise Virtualization environment when requesting support.
The basic syntax is of the form:
Usage: rhevm-log-collector [options]
list
[all, clusters, datacenters]
rhevm-log-collector [options]
collect
The two supported modes of operation are list
, and collect
.
The list
parameter lists either the hosts, clusters, or data centers attached to the Red Hat Enterprise Virtualization Manager. You are then able to filter log collection based on the listed objects.
The collect
parameter performs log collection from the Red Hat Virtualization Manager. The collected logs are placed in an archive file under the /tmp/logcollector
directory. The rhevm-log-collector
command outputs the specific filename that it chose to use when log collection is completed.
The default action taken if no parameters are provided is to list available hosts along with the data center, and cluster, to which they belong. Where necessary the log collector will prompt you to enter usernames and passwords required to retrieve logs.
The rhevm-log-collector
command has a large number of options. You can use these options to further refine the scope of log collection.
General Options
--version
Displays the version number of the command in use, and exits immediately.
-h
, --help
Displays command usage information, and exits immediately.
--conf-file=PATH
Sets PATH
as the configuration file the tool is to use.
--local-tmp=PATH
Sets PATH
as the directory to which retrieved logs are to be saved. Default is /tmp/logcollector
.
--ticket-number=TICKET
Sets
TICKET
as the ticket, or case number, to associate with the
SOS report.
--upload=FTP_SERVER
Sets
FTP_SERVER
as the destination for retrieved logs to be sent using
FTP. Do not use this option unless advised to by a Red Hat support representative.
--quiet
Sets quiet mode, reducing console output to a minimum. This is off by default.
--log-file=PATH
Sets PATH
as the log file the command should use for its own log output. Note that this is not to be confused with the --local-tmp
parameter.
-v
, --verbose
Sets verbose mode, providing more console output. This is off by default.
Red Hat Enterprise Virtualization Manager Options
The options in the Red Hat Enterprise Virtualization Manager configuration group are used to specify the manager authentication details and, filter log collection from one or more virtualization hosts. Note that it is possible to combine the options used to select the virtualization hosts, for example selecting all host in clusters A
and B
where the name of the host matches pattern SalesHost*
.
--no-hypervisors
Sets the option to skip collection of logs from the virtualization hosts.
-u USER
, --user=USER
Sets the username to log in as to USER
. This must be a username that exists in directory services, and is known to the Red Hat Enterprise Virtualization Manager. The user must be specified in the format user
@domain
, where user
is replaced by the username, and domain
is replaced by the directory services domain in use.
-r FQDN
, --rhevm=FQDN
Sets the Red Hat Enterprise Virtualization Manager to connect to as FQDN
. FQDN
must be replaced by the fully qualified domain name of the manager. By default it is assumed that the log collector is being run on the same machine as the manager. Therefore the default value for this parameter is localhost
.
-c CLUSTER
, --cluster CLUSTER
Collect all logs from the Red Hat Enterprise Virtualization Manager, as well as virtualization hosts in the cluster named CLUSTER
. The cluster(s) for inclusion must be specified in a comma separated list of cluster names or match patterns.
-d DATACENTER
, --data-center DATACENTER
Collect all logs from the Red Hat Enterprise Virtualization Manager, as well as virtualization hosts in the data center named DATACENTER
. The data center(s) for inclusion must be specified as a comma separated list of data center names or match patterns.
-H HOSTS_LIST
, --hosts=HOSTS_LIST
Collect all logs from the Red Hat Enterprise Virtualization Manager, as well as virtualization hosts included in
HOSTS_LIST
. The hosts for inclusion must be specified as a comma separated list of hostnames, fully qualified domain names, or
IP addresses. Match patterns for each type of value are also valid.
SOS Report Options
The
JBoss SOS plugin is always executed by log collector. To activate data collection from the
JMX console the
--java-home
,
--jboss-user
, and
jboss-pass
parameters must also be provided.
--jboss-home=JBOSS_HOME
JBoss installation directory path. Default is
/var/lib/jbossas
.
--java-home=JAVA_HOME
Java installation directory path. Default is /usr/lib/jvm/java
.
--jboss-profile=JBOSS_PROFILE
Quoted and space separated list of server profiles. This is used to limit log collection to the specified profiles. The default is 'rhevm-slimmed'
.
--enable-jmx
Enable the collection of run-time metrics from Red Hat Enterprise Virtualization's
JBoss JMX interface.
--jboss-user=JBOSS_USER
JBoss JMX invoker user to be used with twiddle. Default is
admin
.
--jboss-logsize=LOG_SIZE
Maximum size for each log file retrieved, in
MB.
--jboss-stdjar=STATE
Sets collection of
JAR statistics for
JBoss standard
JARs. Replace
STATE
with
on
, or
off
. The default is
on
.
--jboss-servjar=STATE
Sets collection of
JAR statistics from any server configuration directories. Replace
STATE
with
on
, or
off
. The default is
on
.
--jboss-twiddle=STATE
Sets collection of twiddle data on, or off. Twiddle is the
JBoss tool used to collect data from the
JMX invoker. Replace
STATE
with
on
, or
off
. The default is
on
.
--jboss-appxml=XML_LIST
Quoted and space separated list of applications whose
XML descriptions should be retrieved. Default is
'all'
.
SSH Configuration
--ssh-host=PORT
Sets
PORT
as the port to use for
SSH connections with virtualization hosts.
-k KEYFILE
, --key-file=KEYFILE
Sets
KEYFILE
as the public
SSH key to be used for accessing the virtualization hosts.
--max-connections=MAX_CONNECTIONS
Sets
MAX_CONNECTIONS
as the maximum concurrent
SSH connections for logs from virtualization hosts. The default is
10
.
PostgreSQL Database Options
The log collector connects to the Red Hat Enterprise Virtualization Manager database and dumps it for inclusion in the log report if pg-pass
is specified. The database username, and database name also must be specified if they were changed from the default values during installation.
Where the database is not on the local machine set the
pg-dbhost
, and optionally supply a
pg-host-key
, to collect remote logs. The PostgreSQL
SOS plugin must be installed on the database server for remote log collection to be successful.
--no-postgresql
Disables collection of database. Database collection is performed by default.
--pg-user=USER
Sets USER
as the username to use for connections with the database server. The default is postgres
.
--pg-dbname=DBNAME
Sets DBNAME
as the database name to use for connections with the database server. The default is rhevm
.
--pg-dbhost=DBHOST
Sets DBHOST
as the hostname for the database server. The default is localhost
.
--pg-host-key=KEYFILE
Sets KEYFILE
as the public identity file (private key) for the database server. This value is not set by default as it is not required where the database exists on the local host.