Skip to content

Commit

Permalink
wip: instance-data-link
Browse files Browse the repository at this point in the history
  • Loading branch information
zeeshanlakhani committed Aug 12, 2024
1 parent 3ad79c1 commit 2e984ec
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 0 deletions.
1 change: 1 addition & 0 deletions oximeter/instruments/src/kstat/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ use chrono::Utc;
use kstat_rs::Data;
use kstat_rs::Error as KstatError;
use kstat_rs::Kstat;
use kstat_rs::Named;
use kstat_rs::NamedData;
use kstat_rs::NamedType;
use oximeter::FieldValue;
Expand Down
86 changes: 86 additions & 0 deletions oximeter/oximeter/schema/instance-data-link.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
format_version = 1

[target]
name = "instance_data_link"
description = "A network data link related to a guest/instance"
authz_scope = "fleet"
versions = [
{ version = 1, fields = [ "kind", "link_name", "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "zone_name" ] },
]

[[metrics]]
name = "bytes_sent"
description = "Total number of bytes sent on the data link"
units = "bytes"
datum_type = "cumulative_u64"
versions = [
{ added_in = 1, fields = [] }
]

[[metrics]]
name = "bytes_received"
description = "Total number of bytes received on the data link"
units = "bytes"
datum_type = "cumulative_u64"
versions = [
{ added_in = 1, fields = [] }
]

[[metrics]]
name = "packets_sent"
description = "Total number of packets sent on the data link"
units = "count"
datum_type = "cumulative_u64"
versions = [
{ added_in = 1, fields = [] }
]

[[metrics]]
name = "packets_received"
description = "Total number of packets received on the data link"
units = "count"
datum_type = "cumulative_u64"
versions = [
{ added_in = 1, fields = [] }
]

[[metrics]]
name = "packets_dropped"
description = "Number of packets dropped on the RX queue of the data link"
units = "count"
datum_type = "cumulative_u64"
versions = [
{ added_in = 1, fields = [] }
]

[fields.kind]
type = "string"
description = "The kind or class of the data link"

[fields.link_name]
type = "string"
description = "Name of the data link"

[fields.rack_id]
type = "uuid"
description = "ID of the rack the link's switch is in"

[fields.sled_id]
type = "uuid"
description = "ID of the sled managing the link's switch"

[fields.sled_model]
type = "string"
description = "Model number of the sled managing the link's switch"

[fields.sled_revision]
type = "u32"
description = "Revision number of the sled managing the link's switch"

[fields.sled_serial]
type = "string"
description = "Serial number of the sled managing the link's switch"

[fields.zone_name]
type = "string"
description = "Name of the zone owning the link"

0 comments on commit 2e984ec

Please sign in to comment.