Collecting and Sending EMRI Logs to Elastifile Support

 

1. Login to the Elastifile Management Server instance by SSH

snir_zana@snir-ems ~$ sudo su - 
root@snir-ems ~#

 

2. Change Directory to /tmp and download the logs_collector.py script

root@snir-ems ~# cd /tmp/
root@snir-ems /tmp# wget https://storage.googleapis.com/elastifile-software-repo/scripts/logs_collector.py

 

3. Run the script in the following way (might take a few minutes to ~hour)

root@snir-ems /tmp# python logs_collector.py -p <ADMIN_PASSWORD>

 

All the required log files should be collected and uploaded to Elastifile support automatically.

An example of a success execution would be:

root@snir-ems /tmp# python logs_collector.py -p password
get_first_cookies
get_uuid
UUID: 95c93ef4-118d-4dbc-93a8-adee01ce9073
create_report_call
task id 72 of create_report_job was created
task id 72 of create_report_job is in in_progress status, waiting...
task id 72 of create_report_job is in in_progress status, waiting...
task id 72 of create_report_job is in in_progress status, waiting...
task id 72 of create_report_job is in success status
downloading report id 9d26b03a-81c0-4b1e-89a8-88c8687af411
file_path: /elastifile/emri/global-report-1612369547.92.tar.gz
uploading_report
Changing file name to 95c93ef4-118d-4dbc-93a8-adee01ce9073_2021-02-03_16-26-47.tar.gz
Copying file:///elastifile/emri/95c93ef4-118d-4dbc-93a8-adee01ce9073_2021-02-03_16-26-47.tar.gz [Content-Type=application/x-tar]...

/ [1 files][  1.6 GiB/  1.6 GiB]
Operation completed over 1 objects/1.6 GiB.
validating uploaded report
report was uploaded successfully

Otherwise, please notify at contact us email support and attach the script log file which is available at: 

/elastifile/log/logs_collection.log

 

Manually collecting EMRI log

This is the procedure in case the upload script fails and manual upload is required.

1. SSH to the EMS instance as root.

2. Login to EMS cli

source /root/elfs_admin

3. Create EMRI report

 elfs-cli system create_report --id 1 --include-control=true --report-type=full
The create time may differ between 10m - 60m

4. List the EMRI reports in the system

elfs-cli system list_reports --id 1
[root@dadee-cluster-a ~(elfs_admin)]# elfs-cli system list_reports --id 1
timestamp         report_id                             report_type  ems_ids  enode_ids           replication_service_ids  size       include_control  description
------------------------------------------------------------------------------------------------------------------------------------------------------------------
Feb 18, 11:59:05  8cbfeb11-8e85-4e86-b903-b7a980ebc0ec  full         [1]      [1, 2, 3, 4, 5, 6]  [1, 2]                   11.887 GB  true

5. Using the report_id from previous  command output, download the report 

elfs-cli system download_report --id 1 --report-id=REPORT_ID --include-control=true --report-type=full
[root@dadee-cluster-a ~(elfs_admin)]# elfs-cli system download_report --id 1 --report-id=8cbfeb11-8e85-4e86-b903-b7a980ebc0ec --include-control=true --report-type=full
/elastifile/emri/global-report-1613653927.41.tar.gz

 

6. Upload the output file to Elastifile support logs bucket 

gsutil -m cp /elastifile/emri/EMRI_FILE_NAME.tar.gz gs://elk-cs-logs/CUSTOMER_NAME/DATE/

root@dadee-cluster-a ~# gsutil -m cp /elastifile/emri/global-report-1613653927.41.tar.gz gs://elk-cs-logs/CUSTOMER_NAME/DATE/
Copying file:///elastifile/emri/global-report-1613653927.41.tar.gz [Content-Type=application/x-tar]...
==> NOTE: You are uploading one or more large file(s), which would run
significantly faster if you enable parallel composite uploads. This
feature can be enabled by editing the
"parallel_composite_upload_threshold" value in your .boto
configuration file. However, note that if you do this large files will
be uploaded as `composite objects
<https://cloud.google.com/storage/docs/composite-objects>`_,which
means that any user who downloads such objects will need to have a
compiled crcmod installed (see "gsutil help crcmod"). This is because
without a compiled crcmod, computing checksums on composite objects is
so slow that gsutil disables downloads of composite objects.

\ [0/1 files][637.6 MiB/ 11.9 GiB]   5% Done  33.8 MiB/s ETA 00:05:41

Was this helpful?
How can we improve it?