gcloud compute ssh <machine_name> - tunnel-through-iap
mkdir m4a && cd m4a
curl -O "https://mfit-release.storage.googleapis.com/$(curl -s https://mfit-release.storage.googleapis.com/latest)/mfit"
chmod +x mfit
The collector tools works complimentary to the assessment tool. It collects the required data and creates a tar file to be assessed. If you have multiple machines to be assessed, you can install the collector on all of them, install the assessment tool in a host machine with ssh access to the other machines, and run the assessment from one single machine.
curl -O "https://mfit-release.storage.googleapis.com/$(curl -s https://mfit-release.storage.googleapis.com/latest)/mfit-linux-collect.sh"
chmod +x mfit-linux-collect.sh
sudo ./mfit-linux-collect.sh
./mfit assess sample <file-generated-after-data-collection>.tar - format json > app-mfit-report.json
Copy this report into your cloudshell and then download it into your local machine using this command –
gcloud compute scp - tunnel-through-iap \ <machine_name>:~/m4a/app-mfit-report.json ${HOME}/
cloudshell download app-mfit-report.json
You have downloaded the JSON (not so pretty) version of the report. The rest of the work is to be done in the GCP console.