From 2e984ecebe21352ff8fbdfaf1366e332b4cedb95 Mon Sep 17 00:00:00 2001 From: Zeeshan Lakhani Date: Mon, 12 Aug 2024 19:50:54 +0000 Subject: [PATCH] wip: instance-data-link --- oximeter/instruments/src/kstat/mod.rs | 1 + .../oximeter/schema/instance-data-link.toml | 86 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 oximeter/oximeter/schema/instance-data-link.toml diff --git a/oximeter/instruments/src/kstat/mod.rs b/oximeter/instruments/src/kstat/mod.rs index a5020b9b615..4293fbb2371 100644 --- a/oximeter/instruments/src/kstat/mod.rs +++ b/oximeter/instruments/src/kstat/mod.rs @@ -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; diff --git a/oximeter/oximeter/schema/instance-data-link.toml b/oximeter/oximeter/schema/instance-data-link.toml new file mode 100644 index 00000000000..184b6294faa --- /dev/null +++ b/oximeter/oximeter/schema/instance-data-link.toml @@ -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"