I need to publish --user
metrics (the like I can find for the particular user via systemctl --user ...
) for multiple users, preferably using the existing nixos
module system.
For one user this appears to work well:
services = {
prometheus = {
exporters = {
systemd = {
enable = true;
user = "alpha";
port = 9558;
};
};
};
};
but I want to instantiate further ones with other port
and user
values.
Is there an elegant way to do this, or would I have to resort to manually defining these exporters as separate services?