The
get-logs command collects requested log files and
compresses them to a single zip file.
To obtain components logs, run the following from the Admin Server:
./bdd-admin.sh get-logs [option <arg>] <file>
Where
<file> defines the absolute
path to the output zip file. This file must not exist and must include the
.zip file extension.
get-logs supports the following options.
Option
|
Description
|
-t, --time
<hours>
|
When specified, the script returns the logs
that were modified within the last
<hours> hours.
If this option is omitted, the script returns the most
recently updated log file for each component.
|
-c, --component
<component(s)>
|
A comma-separated list of the component
logs to collect:
- agent: Dgraph HDFS
Agent logs
- all: All component
logs
- clustering:
Clustering Service (if enabled)
- dgraph: Dgraph logs
(includes the FUSE log, if FUSE is enabled)
- dg-on-crash: Dgraph
on-crash tracing logs
- dg-on-demand: Dgraph
on-demand tracing logs
- dp: Data Processing
logs
- gateway: Dgraph
Gateway logs
- spark: Spark logs
- studio: Studio logs
- transform: Transform
Service
- weblogic: WebLogic
Server logs
- zk-log: ZooKeeper
logs
- zk-transaction:
ZooKeeper transaction logs
Note the following:
- The
spark,
zk-log, and
zk-transaction components will prompt for
the username and password for Cloudera Manager/Ambari/MCS if the
BDD_HADOOP_UI_USERNAME and
BDD_HADOOP_UI_PASSWORD environment
variables aren't set.
- The
dg-on-demand log is only generated when
the
get-blackbox command is run. This means
that if the
-t option is specified,
get-logs only returns the
dg-on-demand log if
get-blackbox was run during the specified
time frame. And if the
-t option is omitted,
get-logs won't return the
dg-on-demand log if
get-blackbox has never been run.
|
-n, --node
<hostname(s)>
|
A comma-separated list of the nodes to run
on. Each must be defined in
bdd.conf.
|
If no options are specified, the script obtains the most recently
updated logs for all components except
dg-on-crash,
dg-on-demand, and
zk-transaction.
Examples
The following command obtains the most recently modified logs for all
supported components and outputs them to
/localdisk/logs/all_logs.zip:
./bdd-admin.sh get-logs -c all /localdisk/logs/all_logs.zip
The following command obtains all
zk-log and
zk-transaction logs modified within the last 24 hours
and outputs them to
/localdisk/logs/zk_logs.zip:
./bdd-admin.sh get-logs -t 24 -c zk-log,zk-transaction /localdisk/logs/zk_logs.zip