跳至内容

事件

使用事件流近乎实时地监控资产中的特定事件和活动数据。

流式网络数据包括以下方面的事件数据:

  • 端口-向上/向下事件。

  • 连接-向上/向下和属性更改事件。

  • 结构云路由器- BGP会话状态,路由聚合状态和路由筛选状态事件。

  • 网络边缘虚拟设备-访问控制列表(ACL),设备属性,重新引导和设备链接组(DLG)事件。

  • 项目-项目事件数据包括项目中所有资产的生命周期状态事件。资产的任何状态更改(包括置备,取消置备和故障)都会导致发送事件。生命周期事件适用于:

    • Fabric 端口
    • Network Edge 虚拟设备
    • Fabric Cloud Router
    • Precision Time
    • Internet Access
    • 虚拟连接-置备/取消置备事件数据可用于端口或云路由器为A侧的连接。故障事件数据不适用于端口到ETree连接,云路由器到虚拟设备连接或云路由器到IPWAN连接。
  • 组织事件-这些事件来自访问管理器和资源管理器,用于通知组织管理员组织内发生的更改事件,例如为用户添加或删除角色。

  • 公司配置文件-配置文件属性,标签和生命周期事件。

请参阅支持的事件列表。

事件格式

我们的事件使用CloudEvents规范来格式化我们所有的事件数据。我们所有的事件数据架构和数据类型都发布在/equinix/equinix-cloudeventsGitHub仓库中。

查看事件

您可以在客户门户中查看以下项目的事件:

  • Fabric 端口
  • Fabric Cloud Router
  • Precision Time 服务
  • 端口或云路由器是A侧的虚拟连接。
  1. 登录客户门户> Fabric Dashboard。

  2. 导航至_Port Inventory_,Fabric云路由器InventoryPrecision Time Inventory_或_Connections Inventory

  3. 选择端口,云路由器,Precision Time服务或虚拟连接。

  4. 从资产的详情页面中,单击_Events_。

从API查看事件

您可以从Equinix API检索单个资产的事件。

注意

每次调用都需要对资产的读取权限。目前,云事件呼叫支持的资产类型包括端口,连接,路由器,都市,组织,项目,虚拟设备和公司配置文件。

和的当前分页限制设置为100GET /fabric/v4/{asset}/{assetId}/cloudevents``POST /fabric/v4/cloudevents/search

此外,POST /fabric/v4/cloudevents/search端点要求主体具有强制的第一级资源UUID。

获取事件

要获取资产的云事件,请向终结点发送GET请求/fabric/v4/{asset}/{assetId}/cloudevents。在路径中指定资产类型和ID。使用可选fromDateTimetoDateTime查询参数将结果缩小到特定时间段。

卷曲请求示例:

curl -X GET 'https://api.equinix.com/fabric/v4/routers/<routerId>/cloudevents?fromDateTime=2025-04-15T17:31:00.000Z&toDateTime=2025-05-15T17:31:00.000Z' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Bearer Token>'

示例响应:

{
"pagination": {
"offset": 0,
"limit": 20,
"total": 4,
"next": null,
"previous": null
},
"data": [
{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/events",
"id": "7e5c0bbe-98e7-4486-b760-fdc39807da5e",
"time": "2025-04-30T01:43:13Z",
"type": "equinix.fabric.router.state.deprovisioned",
"subject": "/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "<projectId>",
"authtype": "system",
"authid": "equinix",
"data": {
"message": "router named FCR-NAME state changed to deprovisioned",
"resource": {
"href": "https://api.equinix.com/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"uuid": "89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"type": "XF_ROUTER",
"name": "FCR-NAME",
"state": "DEPROVISIONED"
},
"auth": {
"type": "system",
"id": "equinix"
}
}
},
{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/events",
"id": "a6dc56f2-af4e-40c0-9910-4850459f8559",
"time": "2025-04-30T01:43:11Z",
"type": "equinix.fabric.router.state.deprovisioning",
"subject": "/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "<projectId>",
"authtype": "user",
"authid": "12345",
"data": {
"message": "router named FCR-NAME state changed to deprovisioning",
"resource": {
"href": "https://api.equinix.com/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"uuid": "89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"type": "XF_ROUTER",
"name": "FCR-NAME",
"state": "DEPROVISIONING"
},
"auth": {
"type": "user",
"id": "12345",
"name": "user1 user1",
"email": "user1@test.com"
}
}
},
{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/events",
"id": "1e4b57d5-97e4-4370-b675-625cd0ed0a4e",
"time": "2025-04-30T01:43:06Z",
"type": "equinix.fabric.router.state.provisioned",
"subject": "/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "<projectId>",
"authtype": "system",
"authid": "equinix",
"data": {
"message": "Router named FCR-NAME successfully provisioned",
"resource": {
"href": "https://api.equinix.com/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"uuid": "89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"type": "XF_ROUTER",
"name": "FCR-NAME",
"state": "PROVISIONED"
},
"auth": {
"type": "system",
"id": "equinix"
}
}
},
{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/events",
"id": "1aa36503-c8f8-4c9c-a52c-06ed67f92a2d",
"time": "2025-04-30T01:43:05Z",
"type": "equinix.fabric.router.state.provisioning",
"subject": "/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "<projectId>",
"authtype": "user",
"authid": "12345",
"data": {
"message": "router named FCR-NAME state changed to provisioning",
"resource": {
"href": "https://api.equinix.com/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"uuid": "89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"type": "XF_ROUTER",
"name": "FCR-NAME",
"state": "PROVISIONING"
},
"auth": {
"type": "user",
"id": "12345",
"name": "user1 user1",
"email": "user1@test.com"
}
}
}
]
}

搜索事件

要在云事件中搜索资产,请向端点发送POST请求/fabric/v4/cloudevents/search。在请求正文中指定搜索准则。

卷曲请求示例:

curl -X POST 'https://api.equinix.com/fabric/v4/cloudevents/search' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer $TOKEN' \
-d '{
"filter": {
"and": [
{
"property": "/type",
"operator": "IN",
"values": [
"equinix.network_edge.device.*"
]
},
{
"property": "/subject",
"operator": "IN",
"values": [
"/ne/v1/devices/903bb0ad-65cd-422c-94d3-a506cce0a36a*"
]
},
{
"property": "/time",
"operator": "BETWEEN",
"values": [
"2025-08-15T17:31:00.000Z",
"2025-08-25T17:31:00.000Z"
]
}
]
},
"pagination": {
"offset": 0,
"limit": 20
}
}'

API参考中提供了可搜索参数的完整列表。

示例响应:

{
"pagination": {
"offset": 0,
"limit": 20,
"total": 2
},
"data": [
{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/cloudevents",
"id": "54ebab18-5e38-46bf-af00-cdbd0bbf7207",
"time": "2025-08-27T20:18:47.300Z",
"type": "equinix.network_edge.device.attribute.changed",
"subject": "/ne/v1/devices/903bb0ad-65cd-422c-94d3-a506cce0a36a",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "4565754-1e33-4dfd-b7c8-0383259cf754",
"authtype": "user",
"authid": "132343",
"data": {
"message": "Device Name changed to New-device",
"resource": {
"name": "Network-edge device",
"status": "PROVISIONED",
"uuid": "df23bb0ad-65cd-422c-94d3-a506cce0a36a",
"type": "DEVICE"
},
"authcontext": {
"type": "user",
"id": "132343",
"name": "Test User",
"email": "user@test.com"
}
}
},
{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/cloudevents",
"id": "71ab91ec-ef19-4def-85f3-1fcac99681c4",
"time": "2025-08-14T19:12:04.726Z",
"type": "equinix.network_edge.device.state.provisioned",
"subject": "/ne/v1/devices/903bb0ad-65cd-422c-94d3-a506cce0a36a",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "4565754-1e33-4dfd-b7c8-0383259cf754",
"authtype": "system",
"authid": "equinix",
"data": {
"message": "Device status changed",
"resource": {
"name": "Network-edge device",
"status": "PROVISIONED",
"uuid": "903bb0ad-65cd-422c-94d3-a506cce0a36a",
"type": "DEVICE"
},
"authcontext": {
"type": "user",
"id": "132343",
"name": "Test User",
"email": "user@test.com"
}
}
}

]
}

获取事件详细信息

要获取指定云事件的详细信息,请向终结点发送GET请求/fabric/v4/cloudevents/<cloudEventId>

卷曲请求示例:

curl -X GET 'https://api.equinix.com/fabric/v4/cloudevents/<cloudEventId>' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <Bearer Token>'

示例响应:

{
"specversion": "1.0",
"source": "https://api.equinix.com/fabric/v4/events",
"id": "a6dc56f2-af4e-40c0-9910-4850459f8559",
"time": "2025-04-30T01:43:11Z",
"type": "equinix.fabric.router.state.deprovisioning",
"subject": "/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"dataschema": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/fabric/v1/ChangeEvent.json",
"datacontenttype": "application/json",
"severitynumber": "9",
"severitytext": "INFO",
"equinixproject": "<projectId>",
"authtype": "user",
"authid": "12345",
"data": {
"message": "router named FCR-NAME state changed to deprovisioning",
"resource": {
"href": "https://api.equinix.com/fabric/v4/routers/89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"uuid": "89b6af8b-21b9-4e20-ab88-2e6e89b68e1d",
"type": "XF_ROUTER",
"name": "FCR-NAME",
"state": "DEPROVISIONING"
},
"auth": {
"type": "user",
"id": "12345",
"name": "user1 user1",
"email": "user1@test.com"
}
}
}

接收器集成中的接收事件

创建流并向该流添加资产后,您可以创建订阅,通过订阅流将事件发送到您选择的第三方数据收集器

创建订阅后, 接收器会在事件发生时接收事件。

例如, 如果将项目附加到流中, 则每当创建或删除资源时, 都可以查看项目中所有受支持资源的资产生命周期事件。

因此,如果您登录客户门户并创建端口,连接,服务令牌,网络等,接收器接收到一个事件:

{ [-]
_source: https://api.equinix.com/fabric/v4/cloudevents
data: { [-]
message: Router named router-name state changed to provisioning
resource:[+]
}
}
equinixproject: 377533000114703
id: d2bb7d5d-3e7b-4638-9023-acdb08cc38a4
severitynumber: 9
severitytext: INFO
subject: /fabric/v4/routers/3cbd8a7f-6878-4492-88a9-1a8be65cc461
time: 2025-02-04T01:43:45Z
type: equinix.fabric.router.state.provisioning

Show as raw text
host = http-inputs-<host>.splunkcloud.com
source = Equinix
source = https://api.equinix.com/fabric/v4/cloudevents

另一个示例是,对于使用直接路由协议和BGP路由协议配置的FCR到端口连接,并且启用或禁用BGP,接收器将收到一个事件。

一旦您的订阅处于活动状态,您就可以访问数据收集器并使用index="index"进行搜索<name_of_splunk_hec>。此搜索应返回Splunk收集的相关事件数据。

{ [-]
   _source: https://api.equinix.com/fabric/v4/cloudevents
   equinixmessage: Virtual port status changed to UP
   id: 5345e011-4478-484b-beb4-38c940ff2f9e
   severitynumber: 9
   severitytext: INFO
   subject: /fabric/v4/ports/c4d85dbe-f965-9659-f7e0-306a5c00af26
   time: 2024-07-26T12:31:53.975Z
   type: equinix.fabric.port.status.up
}
Show as raw text
host = http-inputs-equinix-digin.splunkcloud.com
source = Equinix
sourcetype = _json
此页面有帮助吗?