Introduction
Google Cloud Platform (GCP), is a suite of cloud computing services that runs on the same infrastructure that Google uses internally for its end-user products.
Note
Metric timestamps in OpsRamp may differ from those reported in the cloud console.Prerequisites
- Service Account Management Certificate (JSON or P12 key/credentials)
- Management Certificate PassPhrase
GCP configuration for event-based discovery (optional)
OpsRamp supports the instant discovery of Google Cloud Platform (GCP) events, as and when the events are created.
Event-based discovery helps discover resources in real-time by streaming create and delete event actions between GCP and OpsRamp.
Event-based discovery is implemented by subscribing to the events. Once subscribed, event notification occurs.
Configuring event discovery involves:
- Creating topics that correspond to events.
- Creating subscriptions for topics.
- Creating exports
Important
After subscription, the event subscription name is provided to OpsRamp in the GCP integration’s discovery profile. The configuration setting is located in the Google integration’s Discovery Profile > Stream Google Events > Google Event Subscription Name.Prerequisites and considerations
- A project must be created in GCP.
- The Cloud Pub/Sub API must be enabled for the project.
- A subscription created for an event must be used for only one Google Cloud integration in OpsRamp.
Step 1: Create a topic
Topics receive messages sent by publishers corresponding to the events.
To create a topic:
- Log into GCP as administrator.
- From Navigation Menu, go to Big Data > Pub/Sub, and click Create Topic
- Provide a topic name and click CREATE. The topic you created appears in the topics list.
Step 2: Create a subscription
Subscription represents the stream of messages from a single, specific topic, to be delivered to the subscribing application.
To create a subscription for the topic:
- From the Topics list, click the topic you created.
- From Subscriptions, click CREATE SUBSCRIPTION.
- Provide the following details and click Create.
- Subscription name: Provide a name
- Delivery Type: Pull
- Acknowledgment Deadline: 600 (Recommended)
Step 3: Create an export
To create an export:
- Go to Stack Driver > Logging and click CREATE EXPORT.
- Expand the Filter options and select Convert to advanced filter.
- Provide the following:
- Sink Service: pub/sub
- Sink destination: Name of the topic you created Filter: severity=NOTICE (Mandatory)
- Click Create Sink. Events matching the filter criteria are sent to the sink (pub/sub topic).
OpsRamp configuration
Configuration involves:
- Configuring the integration.
- Adding a discovery profile.
Step 1: Configure the integration
To integrate:
- From All Clients, select a client.
- Go to Setup > Integrations > Integrations.
- From Available Integrations, select Public Cloud > Google and click Install.
- Provide the following:
- Name
- Service Account Email
- Project Id
- Service Account Management Certificate
- Management Certificate PassPhrase
- Click Install.
Step 2: Add a discovery profile
To add a discovery profile:
- From the integration, click Add.
- Provide the following:
- Profile Details.
- Profile name
- Filter Criteria
- Smart filters: Use to filter resources based on the resource type.
- Resource filters: Use to filter resources based on certain resource attributes.
- Perform Actions:
- Manage Device
- Collect Cost Analytics: Provide GCP bucket name.
This option collects project cost details for the services and resources utilized. - Stream Google Events.
- Assign Gateway Management Profile
- Perform Agent Action
- Agent Type: Direct or Proxy. If Proxy, select gateway profile.
- Install Agent (Linux only)
- Discovery schedule. Based on the settings, discovery is triggered based on the scheduled time. New resources added to the environment are automatically discovered.
- Profile Details.
- Click Save.
- From the Discovery Profiles section, click Scan Now for the associated profile.