-
Notifications
You must be signed in to change notification settings - Fork 39
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
Enable sysctl collector. #5285
Enable sysctl collector. #5285
Conversation
Also track tcp_mem.
so.... i don't think this works as you might expect. ;)
this means that we'd just be monitoring values that never change. :) |
This won't help us track usage, but it will help us keep track of how our nodes are configured. |
Now that we know this is an issue with ephemeral ports, do we still need this? Can the work done here be used to track and send info to prometheus regarding the number of in use ephemeral ports going to hub:8081 from the chp? |
I don't think the sysctl collector will help, although sysctl can report on the ephemeral port range with But I think it does make sense to tracking the number of ports in use. You'd need to use prometheus-node-exporter's textfile collector, e.g. #!/bin/bash
# Define the ephemeral port range (default Linux is 32768-60999)
read low high < /proc/sys/net/ipv4/ip_local_port_range
# Count the number of open TCP connections in the ephemeral port range
used_ports=$(ss -tan | awk -v low=$low -v high=$high '{split($4, a, ":"); port=a[length(a)]; if (port >= low && port <= high) print port}' | wc -l)
# Calculate total possible ephemeral ports
total_ports=$((high - low))
# Create a Prometheus-compatible metric output
echo "ephemeral_ports_in_use $used_ports"
echo "ephemeral_ports_total $total_ports" On a non-cluster node I would run the script above and write to In the cluster we have the prometheus helm chart installed in the In any case, this git issue can be renamed to track this, or you can close it and open a new one. |
Of course, I think you had a script that was more specific in terms of tracking the proxy ports, but you get the gist. |
yep, this exactly. we need to report the dynamic number of ephemeral ports in use and ryan's quick bash script is a great start. #!/bin/bash
# Define the ephemeral port range (default Linux is 32768-60999)
read low high < /proc/sys/net/ipv4/ip_local_port_range
# Count the number of open TCP connections in the ephemeral port range
used_ports=$(ss -tan | awk -v low=$low -v high=$high '{split($4, a, ":"); port=a[length(a)]; if (port >= low && port <= high) print port}' | wc -l)
sadly,
i'm down for either option. if possible, i'd prefer to keep this mainly as a github issue as this is something i'd like the jupyter devs to be able to see/chime in w/ideas etc. |
@shaneknapp what do you think? Close this for now? |
yeah, let's close this for now. in fact, i will do it myself! XD |
Opened https://jira-secure.berkeley.edu/browse/DH-396 and mentioned this issue because I want to preserve Ryan's comments here. |
Re:
If you revisit this, you can also add an |
Also track tcp_mem.