Skip to content
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

module: add prometheus-node-exporter service #1129

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

mweinelt
Copy link
Contributor

@mweinelt mweinelt commented Oct 28, 2024

This PR adds a module for the Prometheus Node Exporter, which I want to use in the nixos.org infra.

I will test this shortly, but it is probably good enough for a review.

Options are similar to NixOS, but I chose a different namespace, since what NixOS has is probably overkill.

@mweinelt mweinelt force-pushed the node-exporter branch 2 times, most recently from 1ec7f5d to f349f57 Compare October 30, 2024 17:59
@mweinelt
Copy link
Contributor Author

mweinelt commented Oct 30, 2024

All requested changes applied.

Copy link
Collaborator

@emilazy emilazy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me now. @Enzime, did you want to have another pass over this?

Only one non‐blocking nit.

Comment on lines +98 to +106
script = concatStringsSep " "
([
(getExe cfg.package)
"--web.listen-address"
"${cfg.listenAddress}:${toString cfg.port}"
]
++ (map (collector: "--collector.${collector}") cfg.enabledCollectors)
++ (map (collector: "--no-collector.${collector}") cfg.disabledCollectors)
) + escapeShellArgs cfg.extraFlags;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we probably don’t want shell injection in the other arguments here, could just use escapeShellArgs for the whole thing.

Copy link
Collaborator

@Enzime Enzime left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@emilazy emilazy merged commit 189d2d4 into LnL7:master Nov 4, 2024
5 of 6 checks passed
@mweinelt mweinelt deleted the node-exporter branch November 4, 2024 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants