Skip to content

ottl(pattern-2): node_infiniband -> hw.network.ib.* recipe #393

Description

@trilamsr

Problem

The pattern-#2 (InfiniBand link flap) detector library + processor wiring shipped in earlier work and the operator-facing walkthrough lands in #391 (closes #300). But the metrics→logs OTTL recipe that projects node_infiniband_port_state_id (from node_exporter --collector.infiniband) onto the customer-stable hw.network.ib.* log-record namespace has not landed. Until it does, the detector is configured-but-quiet on a real deployment — no input ever arrives at the projector.

Sibling gap pattern to #284 / #285 (PCIe AER OTTL stanzas) and gated on the broader RFC-0014 PR-B metrics→logs bridge.

Customer-stable contract (already declared)

Wire shape the OTTL recipe must produce (verified against module/processor/patterndetectorprocessor/ib_link_flap.go projector + docs/ATTRIBUTES.md):

  • hw.network.ib.port.stateint, IBA-spec phys_state ID (1=Down, 2=Initialize, 3=Armed, 4=Active).
  • hw.network.ib.device — string, per-NIC device name (e.g. mlx5_0).
  • hw.network.ib.port.num — int, IB port index (typically 1 or 2 on ConnectX boards).
  • Resource: k8s.node.name (stamped by k8sattributes).

One log record per scrape per (device, port) tuple.

Proposed recipe shape

Extends docs/integrations/prometheus-scrape.md with an IB stanza. Source series: node_infiniband_port_state_id{device, port, instance}. OTTL projection:

  • set(attributes["hw.network.ib.device"], attributes["device"])
  • set(attributes["hw.network.ib.port.num"], Int(attributes["port"]))
  • set(attributes["hw.network.ib.port.state"], Int(value))

(Approximate — final shape resolved during impl alongside the metrics-to-logs bridge in RFC-0014 PR-B.)

Acceptance

  • docs/integrations/prometheus-scrape.md carries an IB stanza producing the wire shape above.
  • An end-to-end test in module/processor/patterndetectorprocessor/ round-trips the recipe output through IBLinkFlapDetector and asserts a verdict fires.
  • The "Integration gap" section in docs/patterns/pattern-2-ib-link-flap.md can be deleted (or flipped to "shipped").

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions