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 collector for Linux kTLS statss #2950

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

defect
Copy link

@defect defect commented Mar 8, 2024

Updating github.com/prometheus/procfs to v0.13.0, and adding a collector for exporting Linux kTLS statistics. (added to prometheus/procfs in prometheus/procfs#579). The metric names and their descriptions are all based on https://docs.kernel.org/networking/tls.html#statistics.

Fixes #2290

Signed-off-by: Felix Aronsson <felixaronsson@gmail.com>
Signed-off-by: Felix Aronsson <felixaronsson@gmail.com>
Copy link
Member

@SuperQ SuperQ left a comment

Choose a reason for hiding this comment

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

Please add the new collector to the README.

}

ktlsCurrTxSwDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, "ktls", "tls_curr_tx_sw"),
Copy link
Member

Choose a reason for hiding this comment

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

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"),

nil, nil,
)
ktlsCurrRxSwDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, "ktls", "tls_curr_rx_sw"),
Copy link
Member

Choose a reason for hiding this comment

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

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"),

nil, nil,
)
ktlsRxDeviceDesc := prometheus.NewDesc(
prometheus.BuildFQName(namespace, "ktls", "tls_rx_device_total"),
Copy link
Member

Choose a reason for hiding this comment

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

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"),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: tls metrics from /proc/net/tls_stat
2 participants