Rackspace Cloud Monitoring Integration

Rackspace Cloud Monitoring is a flexible and highly scalable solution that empowers customers to track the health of their infrastructure– including websites, ports, and protocols. The service provides real-time alerts allowing customers to react quickly and help prevent downtime.

What does Opsgenie offer Rackspace users?

With Rackspace Cloud Monitoring, customers easily monitor their infrastructure whether it’s hosted on-premise, off-premise, with any cloud provider, or any location across the globe.

Send Rackspace Cloud Monitoring alerts to Opsgenie to leverage the full support of Opsgenie's notification functionality. Receive Opsgenie notifications through email, SMS, phone call, iPhone and Android push notifications, enrich alerts with extra information using attachment files, and keep track of the whole alert cycle.

Functionality of the integration

  • When an alert is created in Rackspace, an alerted is automatically created in Opsgenie through the integration.

Configuring Rackspace Webhook integration

Rackspace supports email and webhook notification types. Although alerts can be sent via Email, Opsgenie provides a webhook API for Rackspace Cloud Monitoring to create alerts directly in Opsgenie servers. The steps below describe how to integrate Rackspace and Opsgenie using webhook notifications:

  • Create an Opsgenie API Integration, copy the integration apiKey, and update the Rackspace account's "webhook_token" property.
curl -i -X PUT \
-d '{ "webhook_token" : "your_api_integration_key" }' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/account'
  • Create a web hook notification in Rackspace Cloud Monitoring using https://api.opsgenie.com/v1/json/rackspace URL provided by Opsgenie API, and use this notification in your notification plans. Specify the users and/or group of users (comma separated) who are notified by Opsgenie using the "recipients" URL parameter. If not provided, all users are notified.
curl -i -X POST \
-d '{ "details" : { "url" : "https://api.opsgenie.com/v1/json/rackspace?    [email protected],operationsgroup" },
  "label" : "opsgenie web hook",
  "type" : "webhook"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/notifications'

That's all. Now receive Rackspace alerts as SMS, phone calls, iPhone or Android push notifications thanks to Opsgenie's powerful alerting system.

Let's demonstrate the integration with the following simple scenario:

  • Create an entity in Rackspace Cloud Monitoring for a web server running on port 8080.
curl -i -X POST \
-d '{ "ip_addresses" : { "default" : "78.187.83.242" },
  "label" : "My Web Server"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/entities/'
  • Then create an http check
curl -i -X POST \
-d' { "details" : {"method" : "GET",
  "url" : "http://78.187.83.242:8080/"
},
  "label" : "web server status check",
  "monitoring_zones_poll" : [ "mzlon" ],
  "period" : "60",
  "target_alias" : "default",
  "type" : "remote.http"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/entities/en41F9wnvg/checks'
  • Create Opsgenie webhook notification
curl -i -X POST \
-d '{ "details" : { "url" : "https://api.opsgenie.com/v1/json/rackspace?recipients=all" },
  "label" : "opsgenie web hook",
  "type" : "webhook"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/notifications'
  • Create a notification plan using Opsgenie web hook notification
curl -i -X POST \
-d '{
  "label": "Notification Plan 1",
  "warning_state": [
    "ntWArqzcoK"
  ],
  "critical_state": [
    "ntWArqzcoK"
  ],
  "ok_state": [
    "ntWArqzcoK"
  ]
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/notification_plans'
  • and finally create an alarm with a notification plan, for HTTP error codes coming from a web server.
curl -i -X POST \
-d '{ "check_id" : "chTfxuO8lm",
  "criteria" : "if (metric[\"code\"] regex \"^[23]..$\") { return OK } return WARNING",
  "notification_plan_id" : "npMuW2B1YL"
}' \
-H 'X-Auth-Token: rackspace_auth_token' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
'https://monitoring.api.rackspacecloud.com/v1.0/1234/entities/en41F9wnvg/alarms'

When the web server is shut down, Rackspace Cloud Monitoring detects the failure and creates an Opsgenie alert like the following:

Updated 10 months ago


Rackspace Cloud Monitoring Integration


Rackspace Cloud Monitoring is a flexible and highly scalable solution that empowers customers to track the health of their infrastructure– including websites, ports, and protocols. The service provides real-time alerts allowing customers to react quickly and help prevent downtime.

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.