IRC on Freenode #rackspace
  • Sign Up
  • Log In
    • MyRackspace Portal
    • Cloud Control Panel
    • Rackspace Webmail Login
    • Email Admin Login
  • Rackspace Logo
  • Developer Home
  • Documentation & SDKs
  • Blog
SDK Quickstarts
  • Gophercloud Go
  • JClouds Java
  • OpenStack.NET.NET
  • pkgcloud Node.js
  • php-opencloud PHP
  • pyrax Python
  • fog Ruby
Cloud User Guides
  • Core Infrastructure
  • Cloud Servers
  • Cloud Images
  • Orchestration
Developer Community
  • Developer Blog
  • Knowledge Center
  • Developer Forum
  • Outreach & Events
Rackspace Cloud
  • Auto Scale
  • CDN
  • Cloud Block Storage
  • Cloud Databases
  • Cloud DNS
  • Cloud Files
  • Identity
  • Cloud Images
  • Cloud Load Balancers
  • Cloud Monitoring
  • Cloud Networks
  • Cloud Queues
  • Cloud Servers
  • Orchestration
Other Products
  • Airbrake
  • Mailgun
  • ObjectRocket
  • RedisToGo
Developer Community
  • Developer Blog
  • Knowledge Center
  • Developer Forum
  • Outreach & Events

Rackspace Developer Docs


Let’s Build Something Powerful Together!

Submit an issue
  • Rackspace Metrics 2.0
  • Early Access program
  • Getting started
    • Get your credentials
    • Send API requests to Rackspace Metrics
      • Convert cURL examples to run on Windows
    • Authenticate to the Rackspace Cloud
      • Send an authentication request
      • Review the authentication response
      • Configure environment variables
    • Rackspace Metrics concepts
      • Rackspace Metrics key terms
      • Rackspace Metrics architecture
      • How Rackspace Metrics is used
    • Upload metrics data to the Rackspace Metrics database
      • Sending numeric metrics
      • Sending aggregated metrics
    • Retrieve metrics
      • Using query parameters
      • Retrieving a list of metric names
      • Retrieving numeric metrics
      • Retrieving data for a list of metrics
      • Retrieving aggregated metrics
  • General API information
    • Service access endpoints
    • Request and response types
    • Limits
    • Common headers
    • Date and time format
    • Response codes
    • Role-based access control (RBAC)
      • Assigning roles to account users
      • Roles available for Rackspace Metrics API
      • Multiproduct global roles and permissions
      • Resolving conflicts between RBAC multiproduct and product-specific roles
      • RBAC permissions cross-reference to Rackspace Metrics API API operations
  • Query API reference
    • Query views
      • Get data for metrics
      • Query for a set of metrics
      • Retrieve an aggregated set of metrics
      • Retrieve an annotation
      • Get data for a list of metrics
    • Query limits
      • Retrieve limits
  • Ingestion API reference
    • Ingestion views
      • Send metrics
      • Send a set of aggregated metrics
    • Ingestion events
      • Send an annotation
    • Ingestion limits
      • Retrieve Limits
  • API contract
    • Contract changes
  • Additional resources
  • Disclaimer

Upload metrics data to the Rackspace Metrics database#

  • Sending numeric metrics
  • Sending aggregated metrics

You can use the Rackspace Metrics Ingestion API operations to upload metrics to the Rackspace Metrics database by posting data to the following Rackspace Metrics Ingestion API endpoint:

https://global.metrics-ingest.api.rackspacecloud.com/v2.0

Important

The Rackspace Metrics Ingestion API is available only to customers participating in the Early Access Program.

Sending numeric metrics#

To send numeric metrics to the Rackspace Metrics database, submit a POST request to the Rackspace Metrics Ingestion API endpoint. Include the metrics you want to upload in the request body as shown in the following example.

Example: Send a set of metrics to the database cURL request:

$ curl -s https://global.metrics-ingest.api.rackspacecloud.com/v2.0/$TENANT_ID/ingest \
       -X POST \
       -d '[
             {
               "collectionTime": 1376509892612,
               "ttlInSeconds": 172800,
               "metricValue": 66,
               "metricName": "example.metric.one"
             },
             {
               "collectionTime": 1376509892612,
               "ttlInSeconds": 172800,
               "metricValue": 66,
               "metricName": "example.metric.two"
             },
             {
               "collectionTime": 1376509892612,
               "ttlInSeconds": 172800,
               "metricValue": 66,
               "metricName": "example.metric.three"
             }
           ]
       ' \
       -H 'X-Auth-Token: $AUTH_TOKEN' \
       -H 'Content-Type: application/json' \
       -H 'Accept: application/json'

Response

If the data is uploaded successfully, the API service returns a 200 or 202 response code.

If the data is partially uploaded with some errors, the API service returns a 207 response code, and the response body contains a json payload of all metrics that were rejected along with the reason for the failures.

For information about error codes, see the Send metrics operation in the API reference.

Note

You can also include a unit parameter to describe the data included in the metrics set, for example seconds, bytes, percentage, and so on.

Sending aggregated metrics#

Rackspace Metrics lets you send a set of pre-aggregated metrics to the Rackspace Metrics database.

You can upload the following aggregated metric types: - counter metrics - gauge metrics - timer metrics

To send a set of preaggregated metrics to the Rackspace Metrics database, submit a POST request to the Rackspace Metrics Ingestion API endpoint. Include the metric type (counter, gage, timer) you want to upload in the request body, along with the corresponding attributes, as shown in the following example, which uploads an aggregated timer metric to the database.

Example: Send a set of metrics to the database cURL request:

$ curl -s https://global.metrics-ingest.api.rackspacecloud.com/v2.0/$TENANT_ID/ingest/aggregated \
       -X POST \
       -d '
        {
        "tenantId": $TENANT_ID,
        "timestamp": 1438207399001,
        "timers": [
            {
              "name": "timer_name",
              "count": 32,
              "rate": 2.3,
              "min": 1,
              "max": 5,
              "sum": 21,
              "avg": 2.1,
              "median": 3,
              "std": 1.01,
              "histogram": {
              "bin_50": 0,
              "bin_100": 0,
              "bin_inf": 0
              }
            }
          ]
        }' \
       -H 'X-Auth-Token: $AUTH_TOKEN' \
       -H 'Content-Type: application/json' \
       -H 'Accept: application/json'

Response

If the data is uploaded successfully, the API service returns a 200_OK response code.

If the data is partially uploaded with some errors, the API service returns a 207 response code, and the response body contains a json payload of all metrics that were rejected along with the reason for the failures.

For information about error codes, see the Send metrics operation in the API reference.

Previous Rackspace Metrics concepts
Next Retrieve metrics
Docs
  • Style Guide for Technical Content
  • Cloud Backup
  • Cloud Block Storage
  • Cloud Databases
  • Cloud DNS
  • Cloud Files
  • Identity
  • Cloud Images
  • Cloud Load Balancers
  • Cloud Monitoring
  • Cloud Orchestration
  • Cloud Networks
  • Cloud Queues
  • Cloud Servers
  • Rackspace Auto Scale
  • Rackspace CDN
Sdks
  • Go
  • Java
  • .Net
  • Node
  • PHP
  • Python
  • Ruby
Partner Tools
  • Airbrake
  • Mailgun
  • ObjectRocket
  • RedisToGo
Blog
  • Developer Blog
©2018 Rackspace US, Inc.
  • ©2018 Rackspace US, Inc.
  • About Rackspace
  • Investors
  • Careers
  • Privacy Statement
  • Website Terms
  • Trademarks