NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.48k stars 12.98k forks source link

services.statsd broken #262289

Open mimame opened 8 months ago

mimame commented 8 months ago

Describe the bug

services.statsd.enable=true;

error: attribute 'statsd' missing

       at /nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/services/monitoring/statsd.nix:129:13:

          128|     users.users.statsd = {
          129|       uid = config.ids.uids.statsd;
             |             ^
          130|       description = "Statsd daemon user";
(use '--show-trace' to show detailed location information)

Steps To Reproduce

Steps to reproduce the behavior: services.statsd.enable=true;

Expected behavior

Run the statsd service without failing

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.57, NixOS, 23.05 (Stoat), 23.05.4407.80c1aab72515`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.13.5`
 - channels(root): `"nixos-23.05"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`
h7x4 commented 8 months ago

This rabbithole goes deeper than just the user uid. statsd doesn't even exist in nixpkgs anymore.

History:

These days, the project seems kinda maintained? No active development, but there are quite a few recent commits: https://github.com/statsd/statsd/commits/master. Not sure if it's a good idea to reintroduce it, or to just remove the module.

mimame commented 8 months ago

Thanks so much @h7x4 for your elaborated answer! I was following an old tutorial I don't have the skills to maintain it either I will use in future I'm to your disposal to anything you need I think to avoid any kind of misunderstanding, the best solution is to remove it What do you think?

rgrunbla commented 6 months ago

Not sure if it's a good idea to reintroduce it, or to just remove the module.

Reintroducing it might be a good idea for the Mastodon package, as it's the system used to get out performance stats : https://docs.joinmastodon.org/admin/config/#statsd

But then, again, you could just use the prometheus statsd exporter and have the same behaviour.

exarkun commented 2 months ago

It would be great to either re-add the package so the service works or or delete the service so people don't try to use it and get confused / waste their time.