跳至内容

与收集器集成

订阅 API 允许为与所选资产的环境和运行状态相关的事件建立通信渠道目标。它支持 AWS IoT Core、Azure 事件中心和 Webhook 通信渠道。

注意

您还可以创建订阅并通过 Equinix API 访问您的数据。有关说明,请参阅从 Equinix API 流式传输托管数据

Equinix mTLS 证书

mTLS 证书是 TLS(以前的 SSL)证书的扩展,用于服务器和客户端相互验证身份。Equinix 要求客户Equinix提供此受信任的签名证书,类似于我们服务提供的证书。我们的订阅服务为您提供额外的连接验证选项。每次尝试通信时,当发送一批新的事件时,我们的订阅服务都会使用客户端提供的证书来验证我们向其发送数据的服务是否正确。

要检索证书,请向 /smartview/v2/streaming/subscriptions/certificate 端点发送 GET 请求。将通道目标指定为查询参数,可以是 AWS_IOT_COREWEBHOOK

示例 cURL 请求:

curl -X 'GET' 'https://api.equinix.com/smartview/v2/streaming/subscriptions/certificate?channelType=WEBHOOK' \
-H 'Authorization: Bearer <Bearer Token>'
重要的

订阅 API 不接受自签名证书。请使用 CA 证书进行双向身份验证。

AWS IoT

创建订阅时,通过提供HTTP端点将数据发送到AWS IoT Core。

注意

要授权 Equinix 向 AWS IoT Core 目标发送事件,您必须下载 Equinix 证书 并将其注册到 IoT Core 控制台中。有关说明,请参阅 AWS IoT Core 文档

Azure 事件中心

自助配置向 Azure 事件中心发送数据的功能不可用。要启用向 Azure 发送数据的功能,请联系支持

Webhook

如果您不想使用 AWS 或 Azure 作为收集器,但可以提供一个目标 URL 来发送流数据,Equinix 提供了创建订阅以将数据发送到通用 webhook 目标

收集器的对象格式

AWS IoT Core 和 Azure Event Hubs 通道的消息格式使其更具可读性。以下是通过 API Plus 订阅发送的一些消息示例。

环境-温度

{
"type": "environmental",
"data": {
"ibx": "CH2",
"asset": {
"id": "asset1",
"level": "ZONE"
},
"reading": {
"value": "23.300",
"unit": "CELSIUS"
},
"tag": {
"id": "temperature",
"displayName": "Temperature"
},
"readingTime": "2020-08-24T09:21:00.000Z"
}
}

环境-湿度

{
"type": "environmental",
"data": {
"ibx": "CH1",
"asset": {
"id": "asset1",
"level": "ZONE"
},
"reading": {
"value": "66.120",
"unit": "PERCENT"
},
"tag": {
"id": "humidity",
"displayName": "Humidity"
},
"readingTime": "2020-07-28T12:35:14.615Z"
}
}

权力

{
"type": "power",
"data": {
"ibx": "SP2",
"asset": {
"id": "0210:469593",
"type": "CIRCUIT"
},
"cage": "ssxxxxsss",
"cabinet": "SP2:01:021470:0210",
"accountNumber": "1000659151",
"realPower": {
"value": "0.522",
"unit": "kW"
},
"apparentPower": {
"value": "1.070",
"unit": "kVA"
},
"contractualPower": {
"value": "60.000",
"unit": "kVA"
},
"current": {
"value": "1.500",
"unit": "A"
},
"powerFactor": {
"value": "0.48",
"unit": "pf"
},
"soldCurrent": {
"value": "15.000",
"unit": "A"
},
"soldPower": {
"value": "2.880",
"unit": "kVA"
},
"powerConsumptionToContractual": {
"value": "32.151",
"unit": "PERCENT"
},
"cabinetRating": {
"value": "123.300",
"unit": "kVA"
},
"peakLastSevenDays": {
"value": "1.146",
"unit": "kVA"
},
"peakLastSevenDaysRatio": {
"value": "34.424",
"unit": "PERCENT"
},
"peakLastSevenDaysContractualPower": {
"value": "3.329",
"unit": "kVA"
},
"peakLastSevenDaysTime": "2020-07-29T07:00:00.000Z",
"lastUpdated": "2020-07-24T11:46:00.000Z",
"readingTime": "2020-07-24T11:45:00.000Z",
"description": "test description",
"oid": "1.3.6.1.2.1.299.2.10.6846",
"circuitType": "primary",
"customerName": "test customer"
}
}

计量功率 - kWh

{
"type": "metered-power",
"data": {
"ibx": "LD9",
"asset": {
"id": "LD9.CBM-PDU-17-99",
"type": "Customer Billing Meter"
},
"cage": "LD9:0G:00Z13Z",
"cageSerialNo": "00Z13B-21010567",
"accountNumber": "1000006212",
"customerName": "ABC Company",
"kilowattHour": {
"value": "304574.323",
"unit": "kWh"
},
"readingTime": "2023-04-24T11:45:00.000Z",
"dataQuality": "Good"
}
}

注意:计量功率读数以 kWh、kW、kVA、A 和 pf(功率因数)为单位。

标记点

{
"type": "tag-point",
"data": {
"ibx": "LA1",
"reading": {
"value": "33406.6",
"unit": "l/s"
},
"tag": {
"id": "LA1.Air-Handler-7-4-4:totalsupplyairflow",
"displayName": "Total Supply Air Flow"
},
"readingTime": "2020-08-24T09:21:00.000Z"
}
}

自定义警报

{
"type": "alert",
"data": {
"ibx": "SG2",
"region": "APAC",
"asset": {
"id": "CH1.Colo.CH1_05_000550_0105",
"type": "ENVIRONMENTAL",
"classification": "Environmental"
},
"tag": {
"id": "temperature"
},
"threshold": {
"unit": "CELSIUS",
"maxValue": "-6.67",
"minValue": "-12.22"
},
"id": "zhe-15603221441540.3171591127612322145",
"triggeredTime": "2019-09-23T23:01:30.655Z",
"type": "environmental",
"typeId": "Absolute",
"conditional": "N",
"eventType": "Out of Range",
"heartbeat": false
}
}

系统警报

{
"type": "system-alert",
"data": {
"ibx": "SG2",
"region": "APAC",
"metro": "SG",
"country": "SG",
"currentValue": {
"unit": "kWh",
"value": "2.650479E7",
"type": "float"
},
"asset": {
"id": "9SG2.ELEC4AUPSR-A10ASBF0",
"type": "Circuit Breaker with Metering",
"classification": "Electrical"
},
"tag": {
"id": "SG2.ELEC5BUPSR-B14UAH2Q:breaker",
"displayName": "Bypass Not Available"
},
"conditionName": "Low",
"status": {
"acknowledged": true,
"acknowledgementTime": "2020-07-28T12:35:14.615Z",
"cleared": false,
"active": false
},
"threshold": {
"unit": "kWh",
"stateLimit": "80",
"message": "Drive not in Auto"
},
"severity": 820,
"triggeredTime": "2020-07-28T12:35:14.615Z",
"processedTime": "2020-07-28T12:35:14.615Z",
"normalProcessedTime": "2020-07-28T12:35:14.615Z",
"normalTriggeredTime": "2020-07-28T12:35:14.615Z",
"type": "Digital",
"heartbeat": false
}
}

数据质量指标

dataQuality 字段将数据点和警报(系统警报和自定义警报)的数据质量指标 (DQI) 作为数据本身的一部分提供。这用于确保并告知 API 客户端,DCIM 资产的数据有效且收集可靠。DQI 的加入提高了接收数据质量的透明度。

存储转发指示器

messageRetried 字段作为存储转发指示器 (SNFI) 用于指示 DCIM 数据是否真正接近实时,还是由于 NRT 通道连接中断而延迟发送。如果订阅客户端和发布者之间的连接出现问题,发布者会使用存储转发 (SNF) 机制将消息存储在其端。连接恢复后,这些存储的消息和 NRT 事件会在恢复连接后发送给客户端。由于 SNFI 方法而延迟发送的数据会被标记,因为它们不再是 NRT 数据,与其他正常数据有所区别。

您的 API 应用程序可以根据这两个指标制定业务规则和决策,以提高数据透明度和解决方案效率。

{
"messageRetried": true,
"type": "tag-point",
"data": {
"ibx": "SG2",
"reading": {
"value": "54.0",
"unit": "s"
},
"tag": {
"id": "SG2.UPS-5-RM A22-04:batterytimeremaining",
"displayName": "Battery Time Remaining"
},
"readingTime": "2021-03-25T03:48:00.510Z",
"dataQuality": "Good"
}
}
此页面有帮助吗?