Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Contents

Table of Contents
minLevel1
maxLevel3

...

Expand the Access keys (access key ID and secret access key) section as shown below

Image RemovedImage Added

Choose Create New Access Key. If this option is not available, then you already have the maximum number of access keys. You must delete one of the existing access keys before you can create a new key. For more information, see IAM Object Quotas in the IAM User Guide.

...

  1. Navigate to Billing

  2. Navigate to cost and usage report

  3. Create a report based by hitting on the create report button

Image RemovedImage Added

This will create a new report creating wizard with 3 steps to create a report that will capture all the cost and other data based on frequency of selection(Hourly, Daily and Monthly) the cost of capturing the report is free of cost.

...

In the first step, user may have to provide name of the report as given below in the screenshot for reference

Image RemovedImage Added

In the second step need to configure either an existing bucket or create a new one to store the report. The report can be versioned or overwrite the existing one. Finally the report has to selected as a GZIP file type for our processing

...

Image RemovedImage Added

Image RemovedImage Added

In the final step review and complete all the details.

...

  • Login to Azure portal using https://portal.azure.com/

  • In Search box for type Azure Active Directory.

  • Select Tenant Id from page

  • If you have multiple tenants from the overview page click on Manage Tenants to get the Tenant Id of a specific tenant.If you need the Tenant Id of the default Tenant you can get it from the Overview page itself.

Image RemovedImage Added

Anchor
_Toc121509685
_Toc121509685
1.3 Capture ClientId

...

  • Login to Azure Portal if you are not already logged in.

  • Search for Azure Active Directory

  • From left Menu of Azure Directory -> click App Registration -> Click the name of the application created in the previous step.

  • From the left menu of selected application -> click Certificates & secrets

  • Click on New Client Secret from right side pane -> Add description and expiration in Add a Client Secret screen -> Click Add button.

  • Copy Value field, do not copy a secret key

Image RemovedImage Added

Anchor
_Toc121509687
_Toc121509687
1.5 Assign Permission to Subscription to extract cost data

...

  • Login to Azure Portal if you are not already logged in.

  • Search for Subscription

  • Go to Access Control

  • Click ADD

  • Go to Add Role Assignment

  • Select role Contributor

  • Go to Next tab Member

  • Select User, Group, Service Principle

  • Click on add member

  • Type application name that created as part of extract ClientId (Azure AD App registrations)

  • Click on review and assign buttonand save it

  • Do this activity for all Subscriptions orits parent Hierarchy

Image RemovedImage Added

Anchor
_Toc121509688
_Toc121509688
Anchor
_Toc122539766
_Toc122539766
Configure Azure FinOps Agent

...

To configure this agent, you need following basic configuration in config. Json, in prerequisite these are already capture

"azureSubscriptionId",

"azureTenantId",

"azureClientId",

"azureSecretkey"

Thereare following section in dynamic template, user may modify these based on need, these sections are

...

To configure this agent, user need following token information

"azureSubscriptionId",

"azureTenantId",

"azureClientId",

"azureSecretkey",

"storageAccountUrl",

"storageAccountKey",

"containerName",

"storageConnectionString"

SubscriptionId

Please refer “Azure FinOps Agent with REST API” prerequisite section

...

get it from above section Security + networking -- > Access keys Key1 or any -- > Connection string

Anchor
_Toc121509692
_Toc121509692
Anchor
_Toc122539770
_Toc122539770
Configure Azure FinOps Agent

...

View file
nameFinOps_Cloud Cost Analysis_Combined_AWS_Azure.json
View file
nameAzure FinOps Dashboard.json
View file
nameAWS Finops.json

Anchor
gcp
gcp
GCP

  • Anchor
    isMissingRequiredParameterstrue
    Pre-requisite

  1. Create a service account with access to project. Save the credentials json file for the service account we need to add this json file in agent directory later.

    Image Added

2. Enable access to below mentioned APIs in google cloud console.

BigQuery API
BigQuery Migration API
BigQuery Storage API
Cloud Asset API
Cloud Billing API
Cloud Billing Budget API
Cloud Datastore API
Cloud Debugger API (Deprecated)
Cloud Logging API
Cloud Monitoring API
Cloud OS Login API
Cloud Resource Manager API
Cloud SQL
Cloud Storage
Cloud Storage API
Cloud Trace API
Compute Engine API
Google Cloud APIs
Google Cloud Storage JSON API
IAM Service Account Credentials API
Identity and Access Management (IAM) API
Recommender API
Service Management API
Service Usage API

3. Export Billing detailed usage report

...

4. After 24hrs validate if the billing data is getting populated in bigquery table. Please note down the name of GCP billing table we need to add it in GCP agent’s config.json file.

View file
nameInvalid file id - b54aff91-049f-4792-b8f8-8cc980f97b47

https://stackoverflow.com/questions/66207627/api-for-getting-daily-costs-related-to-gcp

  • Anchor
    isMissingRequiredParameterstrue
    Python libraries required for GCP agent to execute

pip install db-dtypes google-api-core google-auth google-cloud-asset google-cloud-bigquery google-cloud-bigquery-storage google-cloud-billing-budgets google-cloud-core google-cloud-monitoring google-cloud-recommender google-cloud-python-client

  • Anchor
    isMissingRequiredParameterstrue
    Configure GCP Finops agent

Please update the following fields in agent’s config.json

  1. "datasetdetails": {
    "projectname": {
    "datasetname": "",
    "datareporttablename": ""
    }
    },

Enter projectname, datasetname is the name of big query dataset where the billing report is exported,

datareporttablename is the name of big query table name where billing data is present

2. "recommendationzones": [
"us-west4-b",
"us-central1-a",
"us-central1-b",
"us-central1-c",
"us-central1-f",
"us-east4-a",
"us-east4-b",
"us-east4-c"
],

Add recommended zones for which you need to get recommendations.

3. "credentials": "<path where you are placing the service account config json>”

This is the path were the service account config json is placed.