-
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
node_os_info
does not update build_id
#2981
Comments
The information is updated at every scrape. If the data doesn't change then the underlying data has not changed. The This is likely a NixOS issue. |
That's what I assumed, however node_exporter doesn't appear to follow the new symlink to the update Pre-update:
Update system:
|
The code clearly shows that |
There's also nothing in my logs from |
I don't think this can be anything on the node-exporter side, so closing for now. |
Fixes: prometheus#2981 Signed-off-by: Jonathan Davies <[email protected]>
I see the issue now. I wasn't reading the code carefully enough. We cache the mtime of the file and only update the data if the file mtime is changed. But, for some reason on NixOS the stat is not following the symlink. On Ubuntu, this doesn't seem to be a problem. Although, maybe again this is a systemd masking issue as I don't see this problem running under a normal shell. |
Fixes: prometheus#2981 Signed-off-by: Jonathan Davies <[email protected]>
This is where the NixOS weirdness comes in - where all files in the Nix store have a mtime of Unix epoch (as it doesn't support extended attributes).
|
Oh, that's a completely different problem. Maybe we need Or we could just completely eliminate the whole mtime thing and read the file every time. I kinda feel like the whole mtime check is a bit of an over-optimization considering most of the time the whole file will be in page cache anyway. |
@SuperQ yeah I think we should just read the file every time |
The collector responsible for
node_os_info
only appears to run a single time, I see the following metrics:Note that one of the
build_id
is from more than a week ago - however I've done several system builds on this box in that time - the newer build version only appeared after I had restartednode-exporter
.Host operating system: output of
uname -a
Linux mango 6.6.22 #1-NixOS SMP PREEMPT_DYNAMIC Fri Mar 15 18:25:07 UTC 2024 x86_64 GNU/Linux
node_exporter version: output of
node_exporter --version
node_exporter command line flags
Are you running node_exporter in Docker?
No.
The text was updated successfully, but these errors were encountered: