Google Cloud Platform
3 min
configure an account view permission for container cluster management to pull data from google cloud platform configure gcp for in the context of google cloud platform support, also supports google cloud monitoring tools access rights the project (account) should have a service account of that particular project, and have access or at least project viewer role and, create new key in json format is useful to create or configure to pull data from google cloud platform the google cloud platform requires the following steps to create a key respective service account step 1 navigate to the google cloud platform console at https //console cloud google com step 2 select the project that you want to monitor note down the project id step 3 confirm that the correct project is open on the dashboard step 4 from the left navigation pane, select & admin > service accounts step 5 select create account on the service accounts page the create service account dialog box is displayed enter the account name step 6 on the service accounts page, in role, select the project > viewer role step 7 optionally, grant users access to this service account and finalize by selecting done step 8 now, you will be redirected to the service accounts page here, select the service account's email address that you have created step 9 select the keys tab step 10 click the add key drop down menu, then select create new key step 11 select json as the key type and select create selecting create downloads a service account key file after you download the key file, you cannot download it again at this point you have successfully configured gcp to exchange data with once all configuration steps have been completed at a cloud provider level, you will need to configure the tenant in order to continue with the data exchange for container cluster management complete configuration on the cloud provider console step 1 from the tenant landing page, select the main menu or the manage tile step 2 select admin and then, select step 3 on the screen, select the connections tab from the left panel step 4 select the add new drop down menu step 5 select the add a connection step 6 select the technology category as cloud provider step 7 select gcp step 8 enter the project id and service key from the gcp account referred to in the previous section step 9 validate your credentials by selecting test connection step 10 once the connection is successful, select add to create a connection note the visuals featured in this content were posted in april 2022 this implies that if you attempt these setups, kyndryl is not liable or responsible for any errors or omissions caused by third party content changes for image revisions or clarifications, please contact support configuring gcp monitor prerequisite you must create a service account and assign it the following roles or the permissions described on each role (applies to all metricsets) monitoring viewer monitoring metricdescriptors list monitoring timeseries list compute viewer compute instances get compute instances list use the following template to set these roles metricbeat modules \ module gcp period 900s continuous true project id "\<project id>" credentials file path "\<credentials path>" exclude labels false metricsets \ metrics metrics \ service gke service metric prefix kubernetes io/ metric types \ "container/cpu/core usage time" \ "container/cpu/limit cores" \ "container/cpu/limit utilization" \ "container/cpu/request cores" \ "container/cpu/request utilization" \ "container/memory/limit bytes" \ "container/memory/limit utilization" \ "container/memory/page fault count" \ "container/memory/request bytes" \ "container/memory/request utilization" \ "container/memory/used bytes" this template yields the following yaml configuration, containing the query to fetch cpu and memory stats and it is added in cms metricbeat modules \ module gcp period 24h continuous true exclude labels false metricsets \ metrics metrics \ service gke service metric prefix kubernetes io/ aligner align max metric types \ "container/cpu/limit cores", \ "container/cpu/limit utilization", \ "container/cpu/request cores", \ "container/cpu/request utilization", \ "container/memory/limit bytes", \ "container/memory/request bytes", \ "container/memory/used bytes",