# Create a Subscription Once you have [created a stream](https://docs.equinix.com/observability/streaming-data/api-managing-streams.md), create a subscription to send your metrics and event data to your data collector. Supported Data Collectors: | Data Collector | Events | Metrics | | ------------------------------------ | --------- | ------------- | | [Datadog](#datadog) | Supported | Supported | | [Dynatrace](#dynatrace) | Supported | Supported | | [Google Pub/Sub](#google-pubsub) | Supported | Supported | | [Grafana Webhook](#grafana-webhook) | Supported | Supported | | [Microsoft Teams](#microsoft-teams) | Supported | Supported | | [PagerDuty](#pagerduty) | Supported | Not Supported | | [ServiceNow](#servicenow) | Supported | Not Supported | | [Slack Webhook](#slack) | Supported | Supported | | [Splunk HEC](#splunk) | Supported | Supported | | [Generic Webhooks](#generic-webhook) | Supported | Supported | ## Data Formats[​](#data-formats "Direct link to Data Formats") Equinix Events and Metrics use the CloudEvents specification format or the OpenTelemetry specification format for all data. All of our event data schemas, metrics data schemas, and data types are published in the [`/equinix/equinix-cloudevents`](https://github.com/equinix/equinix-cloudevents) GitHub repository. Examples: * CloudEvent * CloudEvents Metric * OpenTelemetry Log * OpenTelemetry Metric ``` --- specversion: '1.0' source: https://api.equinix.com/fabric/v4/cloudevents id: 6c573287-9914-4202-8b6d-2d15e7da04b8 type: equinix.fabric.metric subject: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 time: '2024-07-01T20:12:21.306Z' severitynumber: 9 severitytext: INFO equinixproject: 123 dataschema: https://github.com/Fabric/.../ApiConfigEventData.json datacontenttype: application/json data: message: New metrics collected resource: href: https://api.equinix.com/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 uuid: 956a86fb-d03d-436c-8d5d-30d1f51f7688 name: my-test-port description: port description metrics: - type: GAUGE name: equinix.fabric.port.bandwidth_rx.usage description: Port inbound bandwidth utilization unit: bit/s datapoints: - endDateTime: '2024-07-01T20:12:21.000Z' value: 440023 - type: SUM name: equinix.fabric.port.packets_erred_tx.count description: Port error packets interval: PT5M unit: packet datapoints: - endDateTime: '2024-07-01T20:12:21.000Z' value: 10 ``` ``` { "specversion": "1.0", "source": "https://api.equinix.com/fabric/v4/cloudevents", "id": "16c7e20a-d147-40c4-81ad-f60d25548aad", "time": "2026-06-24T20:20:59.000Z", "type": "equinix.fabric.metric", "subject": "/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688", "dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/MetricEvent.json", "datacontenttype": "application/json", "severitynumber": "9", "severitytext": "INFO", "equinixproject": "123", "data": { "message": "Metrics collected", "resource": { "href": "https://api.equinix.com/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688", "uuid": "956a86fb-d03d-436c-8d5d-30d1f51f7688", "type": "XF_PORT", "state": "PROVISIONED" }, "metrics": [ { "type": "GAUGE", "name": "equinix.fabric.port.bandwidth_rx.usage", "unit": "bit/s", "datapoints": [ { "endDateTime": "2026-06-24T20:20:59.000Z", "value": 179 } ] }, { "type": "GAUGE", "name": "equinix.fabric.port.bandwidth_tx.usage", "unit": "bit/s", "datapoints": [ { "endDateTime": "2026-06-24T20:20:59.000Z", "value": 1711 } ] } ] } } ``` ``` --- resourceLogs: - resource: attributes: - key: service.name value: stringValue: Equinix - key: equinix.event.specversion value: stringValue: '1.0' - key: equinix.event.source value: stringValue: https://api.equinix.com/fabric/v4/cloudevents - key: equinix.event.subject value: stringValue: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 - key: equinix.event.equinixproject value: stringValue: 123 scopeLogs: - scope: logRecords: - timeUnixNano: '1719889941306000000' severityNumber: 9 severityText: Information body: stringValue: '{"message":"Virtual port status changed to Up","resource":{"href":"https://api.equinix.com/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688","uuid":"956a86fb-d03d-436c-8d5d-30d1f51f7688","name":"my-test-port","description":"port description"}}' attributes: - key: equinix.event.id value: stringValue: 6c573287-9914-4202-8b6d-2d15e7da04b8 - key: equinix.event.type value: stringValue: equinix.fabric.port.status.up ``` ``` --- resourceMetrics: - resource: attributes: - key: service.name value: stringValue: Equinix - key: equinix.event.specversion value: stringValue: '1.0' - key: equinix.event.source value: stringValue: https://api.equinix.com/fabric/v4/cloudevents - key: equinix.event.subject value: stringValue: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 - key: equinix.event.equinixproject value: stringValue: 123 scopeMetrics: - scope: metrics: - name: equinix.fabric.port.bandwidth_rx.usage description: Port inbound bandwidth utilization unit: 'bit/s' gauge: dataPoints: - attributes: - key: service.name value: stringValue: Equinix - key: equinix.event.source value: stringValue: https://api.equinix.com/fabric/v4/cloudevents - key: equinix.event.subject value: stringValue: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 - key: equinix.event.equinixproject value: stringValue: 123 - key: equinix.event.resource.name value: stringValue: 'my-port-name' timeUnixNano: '1719889941306000000' asInt: 566 - name: equinix.fabric.port.packets_erred_tx.count description: Port error packets unit: packet sum: aggregationTemporality: 2 # required for sum https://github.com/open-telemetry/opentelemetry-proto/blob/v0.9.0/opentelemetry/proto/metrics/v1/metrics.proto#L230 dataPoints: - attributes: - key: service.name value: stringValue: Equinix - key: equinix.event.source value: stringValue: https://api.equinix.com/fabric/v4/cloudevents - key: equinix.event.subject value: stringValue: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 - key: equinix.event.equinixproject value: stringValue: 123 - key: equinix.event.resource.name value: stringValue: 'my-port-name' startTimeUnixNano: '1719889641306000000' # optional timeUnixNano: '1719889941306000000' asInt: 10 ``` Any variations of these formats for specific data collectors are included below. ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * To create subscriptions, you must have the `Fabric Stream Subscription Manager` (STREAM\_SUBSCRIPTION PERMISSION CREATE AND READ) role. Contact your Company Administrator or IAM Administrator to [manage access and roles](https://docs.equinix.com/iam/user-management/iam-users-access-roles.md). - Portal - API The portal supports creating and managing subscriptions to Splunk, Datadog, Microsoft Teams, and PagerDuty. 1. Sign in to the [Customer Portal](https://portal.equinix.com/fabric) > *Fabric Dashboard*. 2. From the *Observability* menu, select **Data Streams**. ![Observability Drop-down Menu Screenshot](https://docs.equinix.com/assets/images/observability-drop-down-7b9fce28b7a44d07b365263f69b94cc2.png) 3. From the *Actions* drop-down menu, select **Add Subscriptions**. ![Actions Drop-down Menu Screenshot](https://docs.equinix.com/assets/images/add-subscriptions-drop-down-7922ca43aedec1062f921dbc68f600c1.png) * Authenticate. Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for more information on how to authenticate your requests to the Equinix API. > **Note** > > The Subscription API URI/host values only support HTTPS and do not support self-signed certificates. ## Datadog[​](#datadog "Direct link to Datadog") A Datadog subscription requires your Datadog [API and Application Keys](https://docs.datadoghq.com/account_management/api-app-keys/) when [creating your subscription](#datadog). For a setup guide to integrate with Datadog, see [How to set up Datadog](https://community.equinix.com/kb/guides/how-to-set-up-datadog/3105) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your Datadog information, including: * a Subscription Name * your Datadog Host URL * your Datadog API key * your Datadog Application key * and provide a description (optional) ![Adding a Datadog Subscription Dialog Screenshot](https://docs.equinix.com/assets/images/add-subscription-datadog-6e6a53bf2fc5bbaf907256eac19dada7.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `DATADOG`. * Use [the Datadog site reference table](https://docs.datadoghq.com/getting_started/site/#access-the-datadog-site) to find your site parameter for the `sink.host` parameter. * Provide your Datadog API key, and Application key Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "host": "https://", "type": "DATADOG", "credential": { "type": "API_KEY", "apiKey": "" }, "settings": { "applicationKey": "" } } }' ``` ### Datadog Data Examples[​](#datadog-data-examples "Direct link to Datadog Data Examples") * Event * Metric ``` --- date_happened: 1719864741 # in seconds source_type_name: Equinix aggregation_key: title: 'Virtual port status changed to Up' status: info # INFO->info, WARN -> warn, ERROR->error, CRITICAL->warn, FATAL->error, default: info text: "{\"cloudevent\":{\"specversion\":\"1.0\",\"source\":\"https://api.equinix.com/fabric/v4/cloudevents\",\"id\":\"6c573287-9914-4202-8b6d-2d15e7da04b8\",\"type\":\"equinix.fabric.port.status.up\",\"subject\":\"/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688\",\"time\":\"2024-07-01T20:12:21.306Z\",\"severitynumber\":9,\"severitytext\":\"INFO\",\"equinixalert\":\"clear/\",\"equinixproject\":\"123\",\"data\":{\"message\":\"Virtual port status changed to Up\",\"resource\":{}}}}" ``` ``` --- series: - type: 3 # 0(unspecified), 1(count), 2(rate), 3(gauge) metric: equinix.fabric.port.bandwidth_rx.usage resources: - type: subject name: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 - type: equinixproject name: 123 unit: bit/s points: - timestamp: 1719889941 value: 440023 - type: 1 metric: equinix.fabric.port.packets_erred_tx.count resources: - type: subject name: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 - type: equinixproject name: 123 unit: packet interval: 300 # in seconds points: - timestamp: 1719889941 value: 10 ``` ## Dynatrace[​](#dynatrace "Direct link to Dynatrace") To create a Dynatrace subscription, create an event index to receive events, a metrics index to receive metrics or both, then create an HTTP Event Collector. * Portal * API On the *Add Subscription* page, enter your Dynatrace information, including: * a Subscription Name * your Dynatrace HTTP Event Collector URI * your Dynatrace Access Token * your Dynatrace Event Index (required) * your Dynatrace Metrics Index, if you plan to ingest metrics into Splunk * and provide a description (optional) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `DYNATRACE`. * Provide your Dynatrace HTTP Event Collector URI. * Provide your Dynatrace Event Index (required) and Dynatrace Metrics Index (optional). * Provide your Dynatrace Access Token. Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "dynatrace-subscription", "description": "subscription-1", "enabled": true, "metricSelector": { "include": [ "equinix.fabric.connection.*" ] }, "sink": { "type": "DYNATRACE", "credential": { "type": "API_TOKEN", "apiToken": "" }, "settings": { "eventUri": "https://.live.dynatrace.com/platform/ingest/v1/events", "metricUri": "https://.live.dynatrace.com/api/v2/metrics/ingest" } } }' ``` ![Adding a Dynatrace Subscription Dialog Screenshot](https://docs.equinix.com/assets/images/add-subscription-dynatrace-47f64acda243906d095eb1254986f50a.png) ## Google PubSub[​](#google-pubsub "Direct link to Google PubSub") A Google Pub/Sub Subscription requires the following: * [Create a Topic](https://cloud.google.com/pubsub/docs/create-topic). * Grant IAM permissions to a Service Account for Pub/Sub. * Provide your topic URI and your service account credentials when [creating your subscription](#google-pubsub). For a setup guide on Google Pub/Sub, see [How to set up Google Pub/Sub](https://community.equinix.com/observability-58/how-to-deploy-a-google-cloud-dataflow-980) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your Google Cloud PubSub information, including: * A Subscription Name * The Google Cloud PubSub Access Token * The Google Cloud PubSub Subscription URI * And provide a description (optional) ![](https://docs.equinix.com/assets/images/add-subscription-google-pubsub-be26fe60533e6b8f468ecc00df4dd22b.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `GOOGLE_PUBSUB`. * Provide your Google Cloud PubSub Access Token and PubSub Subscription URI. Sample cURL request: ``` curl -X POST 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "uri": "https://pubsub.googleapis.com/v1/projects//topics/:publish", "type": "GOOGLE_PUBSUB", "credential": { "type": "ACCESS_TOKEN", "accessToken": "" } } }' ``` ## Grafana Webhook[​](#grafana-webhook "Direct link to Grafana Webhook") To create a Grafana subscription, [create and configure Grafana for incoming webhooks](https://grafana.com/docs/grafana-cloud/send-data/otlp/send-data-otlp/#recommended-opentelemetry-setup-via-grafana-cloud-integrations). Provide your Grafana Webhook's URL and api key when creating your subscription. For a setup guide for Grafana, see [How to set up Grafana Webhook](https://community.equinix.com/kb/guides/how-to-set-up-a-webhook-in-grafana/3219) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your Grafana information, including: * A Subscription name. * The Grafana Metrics URI. * The Grafana Events URI. * Your Grafana API Key. * An optional description. ![](https://docs.equinix.com/assets/images/add-subscription-grafana-5bec5b974efeaee81abc603c351944b4.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `WEBHOOK`. * Provide your Grafana Metrics URI, Events URI, or both. * Provide your Grafana API key. Sample cURL Request: ``` curl -X POST 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "enabled": true, "sink": { "type": "WEBHOOK", "settings": { "metricUri": "https:///otlp/v1/metrics", "format": "OPENTELEMETRY" }, "credential": { "type": "API_KEY", "apiKey": ":" } } }' ``` ## Microsoft Teams[​](#microsoft-teams "Direct link to Microsoft Teams") To create a Microsoft Teams subscription, [create and configure a webhook](https://support.microsoft.com/en-us/office/create-incoming-webhooks-with-workflows-for-microsoft-teams-8ae491c7-0394-4861-ba59-055e33f75498) to post messages when a webhook request is received. Once your webhook is configured, provide your HTTP POST URL when creating your subscription. For a setup guide for Microsoft Teams, see [How to set up Microsoft Teams](https://community.equinix.com/observability-58/how-to-set-up-microsoft-teams-982?tid=982\&fid=58) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your Microsoft Teams information, including: * a Subscription Name * your Microsoft Workflow Webhook URI * and provide a description (optional) ![Adding a Microsoft Teams Subscription Dialog Screenshot](https://docs.equinix.com/assets/images/add-subscription-microsoft-teams-13d3f86bb4033faaf6bc1764bec888aa.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `TEAMS`. * Provide your Microsoft Workflow Webhook URI. Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "uri": "", "type": "TEAMS" } }' ``` ## PagerDuty[​](#pagerduty "Direct link to PagerDuty") For a PagerDuty subscription, [create a service](https://support.pagerduty.com/main/docs/services-and-integrations#create-a-service) and an [Events APIv2](https://support.pagerduty.com/main/docs/services-and-integrations#create-a-generic-events-api-integration) integration to handle your events. Provide your PagerDuty URI and the Integration Key when [creating your subscription](#pagerduty). For a setup guide for PagerDuty, see [How to set up PagerDuty](https://community.equinix.com/observability-58/how-to-set-up-pagerduty-983) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your PagerDuty information, including: * a Subscription Name * your PagerDuty Host Url * your PagerDuty Integration Key * and provide a description (optional) ![Adding a Pagerduty Subscription Dialog Screenshot](https://docs.equinix.com/assets/images/add-subscription-pagerduty-2a32a11bebfc3bffe8f2e803577af8a9.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `PAGERDUTY`. * Provide your PagerDuty Host URL and Integration Key. Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "host": "https://events.pagerduty.com", "type": "PAGERDUTY", "credential": { "type": "INTEGRATION_KEY", "integrationKey": "" } } }' ``` ### PagerDuty Data Example[​](#pagerduty-data-example "Direct link to PagerDuty Data Example") * Event ``` --- routing_key: dedup_key: event_action: trigger # or resolve payload: source: Equinix timestamp: '2024-07-01T20:12:21.306Z' severity: critical summary: Virtual port status changed to Down custom_details: equinixsource: https://api.equinix.com/fabric/v4/cloudevents specversion: '1.0' id: type: equinix.fabric.port.status.down subject: /fabric/v4/ports/ time: '2024-07-01T20:12:21.306Z' severitynumber: 21 severitytext: FATAL # or INFO equinixalert: raise/ equinixproject: 123 ``` ## ServiceNow[​](#servicenow "Direct link to ServiceNow") A ServiceNow subscription requires your [ServiceNow username and password](https://www.servicenow.com/docs/bundle/zurich-platform-security/page/integrate/authentication/concept/local-authentication.html). * Portal * API On the *Add Subscription* page, enter your ServiceNow information, including: * A Subscription name. * The ServiceNow Host URL. * Your ServiceNow username. * Your ServiceNow password. * An optional description. ![](https://docs.equinix.com/assets/images/add-subscription-servicenow-b90cbf326fcdc53c841762ef0b06efec.png) To create a ServiceNow subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `SERVICENOW`. * Provide your ServiceNow host url, username, and password. Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "host": "https://.service-now.com", "type": "SERVICENOW", "settings": { "source": "" }, "credential": { "type": "USERNAME_PASSWORD", "username": "", "password": "" } } }' ``` ### ServiceNow Data Examples[​](#servicenow-data-examples "Direct link to ServiceNow Data Examples") * Event * Metric ``` --- source: Equinix time_of_event: '2024-07-01T20:12:21.306Z' description: Virtual port status changed to Down severity: 1 # 1 for clear and 0 for clear resolution_state: New # or Closing message_key: NCAB543WC4lrLpET8nLX4Vd8 resource: fabric.port node: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 type: equinix.fabric.port.status.down additional_info: '{"cloudevent":{"specversion":"1.0","source":"https://api.equinix.com/fabric/v4/cloudevents","id":"6c573287-9914-4202-8b6d-2d15e7da04b8","type":"equinix.fabric.port.status.down","subject":"/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7681","time":"2024-07-01T20:12:21.306Z","severitynumber":13,"severitytext":"CRITICAL","equinixalert":"raise/NCAB543WC4lrLpET8nLX4Vd8","equinixproject":"123","data":{"message":"Virtual port named \'Test-port\' status changed to Down","resource":{}}}}' ``` ``` --- - timestamp: 1719889941306000. #mili sec source: Equinix resource_path: "/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7681" metric_type: equinix.fabric.port.bandwidth_rx.utilization value: 70.5 ci2metric_id: type: GAUGE subject: "/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7681" equinixproject: 123 unit: "%" - timestamp: 1719889941306000 #mili sec source: Equinix resource_path: "/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7681" metric_type: equinix.fabric.port.packets_erred_tx.count value: 70.5 ci2metric_id: type: GAUGE interval: PT5M subject: "/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7681" equinixproject: 123 unit: "%" ``` ## Slack[​](#slack "Direct link to Slack") A Slack subscription requires your webhook's unique URL. See [create and configure a Slack App for incoming webhooks](https://api.slack.com/messaging/webhooks). For a setup guide to integrate with Slack, see [How to set up Slack](https://community.equinix.com/observability-58/how-to-set-up-slack-981?tid=981\&fid=58) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your Slack information, including: * Subscription name * Subscription URI * Description (optional) ![](https://docs.equinix.com/assets/images/add-subscription-slack-6dad51c6da1bc924ff6a54578ab88c14.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `SLACK`. * Provide the Slack subscription URI. Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "uri": "", "type": "SLACK" } }' ``` ## Splunk[​](#splunk "Direct link to Splunk") To create a Splunk subscription, create an [event index](https://docs.splunk.com/Documentation/Splunk/latest/Indexer/Setupmultipleindexes#Create_events_indexes) to receive events, a [metrics index](https://docs.splunk.com/Documentation/Splunk/latest/Indexer/Setupmultipleindexes#Create_metrics_indexes) to receive metrics or both, then create an HTTP Event Collector. Provide your HTTP Event Collector URI, your HTTP Event Collector token, and the names of your indices when creating your subscription. For a setup guide to integrate with Splunk, see [How to set up Splunk](https://community.equinix.com/observability-58/how-to-set-up-splunk-979?tid=979\&fid=58) in the Equinix Community. * Portal * API On the *Add Subscription* page, enter your Splunk information, including: * a Subscription Name * your Splunk HTTP Event Collector URI * your Splunk Access Token * your Splunk Event Index (required) * your Splunk Metrics Index, if you plan to ingest metrics into Splunk * and provide a description (optional) ![Adding a Splunk Subscription Dialog Screenshot](https://docs.equinix.com/assets/images/add-subscription-splunk-01ba475d1a4a6e0ce93aa5b2dd6aa78e.png) To create a subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body: * Specify the `type` as `SPLUNK_HEC`. * Provide your Splunk HTTP Event Collector URI. * Provide your Splunk Event Index (required) and Splunk Metrics Index (optional). * Provide your Splunk Access Token. Sample cURL Request: ``` curl -X 'POST' 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "sink": { "uri": "https://http-inputs-.splunkcloud.com:/services/collector/event", "type": "SPLUNK_HEC", "settings": { "eventIndex": "", "metricIndex": "", "source": "" }, "credential": { "type": "ACCESS_TOKEN", "accessToken": "Splunk " } } }' ``` ### Splunk Data Examples[​](#splunk-data-examples "Direct link to Splunk Data Examples") * Event * Metric ``` --- sourcetype: _json index: test-event-index source: equinix # optional event: equinixsource: https://api.equinix.com/fabric/v4/cloudevents specversion: '1.0' id: 6c573287-9914-4202-8b6d-2d15e7da04b8 type: equinix.fabric.port.status.up subject: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 time: '2024-07-01T20:12:21.306Z' severitynumber: 9 severitytext: INFO equinixalert: clear/NCAB543WC4lrLpET8nLX4Vd8 equinixproject: 123 data: message: Virtual port status changed to Up resource: href: https://api.equinix.com/fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 uuid: 956a86fb-d03d-436c-8d5d-30d1f51f7688 name: my-test-port description: port description ``` ``` --- time: 1719889941.306 event: metric index: test-index-metric source: Equinix # Optional fields: subject: /fabric/v4/ports/956a86fb-d03d-436c-8d5d-30d1f51f7688 equinixproject: 123 "metric_name:equinix.fabric.port.bandwidth_rx.usage": 440023 "metric_name:equinix.fabric.port.packets_erred_tx.count": 10 ``` ## Generic Webhook[​](#generic-webhook "Direct link to Generic Webhook") Equinix supports creating a subscription to any generic webhook service for events and metrics in either [CloudEvent specification format or OpenTelemetry specification format](#data-formats). You must include either an Event URI or a Metric URI. To stream both events and metrics, you must provide both an Event URI and a Metric URI. If you provide only one of these fields, then only the corresponding data type (events or metrics) is sent to the destination platform. * Portal * API On the *Add Subscription* page, enter your Webhook information, including: * A Subscription Name * Select either CloudEvent format or Open Telemetry format for your streaming data. * The Event URI * The Metric URI * Select an Authentication Type from No Auth, Username/Password, Access Token, or API Key options. Enter the relevant information into the provided fields. * And provide a description (optional). ![](https://docs.equinix.com/assets/images/add-subscription-webhook-0ee372e097b1ac2978ab1825f86affd6.png) To create a webhook subscription, send a `POST` request to the [`/fabric/v4/streams//subscriptions`](https://docs.equinix.com/api-catalog/fabricv4/stream-subscriptions/createstreamsubscriptions.md) endpoint. Specify the Stream ID in the `stream` path of your request. In the `sink` object of the request body provide any necessary fields for your sink type. Including: * Specify the `type` as `WEBHOOK`. * Provide an Event URI or Metric URI or both. Specify the format. * Provide relevant authentication information; including Username/Password, Access Token, or API Key options. If no authentication is required, you can omit the `credentials` object. Sample cURL Request: ``` curl -X POST 'https://api.equinix.com/fabric/v4/streams//subscriptions' \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer ' \ -d '{ "type": "STREAM_SUBSCRIPTION", "name": "", "description": "", "enabled": true, "sink": { "type": "WEBHOOK", "settings": { "eventUri": "", "metricUri": "", "format": "" } } }' ```