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

Add switch/sled metadata to ddm/mgd related timeseries #6955

Draft
wants to merge 8 commits into
base: zl/tfportd-oximeter
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
30 changes: 0 additions & 30 deletions clients/sled-agent-client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,36 +389,6 @@ impl From<omicron_common::api::internal::shared::NetworkInterfaceKind>
}
}

impl From<omicron_common::api::internal::shared::SledIdentifiers>
for types::SledIdentifiers
{
fn from(
value: omicron_common::api::internal::shared::SledIdentifiers,
) -> Self {
Self {
model: value.model,
rack_id: value.rack_id,
revision: value.revision,
serial: value.serial,
sled_id: value.sled_id,
}
}
}

impl From<types::SledIdentifiers>
for omicron_common::api::internal::shared::SledIdentifiers
{
fn from(value: types::SledIdentifiers) -> Self {
Self {
model: value.model,
rack_id: value.rack_id,
revision: value.revision,
serial: value.serial,
sled_id: value.sled_id,
}
}
}

/// Exposes additional [`Client`] interfaces for use by the test suite. These
/// are bonus endpoints, not generated in the real client.
#[async_trait]
Expand Down
2 changes: 1 addition & 1 deletion common/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub const MGS_PORT: u16 = 12225;
pub const WICKETD_PORT: u16 = 12226;
pub const BOOTSTRAP_ARTIFACT_PORT: u16 = 12227;
pub const CRUCIBLE_PANTRY_PORT: u16 = 17000;

pub const TFPORTD_PORT: u16 = 12231;
pub const NEXUS_INTERNAL_PORT: u16 = 12221;

/// The port on which Nexus exposes its external API on the underlay network.
Expand Down
25 changes: 25 additions & 0 deletions oximeter/db/schema/replicated/13/timeseries-to-delete.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
switch_data_link:bytes_sent
switch_data_link:bytes_received
switch_data_link:errors_sent
switch_data_link:errors_received
switch_data_link:receive_crc_error_drops
switch_data_link:receive_buffer_full_drops
switch_data_link:packets_sent
switch_data_link:packets_received
switch_data_link:link_up
switch_data_link:link_enabled
switch_data_link:link_fsm
switch_data_link:pcs_bad_sync_headers
switch_data_link:pcs_errored_blocks
switch_data_link:pcs_block_lock_loss
switch_data_link:pcs_high_ber
switch_data_link:pcs_valid_errors
switch_data_link:pcs_invalid_errors
switch_data_link:pcs_unknown_errors
switch_data_link:pcs_sync_loss
switch_data_link:fec_high_symbol_errors
switch_data_link:fec_sync_aligned
switch_data_link:fec_corrected_blocks
switch_data_link:fec_uncorrected_blocks
switch_data_link:fec_symbol_errors
dendrite:sample_collection_duration
53 changes: 53 additions & 0 deletions oximeter/db/schema/replicated/14/timeseries-to-delete.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
bgp_session:active_connections_accepted
bgp_session:connection_retries
bgp_session:hold_timer_expirations
bgp_session:idle_hold_timer_expirations
bgp_session:keepalive_send_failures
bgp_session:keepalives_received
bgp_session:keepalives_sent
bgp_session:notification_send_failures
bgp_session:open_handle_failures
bgp_session:open_send_failures
bgp_session:opens_received
bgp_session:opens_sent
bgp_session:passive_connections_accepted
bgp_session:prefixes_advertised
bgp_session:prefixes_imported
bgp_session:transition_to_active
bgp_session:transition_to_connect
bgp_session:transition_to_established
bgp_session:transition_to_idle
bgp_session:transition_to_open_confirm
bgp_session:transition_to_open_sent
bgp_session:transition_to_session_setup
bgp_session:unexpected_keepalive_messages
bgp_session:unexpected_open_messages
bgp_session:unexpected_update_messages
bgp_session:update_nexthop_missing
bgp_session:update_send_failures
bgp_session:updates_received
bgp_session:updates_sent
bfd_session:control_packet_send_failures
bfd_session:control_packets_sent
bfd_session:control_packets_received
bfd_session:message_receive_error
bfd_session:timeout_expired
bfd_session:transition_to_down
bfd_session:transition_to_init
bfd_session:transition_to_up
mg_lower:routes_blocked_by_link_state
switch_rib:active_routes
ddm_session:advertisements_received
ddm_session:advertisements_sent
ddm_session:imported_tunnel_endpoints
ddm_session:imported_underlay_prefixes
ddm_session:peer_address_changes
ddm_session:peer_expirations
ddm_session:peer_sessions_established
ddm_session:solicitations_received
ddm_session:solicitations_sent
ddm_session:update_send_fail
ddm_session:updates_received
ddm_session:updates_sent
ddm_router:originated_tunnel_endpoints
ddm_router:originated_underlay_prefixes
25 changes: 25 additions & 0 deletions oximeter/db/schema/single-node/13/timeseries-to-delete.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
switch_data_link:bytes_sent
switch_data_link:bytes_received
switch_data_link:errors_sent
switch_data_link:errors_received
switch_data_link:receive_crc_error_drops
switch_data_link:receive_buffer_full_drops
switch_data_link:packets_sent
switch_data_link:packets_received
switch_data_link:link_up
switch_data_link:link_enabled
switch_data_link:link_fsm
switch_data_link:pcs_bad_sync_headers
switch_data_link:pcs_errored_blocks
switch_data_link:pcs_block_lock_loss
switch_data_link:pcs_high_ber
switch_data_link:pcs_valid_errors
switch_data_link:pcs_invalid_errors
switch_data_link:pcs_unknown_errors
switch_data_link:pcs_sync_loss
switch_data_link:fec_high_symbol_errors
switch_data_link:fec_sync_aligned
switch_data_link:fec_corrected_blocks
switch_data_link:fec_uncorrected_blocks
switch_data_link:fec_symbol_errors
dendrite:sample_collection_duration
39 changes: 39 additions & 0 deletions oximeter/db/schema/single-node/14/timeseries-to-delete.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
bgp_session:active_connections_accepted
bgp_session:connection_retries
bgp_session:hold_timer_expirations
bgp_session:idle_hold_timer_expirations
bgp_session:keepalive_send_failures
bgp_session:keepalives_received
bgp_session:keepalives_sent
bgp_session:notification_send_failures
bgp_session:open_handle_failures
bgp_session:open_send_failures
bgp_session:opens_received
bgp_session:opens_sent
bgp_session:passive_connections_accepted
bgp_session:prefixes_advertised
bgp_session:prefixes_imported
bgp_session:transition_to_active
bgp_session:transition_to_connect
bgp_session:transition_to_established
bgp_session:transition_to_idle
bgp_session:transition_to_open_confirm
bgp_session:transition_to_open_sent
bgp_session:transition_to_session_setup
bgp_session:unexpected_keepalive_messages
bgp_session:unexpected_open_messages
bgp_session:unexpected_update_messages
bgp_session:update_nexthop_missing
bgp_session:update_send_failures
bgp_session:updates_received
bgp_session:updates_sent
bfd_session:control_packet_send_failures
bfd_session:control_packets_sent
bfd_session:control_packets_received
bfd_session:message_receive_error
bfd_session:timeout_expired
bfd_session:transition_to_down
bfd_session:transition_to_init
bfd_session:transition_to_up
mg_lower:routes_blocked_by_link_state
switch_rib:active_routes
2 changes: 1 addition & 1 deletion oximeter/db/src/model.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use uuid::Uuid;
/// - [`crate::Client::initialize_db_with_version`]
/// - [`crate::Client::ensure_schema`]
/// - The `clickhouse-schema-updater` binary in this crate
pub const OXIMETER_VERSION: u64 = 12;
pub const OXIMETER_VERSION: u64 = 14;

// Wrapper type to represent a boolean in the database.
//
Expand Down
60 changes: 56 additions & 4 deletions oximeter/oximeter/schema/bfd-session.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "bfd_session"
description = "A Bidirectional Forwarding Protocol (BFD) session"
authz_scope = "fleet"
versions = [
{ version = 1, fields = [ "hostname", "rack_id", "sled_id", "peer" ] },
{ version = 1, fields = [ "hostname", "peer", "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_fab", "switch_lot", "switch_wafer", "switch_wafer_loc_x", "switch_wafer_loc_y", "switch_model", "switch_revision", "switch_serial", "switch_slot" ] },
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@bnaecker, there's a question about which switch and sled fields we really need. Is it just switch_id (what Ry recommended)? Do we include anything beyond sled_id for sled stuff? I laid everything out as we get all the data (either via smf or dpd-client), but it's easy to restrict this. Thoughts?

]

[[metrics]]
Expand Down Expand Up @@ -88,6 +88,10 @@ versions = [
type = "string"
description = "The hostname of the machine running the BFD session"

[fields.peer]
type = "ip_addr"
description = "Address of the BFD session peer"

[fields.rack_id]
type = "uuid"
description = "ID of the rack running the BFD session"
Expand All @@ -96,6 +100,54 @@ description = "ID of the rack running the BFD session"
type = "uuid"
description = "ID of the sled running the BFD session"

[fields.peer]
type = "ip_addr"
description = "Address of the BFD session peer"
[fields.sled_model]
type = "string"
description = "Model number of the sled running the BFD session"

[fields.sled_revision]
type = "u32"
description = "Revision number of the sled running the BFD session"

[fields.sled_serial]
type = "string"
description = "Serial number of the sled running the BFD session"

[fields.switch_id]
type = "uuid"
description = "ID of the switch running the BFD session"

[fields.switch_fab]
type = "string"
description = "Fabrication plant identifier of the switch running the BFD session"

[fields.switch_lot]
type = "string"
description = "Lot number of the switch running the BFD session"

[fields.switch_wafer]
type = "u8"
description = "Wafer number of the switch running the BFD session"

[fields.switch_wafer_loc_x]
type = "i8"
description = "X-coordinate wafer location of the switch running the BFD session"

[fields.switch_wafer_loc_y]
type = "i8"
description = "Y-coordinate wafer location of the switch running the BFD session"

[fields.switch_model]
type = "string"
description = "The model number switch running the BFD session"

[fields.switch_revision]
type = "u32"
description = "Revision number of the switch running the BFD session"

[fields.switch_serial]
type = "string"
description = "Serial number of the switch running the BFD session"

[fields.switch_slot]
type = "u16"
description = "Slot number of the switch running the BFD session"
54 changes: 53 additions & 1 deletion oximeter/oximeter/schema/bgp-session.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name = "bgp_session"
description = "A peer-to-peer session of the Border Gateway Protocol"
authz_scope = "fleet"
versions = [
{ version = 1, fields = [ "hostname", "local_asn", "peer", "rack_id", "sled_id" ] }
{ version = 1, fields = [ "hostname", "local_asn", "peer", "rack_id", "sled_id", "sled_model", "sled_revision", "sled_serial", "switch_id", "switch_fab", "switch_lot", "switch_wafer", "switch_wafer_loc_x", "switch_wafer_loc_y", "switch_model", "switch_revision", "switch_serial", "switch_slot" ] }
]

[[metrics]]
Expand Down Expand Up @@ -291,3 +291,55 @@ description = "ID of the rack on which our BGP peer is running"
[fields.sled_id]
type = "uuid"
description = "ID of the sled on which our BGP peer is running"

[fields.sled_model]
type = "string"
description = "Model number of the sled on which our BGP peer is running"

[fields.sled_revision]
type = "u32"
description = "Revision number of the sled on which our BGP peer is running"

[fields.sled_serial]
type = "string"
description = "Serial number of the sled on which our BGP peer is running"

[fields.switch_id]
type = "uuid"
description = "ID of the switch on which our BGP peer is running"

[fields.switch_fab]
type = "string"
description = "Fabrication plant identifier on of the switch on which our BGP peer is running"

[fields.switch_lot]
type = "string"
description = "Lot number of the switch on which our BGP peer is running"

[fields.switch_wafer]
type = "u8"
description = "Wafer number of the switch on which our BGP peer is running"

[fields.switch_wafer_loc_x]
type = "i8"
description = "X-coordinate wafer location of the switch on which our BGP peer is running"

[fields.switch_wafer_loc_y]
type = "i8"
description = "Y-coordinate wafer location of the switch on which our BGP peer is running"

[fields.switch_model]
type = "string"
description = "The model number switch on which our BGP peer is running"

[fields.switch_revision]
type = "u32"
description = "Revision number of the switch on which our BGP peer is running"

[fields.switch_serial]
type = "string"
description = "Serial number of the switch on which our BGP peer is running"

[fields.switch_slot]
type = "u16"
description = "Slot number of the switch on which our BGP peer is running"
Loading
Loading