What does the integration offer?
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 Compass to leverage the full support of Compass's notification functionality. Receive Compass 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.
How does the integration work?
When an alert is created in Rackspace, an alerted is automatically created in Compass through the integration.
Set up the integration
Rackspace is an API integration. Setting it up involves the following steps:
Add a Rackspace integration in Compass
Configure the integration in Rackspace
Add a Rackspace integration
Bidirectional integrations aren’t supported in the Standard plan. All the other integrations are supported at a team level in Standard.
If you're using the Standard plan in Compass, you can add this integration only from your team’s operations page. Adding an integration from your team’s operations page makes your team the owner of the integration. This means Compass only assigns the alerts received through this integration to your team.
To add a Rackspace integration in Compass, complete the following steps:
Go to your team’s operations page.
On the left navigation panel, select Integrations and then Add integration.
Run a search and select “Rackspace”.
On the next screen, enter a name for the integration.
Optional: Select a team in Assignee team if you want a specific team to receive alerts from the integration.
Select Continue.
The integration is saved at this point.Expand the Steps to configure the integration section and copy the API key.
You will use this key while configuring the integration in Rackspace later.Select Turn on integration.
The rules you create for the integration will work only if you turn on the integration.
Configure the integration in Rackspace
Rackspace supports email and webhook notification types. Although alerts can be sent via email, Compass provides a webhook API for Rackspace Cloud Monitoring to create alerts directly in Compass data centers. To configure the integration of Rackspace with Compass, complete the following steps:
Update the 'webhook_token' of your Rackspace account with the token you copied previously from Compass.
Use the webhook URL you copied previously from Compass for registering the webhook in Rackspace.
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 webhook notification in Rackspace Cloud Monitoring using the
https://api.atlassian.com/jsm/ops/integration/v1/json/rackspace
URL provided by Compass API, and use this notification in your notification plans. Specify the users and/or group of users (comma separated) who are notified by Compass using the "recipients" URL parameter. If not provided, all users are notified.
curl -i -X POST \ -d '{ "details" : { "url" : "https://api.atlassian.com/jsm/ops/integration/v1/json/rackspace? recipients=john.smith@mycompany.com,operationsgroup" }, "label" : "jsm 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 Compass'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 Compass webhook notification
curl -i -X POST \ -d '{ "details" : { "url" : "https://api.atlassian.com/jsm/ops/integration/v1/json/rackspace?recipients=all" }, "label" : "jsm 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 Compass web hook notification
Text
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'
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 Compass alert.