IBM Instana and IBM NS1 Connect integration guide
Learn how to use Instana monitoring events and metrics to drive automated traffic steering in IBM NS1 Connect, including DNS failover and performance-based load balancing.
IBM NS1 Connect controls DNS responses and traffic routing by reading values from data feeds attached to DNS records. When a feed value changes, NS1 can automatically redirect traffic, for example, removing an unhealthy origin from rotation or shifting weight toward a lower-latency region.
Instana closes the loop by pushing feed values to NS1 the moment a monitoring condition changes. Because Instana alert notifications can carry both a static event state and live metric values as custom payload fields, a single alert configuration can drive NS1 traffic steering decisions ranging from coarse binary failover to continuous performance-based load balancing.
Traffic steering patterns
Both patterns use the same building blocks: an Instana alert configuration, an NS1 Connect alert channel, and NS1 data feeds attached to DNS records. However, the patterns differ in the type of custom payload they send and the NS1 behavior they drive.
| Pattern | Custom payload type | Instana signal | NS1 action |
|---|---|---|---|
| DNS failover | Static (up: 0) | Any alert opens or closes | Mark origin up or down; redirect traffic |
| Load balancing | Dynamic (metric value) | Application smart alert fires with live metric values | Adjust traffic weights or shed load based on performance data |
The two patterns can be combined in a single alert configuration to simultaneously fail an origin out of rotation and record the metric snapshot that caused the failure.
Prerequisites
- An IBM NS1 Connect account with at least one DNS zone configured.
- An NS1 data source and one or more data feeds attached to the DNS records you want to automate. Note the webhook URL for each data feed, and the feed label if the data source contains multiple feeds.
- An NS1 API key with write access to the relevant data feeds.
- Instana monitoring agents deployed and reporting on the hosts, services, or endpoints you want to protect.
- Permission to create alert channels and alert configurations in Instana (
CAN_CONFIGURE_INTEGRATIONSandCAN_CONFIGURE_ALERTS). - For help creating NS1 data sources and data feeds, see the IBM NS1 Connect documentation.
Pattern 1: DNS failover
DNS failover uses a static custom payload to push a binary health signal to NS1. The payload contains a single field, conventionally named up, whose value NS1 reads to decide whether to include an origin in DNS responses.
Instana sends up: 0 when any alert with this payload configuration opens, regardless of the alert type, and up: 1 when an operator manually closes it. The failover payload contains no metric values; it is a pure event-state signal.
How Instana drives the up field
The NS1 channel applies the following logic to the up custom payload field automatically:
| Instana event | up value sent to NS1 |
NS1 effect |
|---|---|---|
| Alert opens | 0 (value from your custom payload) |
Origin marked down; traffic redirected |
| Alert closes automatically | (notification skipped) | Origin state unchanged; failback does not occur |
| Alert closed manually by operator | 1 (overridden by channel) |
Origin marked up; traffic restored |
up: 1 signal. This design prevents ping-pong effects where traffic bounces between healthy and unhealthy endpoints during transient issues.Step 1: Create the NS1 Connect alert channel
- In Instana, go to .
- Select IBM NS1 Connect.
- Fill in the fields:
- Name: A descriptive name, for example
NS1 — prod-origin-1 failover. - Feed label (optional): If your NS1 data source contains multiple feeds, enter the exact name of the target feed. The payload is wrapped as
{"<feed-label>": {"up": "0"}}. Leave blank to send the payload unwrapped. - Webhook URL(s): The NS1 webhook URL for the data feed, for example
https://api.nsone.net/v1/data/feeds/<feed-id>. - Custom HTTP Headers: Add
X-NSONE-Key: <your-api-key>for authentication.
- Name: A descriptive name, for example
- Click Create.
For full field descriptions, see IBM NS1 Connect alert channel.
Step 2: Create the alert configuration
- Go to .
- Configure the alert to match your health condition (for example, a built-in host availability issue or a custom threshold rule).
- In the Custom Payloads section, add the following entry:
- Key:
custom:up - Value type: Static
- Value:
0
The value
0signals that the origin is down. The channel automatically overrides this to1on manual close. - Key:
- In Alert Channels, select the NS1 Connect channel that you created.
- Click Create.
Step 3: Verify the end-to-end flow
- Trigger a test condition on the monitored host (for example, stop the agent or simulate a threshold breach).
- Confirm that Instana opens the alert.
- Check the NS1 data feed, the
upvalue should now be0. - Verify that DNS responses for the protected record no longer include the failing origin.
- Resolve the underlying issue on the host.
- Wait for Instana to detect recovery, the alert may close automatically, but NS1 is not notified on automatic close. The origin remains marked down.
- Once you have confirmed that the host is stable, manually close the alert in Instana.
- Confirm that NS1 receives
up: 1and the origin is restored in DNS responses.
Failover payload examples
{"up": "0"}
prod-origin-1:
{"prod-origin-1": {"up": "0"}}
prod-origin-1:
{"prod-origin-1": {"up": "1"}}
Pattern 2: Load balancing
Load balancing uses dynamic metric custom payload fields to push live performance data to NS1. Instead of a binary up/down signal, NS1 receives actual metric values, such as call count, P95 latency, or error rate, and uses them to continuously adjust traffic weights or shed load from degraded origins.
<feed_field> as a placeholder. Replace that example with the actual field name from your NS1 feed. How metric-based custom payloads work
When you configure a custom payload field with a value in an alert configuration, Instana fetches the live metric value at both alert open and alert close time and includes it in the payload sent to NS1. This means NS1 receives a fresh metric snapshot when the condition clears, not just when it fires. The metric is queried over the time window you specify, using the aggregation you select (for example, SUM for call counts, or P95 for latency).
Step 1: Create one NS1 alert channel per origin or feed
Each NS1 data feed receives its own payload. Create a separate alert channel for each origin you want to steer traffic for, using the Feed label field to target the correct feed within a shared data source.
Example: Three-origin setup:
| Channel name | Feed label | Webhook URL |
|---|---|---|
NS1 — region-us
|
region-us
|
https://api.nsone.net/v1/data/feeds/<source-id>
|
NS1 — region-eu
|
region-eu
|
https://api.nsone.net/v1/data/feeds/<source-id>
|
NS1 — region-ap
|
region-ap
|
https://api.nsone.net/v1/data/feeds/<source-id>
|
All three channels point to the same data source webhook URL. The feed label routes each payload to the correct feed within that source.
Step 2: Create alerts with metric payloads
Create one alert configuration per origin, scoped to the application, service, or endpoint for that origin. In the Custom Payloads section, add entries for the values NS1 needs to make routing decisions. Use custom:<feed_field> as the key, where <feed_field> is the exact field name from your NS1 feed schema. For example, if your NS1 feed defines fields named latency and calls:
| Key | Value type | Metric | Time window | Aggregation |
|---|---|---|---|---|
custom:latency
|
Dynamic — Metric | latencyMillis (Application) |
10 minutes | P95 |
custom:calls
|
Dynamic — Metric | calls (Application) |
10 minutes | SUM |
Set the time window to match your smart alert's granularity so the metric value covers the full violating interval. Select the NS1 channel for that origin.
Step 3: Configure NS1 to act on the metric values
In NS1 Connect, configure the DNS record to use a filter chain that reads the metric values from the data feeds. For example:
- Use a weighted shuffle filter where weights are derived from
callsfeed values to proportionally distribute traffic based on current throughput. - Use a shed load filter where an origin is removed from responses when its
latency_p95value exceeds a configured threshold.
Refer to the IBM NS1 Connect documentation for details on filter chain configuration.
Load balancing payload examples
Instana sends a fresh metric snapshot both when the smart alert opens and when it closes, so NS1 always has current data. The field names in the payload (calls, latency) are illustrative — use the exact field names defined in your NS1 feed schema.
region-us feed — high call count, healthy latency:
{
"region-us": {
"calls": "14823",
"latency": "42.17"
}
}
region-eu feed — lower traffic, elevated latency:
{
"region-eu": {
"calls": "3201",
"latency": "318.44"
}
}
NS1 receives these values for each feed update and adjusts routing accordingly, for example, shedding traffic from region-eu while its latency is elevated.
Combining failover and load balancing
ou can combine both patterns in a single alert configuration by including a static up field alongside dynamic metric fields. When the alert triggers, NS1 receives the full picture in one payload: the origin is immediately removed from rotation via up: 0, and the metric values that caused the failure are recorded in the same update.
The field names calls and latency in the examples below are illustrative — use the exact field names defined in your NS1 feed schema.
| Key | Value type | Detail |
|---|---|---|
custom:up
|
Static |
0
|
custom:calls
|
Dynamic — Metric | calls, 10 min, SUM |
custom:latency
|
Dynamic — Metric | latencyMillis, 10 min, P95 |
{
"region-us": {
"up": "0",
"calls": "14823",
"latency": "318.44"
}
}
NS1 acts on up: 0 immediately to redirect traffic, while the metric values provide context for capacity planning or post-incident analysis.
If a metric field cannot be resolved at alert time (for example, no data is available for that entity), the field is omitted from the payload. The up field is always sent as configured. {: note}
{
"region-us": {
"up": "1",
"calls": "9823",
"latency": "51.02"
}
}
The up value is overridden to 1 by the channel to restore the origin, and the metric values reflect the state of the application at close time.
Multi-region traffic steering with feed labels
Instana smart alert fires for region-us application
→ NS1 channel "region-us" (feed label: region-us)
→ Payload: {"region-us": {"up": "0", "calls": "14823", "latency": "318.44"}}
→ NS1 data source receives update for feed "region-us"
→ DNS removes region-us from rotation
Operator manually closes alert after confirming recovery
→ NS1 channel "region-us" (feed label: region-us)
→ Payload: {"region-us": {"up": "1", "calls": "9823", "latency": "51.02"}}
→ NS1 restores region-us to rotationLimitations
- Dynamic metric enrichment is not supported for infrastructure smart alerts. Metric custom payload fields are populated for all regular events and for application smart alerts. When the alert is an infrastructure smart alert, metric fields are omitted from the notification entirely and a warning is logged on the backend. Failover (
up) fields, which use static values, are unaffected by this limitation. - No test button. The IBM NS1 Connect channel does not support the Test channel button in the UI. Test the integration by triggering a real alert.
- Manual failback required. Automatic alert closure does not send a notification to NS1. Failback to
up: 1requires a manual close in Instana.