Skip to content

Commit

Permalink
Add support for publishing kernel statistics to oximeter (#4355)
Browse files Browse the repository at this point in the history
- Add a `kstat` module in `oximeter_instruments`. This includes a trait
for describing how to map from one or more kstats into oximeter targets
and metrics. It can be used to convert name-value kernel statistics in a
pretty straightforward way into oximeter samples.
- Add a `KstatSampler`, which is used to register kstat targets, and
will periodically poll them to generate samples. It is an
`oximeter::Producer`, so that it can be easily hooked up to produce data
for an `oximeter` collector.
- Add targets for tracking physical, virtual, and guest datalinks.
- Add metrics for bytes in/out, packets in/out, and errors in/out for
the above.
- Use the `KstatStampler` in a new `MetricsManager` type in the sled
agent, and track the physical (underlay) data links on a system. Does
not yet track any virtual or guest links. The manager can be used to
also collect other statistics, such as HTTP request latencies similar to
nexus, or any kstats through the sampler.
  • Loading branch information
bnaecker authored Nov 8, 2023
1 parent 6478a97 commit 6a0995a
Show file tree
Hide file tree
Showing 13 changed files with 5,541 additions and 455 deletions.
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ ipcc-key-value = { path = "ipcc-key-value" }
ipnetwork = { version = "0.20", features = ["schemars"] }
itertools = "0.11.0"
key-manager = { path = "key-manager" }
kstat-rs = "0.2.3"
lazy_static = "1.4.0"
libc = "0.2.150"
linear-map = "1.2.0"
Expand Down
Loading

0 comments on commit 6a0995a

Please sign in to comment.