-
-
Notifications
You must be signed in to change notification settings - Fork 15.1k
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
services/prometheus/exporters: add scaphandre #239803
services/prometheus/exporters: add scaphandre #239803
Conversation
c0192ee
to
f5ea447
Compare
3f94e09
to
9036413
Compare
9036413
to
4876a3b
Compare
enable = true; | ||
}; | ||
metricProvider = { | ||
boot.kernelModules = [ "intel_rapl_common" ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently this option will fail on the CI but it does not fail on my host even if ran in QEMU. I added an assertion to make sure it is added explicitly by the user but it seems scaphandre does not produce any error if it is not "really" probed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
); | ||
message = '' | ||
Please enable 'intel_rapl_common' in boot.kernelModules | ||
''; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I should also assert that machine runs on Intel or AMD according to the compatibility page but I don't know how to do that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to restrict as much as possible the possibility to use Scaphandre without having the proper configuration.
4876a3b
to
877f76c
Compare
877f76c
to
d64f297
Compare
@GrahamcOfBorg test prometheus-exporters.scaphandre |
nixos/modules/services/monitoring/prometheus/exporters/scaphandre.nix
Outdated
Show resolved
Hide resolved
d64f297
to
cf16bbc
Compare
@GrahamcOfBorg build scaphandre |
cf16bbc
to
f63009a
Compare
f63009a
to
e11f06a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I got linked to the commit from Matrix, I think there are some issues with this MR as it was merged 🙃.
} { | ||
assertion = cfg.scaphandre.enable -> (pkgs.stdenv.hostPlatform.isx86_64 == true); | ||
message = '' | ||
Only x86_64 host platform architecture is not supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you meant
Only x86_64 host platform architecture is not supported. | |
Only x86_64 host platform architecture is supported. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And are you sure the (build) host should be x86_64? Or do you mean the (build) target, i.e: the machine that will run the code?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well I mean the build target indeed.
} { | ||
assertion = cfg.scaphandre.enable -> ((lib.kernel.whenHelpers pkgs.linux.version).whenOlder "5.11" true).condition == false; | ||
message = '' | ||
A kernel version newer than '5.11' is required. ${pkgs.linux.version} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should explain that the assertion comes from cfg.scaphandre.enable
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ambroisie Is there any convention to explain that if comes from a specific config?
} { | ||
assertion = cfg.scaphandre.enable -> (builtins.elem "intel_rapl_common" config.boot.kernelModules); | ||
message = '' | ||
Please enable 'intel_rapl_common' in 'boot.kernelModules'. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto.
Still learning the job of a maintainer every single day! Sorry for the trouble ! |
@ambroisie What are the issues other than your review comments? |
@gaelreyrol I meant the ones I commented on :-). @drupol no worries, I don't even have the commit bit myself 😄. |
@ambroisie I submitted a new PR to apply your comments: #240571 |
Description of changes
This PR add scaphandre package to prometheus exporters.
Things done
sandbox = true
set innix.conf
? (See Nix manual)nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)