lbcli fetch logs
Fetches all Lightbits services logs from the local api-service server (the local server, or the server that --endpoint points to).
lbcli fetch logs [flags]
Example:
x
# Fetch logs from endpoint at 10.17.169.4:443 to local file: /server_logs/logs.tar.gz
lbcli fetch logs --endpoint=https://10.17.169.4:443 --path=/server_logs/logs.tar.gz
# gather 30 days of logs and adds hostname to filename
lbcli fetch logs --endpoint=https://10.17.169.4:443 -l month-$(hostname -s) -s 30 --path=/server_logs/logs.tar.gz
Note: The default timeout for the command is 20m0s; use the command-timeout flag to overwrite the value.
# gather logs from all servers in the cluster
lbcli fetch logs --path=/servers_logs --servers-list=all
# gather logs from a list of servers
lbcli fetch logs --path=/servers_logs --servers-list=server00,server01
Flag | Short | Type | Default | Description |
---|---|---|---|---|
--capture-cpu-and-tcpdump | -c | bool | Capture CPU and tcpdump stats for 5 seconds to tcpdump.cap + sar.log in network/<interfaces>/. | |
--collect-services-lbcli-etcd | -C | bool | Collect services info, lbcli and etcd dump only. | |
--do-not-collect-var-log | -N | bool | Do not collect /var/log. | |
--dont-compress-output | -z | bool | Do not compress the output tar file. Default is gzip but can switch to xz with -x flag. | |
--interval-between-BE-read-cycles | -i | unint32 | Interval in seconds between FE/BE statistics captures. | |
--io-nice | -p | bool | Set nicest IO / CPU priority on most commands via 'ionice -c 2 -n 7 nice -n 19'. Default: ''ionice -c 2 -n 7' | |
--log-filename | -L | string | Log filename prefix for convenience (do not use spaces). | |
--num-days-to-collect-logs | -s | uint32 | Number of days back to collect the logs. | |
--num-of-statistics-to-capture | -n | uint32 | 1 | Number of FE/BE statistics to capture. |
--use-high-compression | -x | bool | If compressing, use stronger xz compression instead of gzip. File extension will be txz instead of tgz. | |
--path | String | The path to the logs file that the command will create (required). Must end with '.tar.gz'. If the file exists, the command will fail. | ||
--help | -h | bool | Help for logs. | |
--skip-statistics | bool | Do not capture Lightbits software information. | ||
--servers-list | stringSlice | List of servers for logs collection. Use servers-list=all for collecting logs from all servers in the cluster, and --path flag for logs location. |
Was this page helpful?