GCP
Access the Page
Log in to Sysdig Secure and select Integrations > Cloud Accounts | GCP from the navigation bar. The GCP Cloud Accounts overview appears.
Review GCP Cloud Accounts
The page lists:
Project: GCP Project ID, followed by a Project Name if one was assigned
Status: The connection status of each Sysdig Secure feature you chose to connect.
Possible values:
Unknown
,Partial Error
,Error
,Connected
.See also: Validate Account Connection
Last Checked: Time at which a feature was last validated (updated every 24 hours)
Org Domain: ID of the Organization to which the Project belongs, if applicable
Added On: Date the account was added to Sysdig Secure
Validate Account Connection
Use the Status column to validate the onboarding status of each feature you chose to connect.
The validation is run every 24 hours.
- Select Integrations > Cloud Accounts | GCP and select a row to open a detail panel.
- Review the connection status of each feature and follow the prompts to resolve any errors or unknowns as needed.
Status Value | Description |
---|---|
Connected | All selected features were successfully onboarded and connected. Features that were not selected during the onboarding show as Not Enabled . |
Partial Error | At least one selected service did not successfully connect. |
Error | No selected features successfully connected. |
Unknown | Sysdig cannot determine the current status of the feature/ account. |
NOTE: In the case of connection errors, if you remediate them the status will be updated on the page when the validation is run again, up to 24 hours later.
Add GCP Account
To connect an account, click + Add GCP Account, and then follow the installation pop-up wizard.
See also: Connect Cloud Account | GCP in the Installation documentation.
Detect all GCP Instances
Use the following script to detect all the GCP instances of a project across your entire GCP organization. You can use this information, for example, to count all the places you may want to install an agent.
You can use this along with the Sysdig Agents overview page.
Run the following script to print out the number of instances in the project, and download a CSV file with the information.
echo "id,name,machine_type" > gcloud.csv
for PROJECT in $(gcloud projects list --format="value(projectId)")
do
gcloud compute instances list --project $PROJECT --format="csv(
id,
name,
machineType
)" --quiet 2> /dev/null | grep -v "id,name" >> gcloud.csv
done
echo "Count of instances in all projects: $(cat gcloud.csv | tail -n +2| wc -l)"
The terminal entry displays the count similar to the following:
Count of instances in all projects: 21
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.