SignalFx Developers Guide

Org Token Limits

Customers with an Enterprise account can control their resource usage using org token limits.

How limits work

An org token limit is a property of the token that limits its use in sending metrics or using resources. The available limits are related to your pricing model:

  • For an account using DPM pricing, the limit sets the maximum DPM you can send using the org token.

  • For an account using host-based pricing, you can set four different limits for resources that use the org token.

Types of limits

The limits you can set depend on the pricing model you use:

  • If your organization uses Datapoints Per Minute (DPM) pricing, you can set DPM limits. When you send metrics to SignalFx with an ingest request containing an org token that has limits set, SignalFx tracks the metrics usage against the limit.

  • If your organization uses host-based pricing, you can as many as four different limits. As with DPM pricing, SignalFx tracks the metrics usage against the limits. The following limits are available:

    • Hosts: Limits the number of hosts that can use the specified org token

    • Containers: Limits the number of Docker containers that can use the specified org token

    • Custom metrics: Limits the number of custom metrics that you can send with the specified org token

    • Hi-res metrics: Limits the number of hi-res metrics that you can send with the specified org token

  • If your organization uses usage-based pricing, you can set the following two limits:

    • Custom metrics: Limits the number of custom metrics that you can send with the specified org token

    • Hi-res metrics: Limits the number of hi-res metrics that you can send with the specified org token

In API requests and responses, host-based and usage-based limits and thresholds use numeric string keys and numeric values:

  • "1": Key for host limit (host-based only)

  • "2": Key for Docker container limit (host-based only)

  • "3": Key for custom metrics limit (host-based and usage-based)

  • "4": Key for hi-res metrics limit (host-based and usage-based)

SignalFx stops accepting data from requests that use the org token when the limit is exceeded. The previously-received data is kept. Built-in delays in the way that SignalFx ingests data may cause resource usage that’s slightly above the limit.

To avoid overages, you can add thresholds and notifications for your limits.

Thresholds

When you set limits for a resource using an org token, you have the option of adding thresholds for the limits and alerts that fire when any of the thresholds are exceeded. To provide the alerts, SignalFx creates a detector for each threshold you set. Like all detectors, threshold detectors contain a SignalFlow program with a detect() function that triggers the "threshold exceeded" alert. In turn, the alert triggers notifications using services you specify when you create the token.

Threshold alerts can send notifications to the following generally-available services:

  • Email address for a single user

  • Email address for one or more SignalFx teams

  • Team page in SignalFx

In addition, SignalFx provides integrations for the following third-party notification services that can receive threshold alerts:

  • Amazon EventBridge

  • BigPanda

  • Microsoft Office 365

  • Opsgenie

  • PagerDuty

  • ServiceNow

  • Slack

  • VictorOps

  • Webhook

  • xMatters

Besides using the threshold detector that SignalFx creates for you, you can build your own custom detector using the web UI or the Detectors API. If you choose to build a custom detector, don’t specify thresholds when you create the org token. Instead, specify the limits you want and then create custom detectors that alert you when you’re about to exceed the limits.

In the web UI, you can only turn on thresholds, which default to 90% of the limit value. In the API, you can set a custom threshold.

Example

Use the operation POST https://api.{REALM}.signalfx.com/v2/token to create an org token with limits, thresholds, and notifications:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
{
    "name": "ExampleOrgToken",
    "description": "An org token that demonstrates org token limits, thresholds, and notifications",
    "limits": {
        "categoryNotificationThreshold": {
            "1": 1,
            "4": 3
        },
        "categoryQuota": {
            "1": 2,
            "4": 5
        },
        "dpmNotificationThreshold": null,
        "dpmQuota": null
    },
    "notifications": [
        {
            "type": "Slack",
            "channel": "_threshold_notification",
            "credentialId": "<YOUR_SLACK_CREDENTIALID>"
        }
    ]
}
  • The prefix "category" denotes host-based and usage-based settings

  • The prefix "dpm" denotes DPM-based settings

  • The suffix "Quota" denotes limits

  • The suffix "NotificationThreshold" denotes thresholds

For example, "categoryNotificationThreshold" is property name of an object that contains thresholds for host-based or usage-based limits.

As noted previously, you specify host-based limits and thresholds using numeric string keys and numeric values:

  • "1": Key for host limit

  • "2": Key for Docker container limit

  • "3": Key for custom metrics limit

  • "4": Key for hi-res metrics limit

Based on this:

  1. The categoryNotificationThreshold object sets thresholds for hosts ("1") and hi-res metrics ("4")

  2. The thresholds are 1 host and 3 hi-res metrics

  3. The limits are 2 hosts and 5 hi-res metrics

  4. dpmNotificationThreshold and dpmQuota are set to null because these properties aren’t allowed for host-based limits.

When you specify these values for limits and thresholds, SignalFx uses the values to generate the following SignalFlow program for a detector:

1
2
3
4
5
A = data('sf.org.numResourcesMonitoredByToken', filter=filter('tokenId', 'Dw953ULAAIs') and filter('resourceType','host'), rollup='sum', extrapolation='null', maxExtrapolations=-1).sum(over='1m').sum()
detect(when(A > 1, '5m')).publish('Test token host usage exceeded threshold')

B = data('sf.org.numHighResolutionMetricsByToken', filter=filter('tokenId', 'Dw953ULAAIs'), rollup='sum', extrapolation='null', maxExtrapolations=-1).sum(over='1m').sum()
detect(when(B > 3, '5m')).publish('Test high resolution usage exceeded threshold')

This program has two parts.

The first two statements do the following:

  1. Stream the data that represents resources limited by org token settings

  2. Filter the data for a particular org token

  3. Filter the data further to look for the resource type "host"

  4. Sum the results over 1 minute

  5. When the host usage is greater than 1 (the threshold), publish a message to the Slack notification service.

The second two statements do the following:

  1. Stream the data that represents high-resolution metrics limited by org token settings

  2. Filter the data for a particular org token

  3. Sum the results over 1 minute

  4. When the hi-res metrics usage is greater than 3 (the threshold), publish a message to the Slack notification service.

Using org token limits

Org tokens help you control spending you incur from your data sources. By assigning an org token to a test host and setting low limits, you prevent the host from sending you large amounts of data. In turn, you don’t waste time or money collecting data that you don’t want to save long-term.

The following topics in the SignalFx product documentation provide more information:

© Copyright 2019 SignalFx.

Third-party license information