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.
Use the subscription created for an event for one Google Cloud integration, only.
- 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.
- Select the Delivery Type as Pull. Enter Acknowledgment Deadline as 600 (Recommended). The subscription is created.
- From the navigation menu on the left pane, go to Logging. Create sink from Logs Router with Sink Service as pub/sub and Sink Destination as the topic created before.
- It is recommended to enter the Advanced Filter as severity=NOTICE.
Note: Events matching only the filters specified while creation of export will be sent to the sink(pub/sub topic).
GCP is now configured to send events.
Perform below steps to configure Google Events Streaming in OpsRamp:
- Login to OpsRamp account with your credentials.
- Select a client.
- Go to Setup > Integration and Apps > Integrations.
- Select installed Google Cloud integration.
- In the Discovery Profiles, Edit the profile for which you want to add the Google Cloud event subscription name.
- Under Perform Actions, select Stream Google Events.
- Paste the Google Cloud event subscription name in Google Cloud Platform Event Subscription name field as shown below: