Google Stackdriver provides powerful monitoring, logging, and diagnostics. OpsRamp integration supports to accept incidents from Stackdriver as alerts.

OpsRamp configuration

Step 1: Install the integration

  1. From All Clients, select a client.
  2. Go to Setup > Account.
  3. Select the Integrations and Apps tab.
  4. The Installed Integrations page, where all the installed applications are displayed. Note: If there are no installed applications, it will navigate to the Available Integrations and Apps page.
  5. Click + ADD on the Installed Integrations page. The Available Integrations and Apps page displays all the available applications along with the newly created application with the version.
    Note: You can even search for the application using the search option available. Also yu can use the All Categories option to search.
  6. Click ADD in the Stackdriver application and click Install.
  7. Select authentication type as WEBHOOK and click Save.
  8. Make a note of Tenant ID, Token and Webhook URL.
    These details are used while creating an HTTP Request template during Stackdriver configuration.
  9. Click Save.

Step 2: Configure the integration

  1. From the API tab, enter:
    • Authentication: Copy Tenant Id, Token, and Webhook URL for configuration. These settings are used for creating a HTTP Request template.
    • Map Attributes: Enter the mapping information for the third-party.
  2. From the Monitoring of Integration tab, click Assign Templates.
  3. From the Audit Logs, set up audit log criteria and time frame.

Configuring the map attributes

  1. Select the required OpsRamp property from the drop-down.
  2. Click Add Mapping Attributes to map attributes for the specific OpsRamp alert property.
  3. Click + to define the mappings.
  4. From Create Alert Mappings on Status, define the mappings, parsing conditions, and default values, and Save.

Attributes can be modified at any time.

The following table shows attribute mappings.

Stackdriver PropertyOpsRamp Property
incident.started_atAlert time
incident.stateAlert state
Stackdriver Property ValueOpsRamp Property Value
openCritical
closeOk
incident.policy_nameAlert metric
incident.resource_nameAlert resource name
incident.condition_nameAlert description
incident.summaryAlert subject

Example payload

{
  "incident": {
        "incident_id": "0.kojklrfwei9s",
        "resource_id": "",
        "resource_name": "gce-integration Uptime Monitoring URL labels{host = opsramp.dev-instance.com}",
        "state ": "open",
        "started_at ": 1518762381,
        "ended_at ": null,
        "policy_name ": "Staging Uptime Check Policy ",
     "condition_name ": "Generic HTTPS check on opsramp.dev-instance.com at / login.do ",
     "url ": "https: //app.google.stackdriver.com/incidents/0.kojklrfwei9s?project=gce-integration",
     "summary": "An uptime check on gce-integration Uptime Monitoring URL labels { host=opsramp.dev-instance.com } is failing."
     },
  "version": "1.1"
}

Stackdriver configuration

Step 1: Create Webhook notification

  1. Log into Stackdriver.
  2. Go to Account Settings > Notifications > Webhooks, click Add Webhook.
  3. Configure the Webhook details:
    • ENDPOINT URL: https://{Your_OpsRamp_domain}/integrations/alertsWebhook/{tenantId}/alerts?vtoken={token}
      Enter the TenantId and Token from the OpsRamp configuration.
    • Webhook name: Enter name for Webhook. Example: OpsRamp Webhook
    • Basic Auth: Not required
  4. Click Save. This Webhook is used while creating an Alerting policy.
Configure Webhook

Step 2: Create uptime check

Stackdriver checks the availability of your service by accessing it from different geographical locations. An uptime check periodically makes an automated request to a URL, or a resource on regular basis. If the resource fails to respond to a request sent from at least two geographical locations, then the uptime check fails thereby creating an incident in Stackdriver. The incident is notified to OpsRamp as an alert.

To create an uptime check:

  1. From Uptime Checks, click Add Uptime Check. A New Uptime Check window is displayed.
  2. Configure the following for the check:
    • Title: Enter name for uptime check. Example: OpsRamp Staging
    • Check Type: Select a protocol: HTTP, HTTPS, TCP. Example: HTTPS
    • Resource Type: Select resource type. Example: URL
    • Hostname: Enter the name of the host you want to add uptime check.
      This field is applicable only if the resource type is URL.
    • Path: Enter a path in the host or use the default path.
    • Check every: Select the time-frequency at which the check should send requests to the resource. Example: Five minutes. Each geographic location attempts to reach the resource every five minutes.
    • Click Test to ensure Uptime Check works correctly.
    • Click Save to save the Uptime Check.

Uptime check is created and is available on the Uptime Checks page. Create an alerting policy for the check to send notifications to OpsRamp.

Uptime Check

Step 3: Create alerting policy

Alerting policy is a set of conditions that determine a resource is functioning normally and to send notifications if a problem occurs in the functioning process.

To create an alerting policy:

  1. Go to Uptime Checks, select the required Uptime check, click the Menu icon, and click Create Alerting Policy.
  2. Configure the policy details:
    • Condition: Click Add Condition, select the required Uptime Check condition, enter the details for the check and click Save Condition.
    • Notification: Select Notification type - Webhook and value - configured webhook name. Example: OpsRamp Webhook.
    • Documentation: Not required.
    • Name: Enter a name for alerting policy. Example: Uptime Check Policy.
  3. Click Save Policy. The alerting policy is created and attached to the Uptime Check.

When the configured conditions in the alerting policy are met, an event is triggered thereby creating an incident. The incident is notified to OpsRamp as an alert using the Webhook mechanism. OpsRamp displays the alerts in the Alerts tab.

New Alerting Policy