GCP
Get Google Cloud Platform (GCP) Logs and metrics. Create/View/Modify/Delete GCP log metrics.
Description
GCP integration gives you view the logs from GCP and the resources created in it. You can also Create/View/Modify/Delete GCP log metrics and run your cloud sql queries.
Installation
Helm Config
Below is sample configuration for enabling gcp integration through Helm Chart Values file
gcp:
disabled: false
default_project: project
default_zone: "us-central1-a"
host_data:
test-id:
db_user: "test-user"
db_pwd: ""
db_name: "testDB"
db_tcp_host: "35.225.52.185"
db_port: "3306"
db_driver: "mysql"
- disabled tag can be set to true to temporarily disable the service without removing the config
- multiple clusters can be added under tag "host_data"
Direct Config
To integrate with GCP, you need to enable the gcp module and service in maira-gateway with the following configuration, to use gcloud queries additionally add system ip address to gcp console connection network:
modules:
- name: maira_io.module.gcp
services:
- name: maira_io.service.gcp
typed_config:
"@type": types.google.com/maira_io.config.service.gcp.v1.Config
default_project: project-1
default_zone: "us-central1-a"
host_data:
test-id:
db_user: "test-user"
db_pwd: ""
db_name: "testDB"
db_tcp_host: "IP Address"
db_port: "3306"
db_driver: "mysql"
Authentication
If maira-gateway is running on GCP, then the best way to authenticate is to enable workload identity in GCP and give appropriate permissions to the service account used for maira-gateway.
More info here: https://cloud.google.com/kubernetes-engine/docs/how-to/workload-identity
If the agent is not running on GCP, or you don't want to use workload identity, you can provide application credentials by following the below steps.
- Install gcloud in your system.
- Run "gcloud auth application-default login" and login into your google account.
- This command places a JSON file containing your credentials in a well-known location on your file system.
- The location depends on your operating system:
Linux, macOS: $HOME/.config/gcloud/application_default_credentials.json Windows: %APPDATA%\gcloud\application_default_credentials.json
More information is available at https://cloud.google.com/docs/authentication/provide-credentials-adc