Add collector for Linux kTLS statss#2950
Open
defect wants to merge 3 commits intoprometheus:masterfrom
Open
Conversation
22af13f to
890ceef
Compare
SuperQ
reviewed
Mar 8, 2024
Member
SuperQ
left a comment
There was a problem hiding this comment.
Please add the new collector to the README.
SuperQ
reviewed
Mar 8, 2024
collector/ktls_linux.go
Outdated
| } | ||
|
|
||
| ktlsCurrTxSwDesc := prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "ktls", "tls_curr_tx_sw"), |
Member
There was a problem hiding this comment.
Please make this a const:
Suggested change
| prometheus.BuildFQName(namespace, "ktls", "tls_curr_tx_sw"), | |
| const ktlsSubsystem = "ktls" | |
| ... | |
| prometheus.BuildFQName(namespace, ktlsSubsystem, "tls_curr_tx_sw"), |
SuperQ
reviewed
Mar 8, 2024
collector/ktls_linux.go
Outdated
| nil, nil, | ||
| ) | ||
| ktlsCurrRxSwDesc := prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "ktls", "tls_curr_rx_sw"), |
Member
There was a problem hiding this comment.
These metric names are a bit confusing compared to the help text.
Maybe something like this? We try and make metric names more human friendly.
Suggested change
| prometheus.BuildFQName(namespace, "ktls", "tls_curr_rx_sw"), | |
| prometheus.BuildFQName(namespace, "ktls", "receive_sessions"), |
SuperQ
reviewed
Mar 8, 2024
collector/ktls_linux.go
Outdated
| nil, nil, | ||
| ) | ||
| ktlsRxDeviceDesc := prometheus.NewDesc( | ||
| prometheus.BuildFQName(namespace, "ktls", "tls_rx_device_total"), |
Member
There was a problem hiding this comment.
I'm not sure what "device" is, this appears to be about sessions.
Suggested change
| prometheus.BuildFQName(namespace, "ktls", "tls_rx_device_total"), | |
| prometheus.BuildFQName(namespace, "ktls", "tls_rx_sessions_total"), |
Signed-off-by: Felix Aronsson <felixaronsson@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updating
github.com/prometheus/procfsto v0.13.0, and adding a collector for exporting Linux kTLS statistics. (added toprometheus/procfsin prometheus/procfs#579). The metric names and their descriptions are all based on https://docs.kernel.org/networking/tls.html#statistics.Fixes #2290