get-logs

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
  • dg-on-crash: Dgraph on-crash tracing logs
  • dg-on-demand: Dgraph on-demand tracing logs
  • dp: DP CLI logs
  • gateway: Dgraph Gateway logs
  • spark: Spark logs
  • studio: Studio logs
  • transform: Transform Service
  • weblogic: WebLogic Server logs
  • wm: Workflow Manager Service
  • 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.
  • The dp component returns the logs for the DP CLI, and not Data Processing. For information on obtaining the Data Processing logs, see the Data Processing Guide.
-n, --node <hostname(s)> A comma-separated list of the nodes to run on. Each must be defined in $BDD_HOME/BDD_manager/conf/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