• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with Rackspace Cloud Monitoring

Rackspace cloud

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 data centers. 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.

1 2 3 4 5 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.

1 2 3 4 5 6 7 8 curl -i -X POST \ -d '{ "details" : { "url" : "https://api.opsgenie.com/v1/json/rackspace? recipients=john.smith@mycompany.com,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.

1 2 3 4 5 6 7 8 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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 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

1 2 3 4 5 6 7 8 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

Text

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 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.

1 2 3 4 5 6 7 8 9 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:

Rackspace Opsgenie Alert Sample

Still need help?

The Atlassian Community is here for you.