GCP Metrics Collection
Kloudfuse integrates with the GCP cloud service to collect metrics.
Complete these tasks to successfully collect metrics:
Create Credentials File
-
In the Google Cloud console, navigate to Menu > IAM & Admin > Service Accounts.
-
Select your service account, or create a new one.
Ensure that the service account has Monitoring Viewer permissions to collect GCP metrics.
-
Select Keys > Add key > Create new key.
-
Select JSON, then click Create.
-
Click Close.
Create Kubernetes Secret
Create a Kubernetes secret from the credentials file. Name the file credentials.json
.
kubectl create secret generic kfuse-sd-secret --from-file=<credentials json file> -n kfuse
Configure Kloudfuse to Collect Metrics
-
Update the helm values using the following configuration.
kfuse-cloud-exporter: Prometheus-stackdriver-exporter: enabled: true stackdriver: httpTimeout: 30s maxRetries: 3 ## gcp project id projectId: "YOUR PROJECT ID" ## create this secret with access credentials to gcp account serviceAccountSecret: kfuse-sd-secret metrics: typePrefixes: "compute.googleapis.com"
yaml -
Update the corresponding
projectId
of the GCP account and update thetypePrefixes
to collect the metrics from relevant services of GCP; see Google Cloud documentation on Google Cloud metrics.