Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add initial event schemas with Supported Event Types #2

Merged
merged 24 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from 23 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4c060f2
Add initial event schemas with Supported Event Types
thogarty Nov 5, 2024
58b9153
Use latest version of Data Schemas from Equinix Observability Spreads…
thogarty Nov 6, 2024
3b288fc
Add change to data schemas
thogarty Nov 6, 2024
e2bcf6e
Update data schemas to align with design and include data loader upda…
thogarty Nov 7, 2024
992588b
Remove unnecessary lines in data loader update script
thogarty Nov 7, 2024
e18f812
Add in metric event type to supported event types
thogarty Nov 7, 2024
4c022ab
Update paths processing of jsonschema directory from data_loader script
thogarty Nov 9, 2024
6dd8167
Add automation for json catalog creation and README table regeneration
thogarty Nov 12, 2024
74b6233
Add .gitignore for repo
thogarty Nov 12, 2024
0e891b2
Change schemas to align with confluence wiki
thogarty Nov 14, 2024
78f7d9d
Update the event names
thogarty Nov 14, 2024
97c9bab
Respond to PR review comments
thogarty Nov 14, 2024
0659d06
Remove change from metric resource and update attribute names for met…
thogarty Nov 14, 2024
2b081c3
Update eventTypes, metricTypes, and DataLoader file structure
thogarty Nov 14, 2024
aa2881c
Change attribute name from metricTypes to metricNames
thogarty Nov 15, 2024
1473688
Update metricTypes to metricNames and update json catalog and README.…
thogarty Nov 15, 2024
1c0b1d1
Test github pages table build
thogarty Nov 15, 2024
5566a20
Test markdown processor for github pages
thogarty Nov 15, 2024
10e5e5e
Test table markdown processing on github pages
thogarty Nov 15, 2024
e4e18fe
Test markdown processor for github pages
thogarty Nov 15, 2024
8ec5858
Test github pages markdown processing
thogarty Nov 15, 2024
bc141f1
Test table processing for github pages
thogarty Nov 15, 2024
d1078d8
Use blank line for start and end of table
thogarty Nov 15, 2024
2c9680c
Add change from metricTypes to metricNames in DataLoader file
thogarty Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# OS X Finder Files
.DS_Store

# Local Setup Scripts for Repo
local_helper_scripts/*
44 changes: 44 additions & 0 deletions DataLoader.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"fabric": {
"eventTypes": [
"equinix.fabric.connection.attribute.changed",
"equinix.fabric.connection.bgpipv4_session_status.connect",
"equinix.fabric.connection.bgpipv4_session_status.established",
"equinix.fabric.connection.bgpipv4_session_status.idle",
"equinix.fabric.connection.bgpipv6_session_status.connect",
"equinix.fabric.connection.bgpipv6_session_status.established",
"equinix.fabric.connection.bgpipv6_session_status.idle",
"equinix.fabric.connection.state.deprovisioned",
"equinix.fabric.connection.state.deprovisioning",
"equinix.fabric.connection.state.pending",
"equinix.fabric.connection.state.pending_approval",
"equinix.fabric.connection.state.pending_interface_configuration",
"equinix.fabric.connection.state.provisioned",
"equinix.fabric.connection.state.provisioning",
"equinix.fabric.connection.status.down",
"equinix.fabric.connection.status.up",
"equinix.fabric.metric",
"equinix.fabric.network.state.deprovisioned",
"equinix.fabric.network.state.deprovisioning",
"equinix.fabric.network.state.provisioned",
"equinix.fabric.network.state.provisioning",
"equinix.fabric.port.state.deprovisioned",
"equinix.fabric.port.state.failed",
"equinix.fabric.port.state.provisioned",
"equinix.fabric.port.status.down",
"equinix.fabric.port.status.up",
"equinix.fabric.router.state.deprovisioned",
"equinix.fabric.router.state.deprovisioning",
"equinix.fabric.router.state.failed",
"equinix.fabric.router.state.not_deprovisioned",
"equinix.fabric.router.state.not_provisioned",
"equinix.fabric.router.state.provisioned",
"equinix.fabric.router.state.provisioning",
"equinix.fabric.router.state.reprovisioning",
"equinix.fabric.service_token.attribute.changed",
"equinix.fabric.service_token.state.deleted",
"equinix.fabric.service_token.state.inactive"
],
"metricTypes": []
}
}
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,19 @@
# cloud-events
Equinix published CloudEvents Types

Equinix published [CloudEvent](https://cloudevents.io/) Types

Definitive "source of truth" for the Equinix Observability event data formats

## CloudEvents in this repository

The following data payloads are the supported events and formats for Equinix Observability

<!-- CATALOG_GENERATION_START -->

|Product|Schemas|Types|
|Equinix Fabric ChangeAlert|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeAlert.json)|<br>Data Type:<br>`equinix.events.fabric.v1.ChangeAlert`<br>CloudEvent Type(s):<br><br>|
|Equinix Fabric ChangeEvent|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeEvent.json)|<br>Data Type:<br>`equinix.events.fabric.v1.ChangeEvent`<br>CloudEvent Type(s):<br>`equinix.fabric.router.state.provisioning`<br>`equinix.fabric.router.state.provisioned`<br>`equinix.fabric.router.state.reprovisioning`<br>`equinix.fabric.router.state.deprovisioning`<br>`equinix.fabric.router.state.deprovisioned`<br>`equinix.fabric.router.state.failed`<br>`equinix.fabric.router.state.not_provisioned`<br>`equinix.fabric.router.state.not_deprovisioned`<br>`equinix.fabric.port.state.provisioned`<br>`equinix.fabric.port.state.deprovisioned`<br>`equinix.fabric.port.state.failed`<br>`equinix.fabric.port.status.up`<br>`equinix.fabric.port.status.down`<br>`equinix.fabric.service_token.state.inactive`<br>`equinix.fabric.service_token.state.deleted`<br>`equinix.fabric.service_token.attribute.changed`<br>`equinix.fabric.connection.state.pending`<br>`equinix.fabric.connection.state.pending_interface_configuration`<br>`equinix.fabric.connection.state.provisioning`<br>`equinix.fabric.connection.state.provisioned`<br>`equinix.fabric.connection.state.deprovisioning`<br>`equinix.fabric.connection.state.deprovisioned`<br>`equinix.fabric.connection.state.pending_approval`<br>`equinix.fabric.connection.attribute.changed`<br>`equinix.fabric.connection.status.up`<br>`equinix.fabric.connection.status.down`<br>`equinix.fabric.connection.bgpipv4_session_status.established`<br>`equinix.fabric.connection.bgpipv4_session_status.idle`<br>`equinix.fabric.connection.bgpipv4_session_status.connect`<br>`equinix.fabric.connection.bgpipv6_session_status.established`<br>`equinix.fabric.connection.bgpipv6_session_status.idle`<br>`equinix.fabric.connection.bgpipv6_session_status.connect`<br>`equinix.fabric.network.state.provisioning`<br>`equinix.fabric.network.state.provisioned`<br>`equinix.fabric.network.state.deprovisioning`<br>`equinix.fabric.network.state.deprovisioned`<br>|
|Equinix Fabric MetricAlert|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricAlert.json)|<br>Data Type:<br>`equinix.events.fabric.v1.MetricAlert`<br>CloudEvent Type(s):<br><br>|
|Equinix Fabric MetricEvent|[JSON](https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricEvent.json)|<br>Data Type:<br>`equinix.events.fabric.v1.MetricEvent`<br>CloudEvent Type(s):<br>`equinix.fabric.metric`<br><br>Metric Type(s):<br>`equinix.fabric.port.packets_erred_rx.count`<br>`equinix.fabric.port.packets_erred_tx.count`<br>`equinix.fabric.port.packets_dropped_rx.count`<br>`equinix.fabric.port.packets_dropped_tx.count`<br>`equinix.fabric.metro.{:asideMetroCode}_{:zsideMetroCode}.latency`<br>`equinix.fabric.connection.bandwidth_rx.usage`<br>`equinix.fabric.connection.bandwidth_tx.usage`<br>`equinix.fabric.port.bandwidth_rx.usage`<br>`equinix.fabric.port.bandwidth_tx.usage`|

<!-- CATALOG_GENERATION_END -->
89 changes: 87 additions & 2 deletions jsonschema/catalog.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,88 @@
{

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please add am/crh and NE sections

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This catalog is for json validation only. Follows strict schema set in https://json.schemastore.org/schema-catalog

"events": "Details of events to be published on github webpages."
}
"$schema": "https://json.schemastore.org/schema-catalog",
"version": 1,
"schemas": [
{
"url": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeAlert.json",
"product": "Equinix Fabric ChangeAlert",
"name": "ChangeAlert",
"description": "The data within all ChangeAlert events.",
"datatype": "equinix.events.fabric.v1.ChangeAlert",
"cloudeventTypes": []
},
{
"url": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeEvent.json",
"product": "Equinix Fabric ChangeEvent",
"name": "ChangeEvent",
"description": "The data within all ChangeEvent events.",
"datatype": "equinix.events.fabric.v1.ChangeEvent",
"cloudeventTypes": [
"equinix.fabric.router.state.provisioning",
"equinix.fabric.router.state.provisioned",
"equinix.fabric.router.state.reprovisioning",
"equinix.fabric.router.state.deprovisioning",
"equinix.fabric.router.state.deprovisioned",
"equinix.fabric.router.state.failed",
"equinix.fabric.router.state.not_provisioned",
"equinix.fabric.router.state.not_deprovisioned",
"equinix.fabric.port.state.provisioned",
"equinix.fabric.port.state.deprovisioned",
"equinix.fabric.port.state.failed",
"equinix.fabric.port.status.up",
"equinix.fabric.port.status.down",
"equinix.fabric.service_token.state.inactive",
"equinix.fabric.service_token.state.deleted",
"equinix.fabric.service_token.attribute.changed",
"equinix.fabric.connection.state.pending",
"equinix.fabric.connection.state.pending_interface_configuration",
"equinix.fabric.connection.state.provisioning",
"equinix.fabric.connection.state.provisioned",
"equinix.fabric.connection.state.deprovisioning",
"equinix.fabric.connection.state.deprovisioned",
"equinix.fabric.connection.state.pending_approval",
"equinix.fabric.connection.attribute.changed",
"equinix.fabric.connection.status.up",
"equinix.fabric.connection.status.down",
"equinix.fabric.connection.bgpipv4_session_status.established",
"equinix.fabric.connection.bgpipv4_session_status.idle",
"equinix.fabric.connection.bgpipv4_session_status.connect",
"equinix.fabric.connection.bgpipv6_session_status.established",
"equinix.fabric.connection.bgpipv6_session_status.idle",
"equinix.fabric.connection.bgpipv6_session_status.connect",
"equinix.fabric.network.state.provisioning",
"equinix.fabric.network.state.provisioned",
"equinix.fabric.network.state.deprovisioning",
"equinix.fabric.network.state.deprovisioned"
]
},
{
"url": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricAlert.json",
"product": "Equinix Fabric MetricAlert",
"name": "MetricAlert",
"description": "The data within all MetricAlert events.",
"datatype": "equinix.events.fabric.v1.MetricAlert",
"cloudeventTypes": []
},
{
"url": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/MetricEvent.json",
"product": "Equinix Fabric MetricEvent",
"name": "MetricEvent",
"description": "The data within all MetricEvent events.",
"datatype": "equinix.events.fabric.v1.MetricEvent",
"cloudeventTypes": [
"equinix.fabric.metric"
],
"metricNames": [
"equinix.fabric.port.packets_erred_rx.count",
"equinix.fabric.port.packets_erred_tx.count",
"equinix.fabric.port.packets_dropped_rx.count",
"equinix.fabric.port.packets_dropped_tx.count",
"equinix.fabric.metro.{:asideMetroCode}_{:zsideMetroCode}.latency",
"equinix.fabric.connection.bandwidth_rx.usage",
"equinix.fabric.connection.bandwidth_tx.usage",
"equinix.fabric.port.bandwidth_rx.usage",
"equinix.fabric.port.bandwidth_tx.usage"
]
}
]
}

This file was deleted.

155 changes: 155 additions & 0 deletions jsonschema/equinix/events/fabric/v1/ChangeAlert.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
{
"$id": "https://equinix.github.io/equinix-cloudevents/jsonschema/equinix/events/fabric/v1/ChangeAlert.json",
"name": "ChangeAlert",
"examples": [],
"package": "equinix.events.fabric.v1",
"datatype": "equinix.events.fabric.v1.ChangeAlert",
"cloudeventTypes": [],
"product": "Equinix Fabric ChangeAlert",
"$schema": "http://json-schema.org/draft-04/schema#",
"$ref": "#/definitions/Data",
"definitions": {
"Data": {
"properties": {
"resource": {
"$ref": "#/definitions/Resource",
"additionalProperties": true,
"description": "Optional. The Backup event payload. Unset for deletion events."
},
"alertRule": {
"type": "object",
"items": {
"$ref": "#/definitions/AlertRule",
"additionalProperties": true
},
"description": "Metadata about the AlertRule triggering the Alert"
},
"message": {
"type": "string",
"description": "Supporting message describing the event"
}
},
"additionalProperties": true,
"type": "object",
"title": "ChangeAlert Event Data",
"description": "The data within all ChangeAlert events."
},
"Resource": {
"properties": {
"href": {
"type": "string",
"description": "Link to the resource that has generated the event"
},
"type": {
"type": "string",
"description": "Type of the resource generating the event"
},
"uuid": {
"type": "string",
"description": "Equinix assigned unique identifier of the resource generating the event"
},
"name": {
"type": "string",
"description": "Name of the resource generating the event"
},
"state": {
"type": "string",
"description": "State of the resource generating the event"
},
"description": {
"type": "string",
"description": "Description of the resource generating the event"
},
"change": {
"$ref": "#/definitions/Change",
"additionalProperties": true,
"description": "Change information for the resource that fired the event"
}
},
"additionalProperties": true,
"type": "object",
"title": "Resource",
"description": "Schema of the resource that fired the event"
},
"AlertRule": {
"properties": {
"href": {
"type": "string",
"description": "Link to the resource that has generated the alert"
},
"type": {
"type": "string",
"description": "Type of the resource generating the alert"
},
"uuid": {
"type": "string",
"description": "Equinix assigned unique identifier of the resource generating the alert"
},
"name": {
"type": "string",
"description": "Name of the resource generating the event"
}
},
"additionalProperties": true,
"type": "object",
"title": "AlertRule",
"description": "Schema definition of AlertRule data"
},
"Change": {
"properties": {
"uuid": {
"type": "string",
"description": "Uuid of the of change for the resource target of the event"
},
"type": {
"type": "string",
"description": "Type of the change happening on the resource for the target of the event"
},
"status": {
"type": "string",
"description": "Status of the change event on the resource target"
},
"createdDateTime": {
"type": "string",
"description": "The time that the resource that fired the event was created",
"format": "date-time"
},
"data": {
"type": "array",
"description": "Data of the change event",
"items": {
"$ref": "#/definitions/ChangeData"
}
}
},
"additionalProperties": true,
"type": "object",
"title": "Change",
"description": "Change attribute schema"
},
"ChangeData": {
"properties": {
"op": {
"type": "string",
"description": "The operation performed on the resource under change"
},
"path": {
"type": "string",
"description": "The attribute on the resource being changed"
},
"value": {
"type": "string",
"description": "The current value of the attribute under change"
},
"previousValue": {
"type": "string",
"description": "The previous value of the attribute under change"
}
},
"additionalProperties": true,
"type": "object",
"title": "ChangeData",
"description": "ChangeData attribute schema"
}
}
}
Loading