OpsRamp consumes GCP events through Pub/Sub. Pub/Sub is an asynchronous messaging service from GCP that decouples services that produce events and process events. You can use Pub/Sub as messaging-oriented middleware or event ingestion and delivery for streaming analytics pipelines. OpsRamp supports the instant discovery of Google Cloud Platform (GCP) events, as and when the events are created. Unlike scheduled discovery, where you need to schedule discovery of create/update/delete events from GCP, the event-based discovery helps you discover resources in real-time.
This document outlines the configurations required in GCP and OpsRamp to discover and stream the events.
- Create a project.
- Enable cloud Pub/Sub API for the project.
Events are the occurrences that happen in your cloud environment and requires your action.
To configure events:
Log in to your Google Cloud account as an administrator.
From the navigation menu in the left pane, go to the Big Data section and click Pub/Sub.
On the Pub/Sub screen, click CREATE TOPIC. For instructions, see Google Cloud documentation on creating a topic.
Add a subscription to the topic you just created. For instructions, see Adding a subscription. You need the subscription name while creating a discovery profile to allow OpsRamp to consume events.
Enter Acknowledgment Deadline as 600 (Recommended). The subscription is created.
From the navigation menu on the left pane, go to the Stack Driver section and click Logging.
On the Stack Driver Logging page, click CREATE EXPORT.
Expand the filter options and select Convert to advanced filter.
Enter the following details and click Create Sink:
- Sink Service: pub/sub
- Sink destination: Name of the topic you created
- Filter: severity=NOTICE (Mandatory)
Use the subscription created for an event for only ONE Google Cloud integration in OpsRamp.
GCP is now configured to send you events on OpsRamp.