NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.37k stars 14.32k forks source link

services.statsd broken #262289

Open mimame opened 1 year ago

mimame commented 1 year 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 1 year 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 1 year 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 11 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 7 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.

deftdawg commented 2 weeks ago

Anyone know what the last release of NixOS when statsd actually worked? (trying to spin up an old project that needs a statsd container to dump data into)