Repository navigation
fix(alloy): use the Kubernetes node name as node_uname_info's nodename - #98
Merged
Merged
Conversation
dannykopping
approved these changes
Nov 3, 2026
jtslear
force-pushed
the
skarbek/nodename-from-k8s-node
branch
from
November 3, 2026 17:28
d5d3e61 to
350d255
Compare
node-exporter reports the OS hostname in node_uname_info's nodename. When nodes are named by instance ID, that never matches kube_node_info's node, so dashboards that join the two (such as Kubernetes / Views / Nodes) find no instance and every node_* panel is empty. Set nodename from the node label the pod target already carries. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jtslear
force-pushed
the
skarbek/nodename-from-k8s-node
branch
from
November 3, 2026 17:32
350d255 to
dbaa9f7
Compare
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.
node-exporter reports the OS hostname in
node_uname_info'snodenamelabel. When nodes are named by instance ID (EKS here:i-0a31ce555f738526a), the hostname isip-172-16-25-159.us-east-2.compute.internal, which never matcheskube_node_info'snode.The Kubernetes / Views / Nodes dashboard (dotdc, grafana.com 15759) finds a node's
instancewithlabel_values(node_uname_info{nodename=~"(?i:($node)(\.[a-z0-9.-]+)?)"}, instance). With no match the variable is empty and everynode_*panel is blank. On the dogfood-stable Grafana, 46 of 52 panel queries were empty; withinstanceforced to the right value only 5 were, all legitimately so.This sets
nodenamefrom thenodelabel that pod discovery already attaches tonode_uname_info, inprometheus.relabel "pods".nodenameonnode_uname_infois now the Kubernetes node name rather than the OS hostname. The hostname is still ininstance(as the pod IP) and inkube_node_info'sinternal_ip. Noted in the CHANGELOG.node_uname_infoonly.compiled/resources.yamlregenerated.🤖 Generated with Claude Code