Skip to content

prometheus: modular exporter module - #466

Draft
kafu-densha wants to merge 1 commit into
mainfrom
modular-prom-exporter
Draft

kafu-densha wants to merge 1 commit into
mainfrom
modular-prom-exporter

Conversation

@kafu-densha

Copy link
Copy Markdown
Contributor

No description provided.

@kafu-densha

Copy link
Copy Markdown
Contributor Author

making this more modular so we can add more exporters in the future, like the one I'm writing for printhost

@kafu-densha
kafu-densha force-pushed the modular-prom-exporter branch from f3d61b9 to bb00edb Compare October 8, 2026 23:00
exporters = lib.mkOption {
default = { };
type = lib.types.attrsOf lib.types.submodule {
enable = lib.mkEnableOption "running this exporter";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
enable = lib.mkEnableOption "running this exporter";

lib.mapAttrsToList (
name: exporter:
let
serviceName = "prometheus-textfile-exporter-${name}";

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
serviceName = "prometheus-textfile-exporter-${name}";
serviceName = "prometheus-textfile-exporter-${utils.escapeSystemdPath name}";

Comment on lines +30 to +32
serviceName = lib.mkOption {
type = lib.types.str;
};

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
serviceName = lib.mkOption {
type = lib.types.str;
};

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.

2 participants