Figure: Optimizing GCP Compute Engine Processes
Figure: Optimizing GCP Compute Engine Processes

- Data Collection—Collect GCP data into Densify. Use the Densify API or the Densify Console to initiate this process.
- Analysis—Analyze collected data based on pre-defined policies to make recommendations. The analysis process is initiated automatically after data collection completes. Results can be immediately pulled from the Densify API or pushed to a webhook URI once the analysis is complete.
- Reporting Database Update—Update reporting database tables with analysis results for reporting. The reporting database update process is scheduled to run nightly after the analysis refresh is completed. The Densify Console GCP optimization opportunity report and the Impact Analysis and Recommendation reports are available after the reporting database update is complete.
Before you can collect GCP cloud infrastructure data in Densify, you need to create a GCP service account with services enabled and permissions configured. See Google Cloud Platform Data Collection Prerequisites for details.
- From the Densify API: Authenticate using JWT—Retrieve a token to authenticate each API call.
- Collect GCP data through the Densify API or the Densify Console. See Configuring a Google Cloud Platform Connection for details. After data collection completes, an analysis is initiated for each project associated with the GCP account configured for data collection.
- API: List All GCP Analyses—Query for the analysis entity of each project for which data was collected (from step 1). You can use the returned analysis entity to check for status and recommendations.
- API: Poll for Analysis Status—Check for data collection and analysis status. The recommendations are available when analysis is complete.
- API: Download Results to Apply Recommendations—Retrieve recommendations for actioning or forward to orchestration engine. Alternatively, you can Add a Webhook to an Existing GCP Analysis to push recommendations to an external URI once the next analysis process completes.
- API/Console (optional): Download Impact Analysis and Recommendation Instance Report for system owners. This can achieved from the Densify API or from the Densify Console. SeeViewing the Impact Analysis and Recommendation Report for details on the content of the report.
- Console (optional alternative): Review GCP Virtual Machine optimization opportunity report from the Densify Console. See GCP for details. The optimization opportunity report is available after the nightly reporting database update.
- Console (optional): Review GCP optimization policy settings used during analysis. Contact Support@Densify.com for details.
Postman Collection
Densify provides a Postman collection of sample API requests for working with your public cloud environments. See the Postman Collection.Authenticate using JWT
Use the/authorize
resource to retrieve an authenticated token to make subsequent API calls. See Authorize for details. By default, the token expires in 5 minutes, therefore you will need to ensure that you have an active token for each Densify API request.
Example: Retrieving an Authenticated Token
Example: Retrieving an Authenticated Token
Request:Response:Use the
POST /authorize
apiToken
value in your Authorization request header for subsequent Densify API calls.Initiating GCP Data Collection and Analysis
The following example shows you how to initiate GCP data collection and analysis, and send the results to a WebHook. See Analysis GCP Analyze for details.Example: Initiating GCP Data Collection and Analysis
Example: Initiating GCP Data Collection and Analysis
Request:Response:
POST /analysis/gcp/analyze
List All GCP Analyses
To see a list of all GCP analyses currently in Densify, use the/analysis/cloud/gcp
resource. See List all analyses for a particular platform and vendor for details of the resource operation.
Example: List all Saved GCPAnalyses
Example: List all Saved GCPAnalyses
Request:Response:
Poll for Analysis Status
Use the"analysisStatus"
resource element from the List All GCP Analyses response to poll for status of the data collection and analysis. See Check for analysis status for details of the resource operation. The analysis is complete and recommendations are available when "analysisStage": "Completed"
.
Example: Checking GCP Analysis Status
Example: Checking GCP Analysis Status
Request:Response:
Add a Webhook to an Existing GCP Analysis
You can add a webhook definition to an existing GCP analysis. The analysis will push the optimized results to the specified webhook URI. See Add webhook to an analysis for details on adding a webhook.Example: Adding a Webhook Definition to an Existing GCP Analysis
Example: Adding a Webhook Definition to an Existing GCP Analysis
Request:Response:
POST /webhook/analysis/cloud/gcp/cf25d8c1-4fdf-42b1-b3a3-1a8d8a425d13
Download Results to Apply Recommendations
Use the/analysis/cloud/gcp/<analysisId>/results
resource to retrieve recommendation results and forward to orchestration engine. See Analysis: GCP Recommendations for details.
Example: Returning GCP Recommendations in Terraform-map
Example: Returning GCP Recommendations in Terraform-map
Request:Headers:
Download Impact Analysis and Recommendation Instance Report
Use therptHref
resource element provided in the instance recommendation output to download a PDF Impact Analysis and Recommendation Report for each instance. This report is available after a reporting database update, which is scheduled to run nightly. See rptHref and Example: Downloading an Impact Analysis and Recommendation Report for details.
Example: Downloading an Impact Analysis and Recommendation Report
Example: Downloading an Impact Analysis and Recommendation Report
Request:Headers: