-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
[feat] add options to aggregate ipvs collector metrics #1708
Comments
You could achieve that with metric relabling. Not sure if we need to change this in the node-exporter. But I could be convinced. It's certainly a corner case. @SuperQ wdyt? |
@discordianfish
IMO, running node exporter on every k8s nodes and kube-proxy using ipvs mode are a very common use case. |
I don't disagree with that, with corner case I meant that even though it's possible to work around this with metric relabling, we might consider helping with this on the exporter side. |
I don't think this can be done with relabeling, as you can't I don't know enough about the data and interaction. But I also think this might go badly. This would be fine for gauge values. But there are a number of counters like |
Please correct me if I'm wrong. |
Looking at the code more closely, there are only labels for the backend metrics, which are only gauges. Adding this aggregation is possible. |
"sum after rate" is always possible. The problem is "rate after sum". If there were per backend counters, and the list of backends changed on one node, it would become invalid to sum them. |
@SuperQ Do you mind if I send PR for this issue? |
Go ahead, Looking at the code a bit, I'm wondering if the way to handle "which things to sum by" would be better done with a flag like:
This way it's easier for the user to see exactly what labels are going to be kept in the output. |
Fixes prometheus#1708 Signed-off-by: Wing924 <[email protected]>
Fixes #1708 Signed-off-by: Wing924 <[email protected]>
…etheus#1709) Fixes prometheus#1708 Signed-off-by: Wing924 <[email protected]>
…etheus#1709) Fixes prometheus#1708 Signed-off-by: Wing924 <[email protected]>
Background
Currently, ipvs collector (enabled by default) collect
(local_address) x (local_port) x (proto) x (remote_address) x (remote_port) x 3
metrics (ex.node_ipvs_backend_connections_active
).When the servers are used as Load Balancer or k8s nodes, the cardinality of those metrics become very high.
For example, one of my server reports 18263 metics from node exporter while normal servers report around 700-800 metrics.
Proposal
Add
--collector.ipvs.sum-by=XXX
option to aggregate metrics for reducing the cardinality.For example, add
--collector.ipvs.sum-by=local_address,local_port
will only reportssum by (local_address,local_port)(node_ipvs_XXXX)
.The text was updated successfully, but these errors were encountered: