⬆️ use new nixos-telemetry architecture

This commit is contained in:
Ingolf Wagner 2025-02-26 14:57:23 +07:00
parent e99c573791
commit fa62983e2c
No known key found for this signature in database
GPG key ID: 76BF5F1928B9618B
7 changed files with 10 additions and 20 deletions

View file

@ -14,7 +14,7 @@ with types;
config = {
telemetry.enable = mkDefault true;
telemetry.metrics.enable = mkDefault false;
telemetry.opentelemetry.enable = false;
telemetry.apps.opentelemetry.enable = false;
services.journald.extraConfig = "SystemMaxUse=1G";
};

6
flake.lock generated
View file

@ -1405,11 +1405,11 @@
"treefmt-nix": "treefmt-nix_8"
},
"locked": {
"lastModified": 1740492270,
"narHash": "sha256-4JGmOis851TM0OL88S7+u8HbNk25xvBNh4dVsNDRAC8=",
"lastModified": 1740556259,
"narHash": "sha256-k8f7+Ir+DiK7rVH1RoHt8Do/Y8JKagTlNoSwgOPVsU0=",
"owner": "mrvandalo",
"repo": "nixos-telemetry",
"rev": "94c12227bd7e98f7ec8f8759d41941c5afcce352",
"rev": "3481a8b1c94fc5adc4ae7c1ba9695e6fe59389de",
"type": "github"
},
"original": {

View file

@ -289,12 +289,6 @@
./features
./modules # todo : spread this across features and components
#./system/all # todo : spread this across features and components
(
{ lib, pkgs, ... }:
{
telemetry.netdata.enable = false;
}
)
# some modules I always use
telemetry.nixosModules.telemetry

View file

@ -63,7 +63,7 @@
components.terminal.enable = true;
telemetry.enable = true;
telemetry.opentelemetry.exporter.endpoint = "10.100.0.1:4317"; # orbi
telemetry.apps.opentelemetry.exporter.endpoint = "10.100.0.1:4317"; # orbi
home-manager.users.mainUser.home.sessionPath = [ "$HOME/.timewarrior/scripts" ];
# todo: move to homemanager

View file

@ -71,7 +71,7 @@
features.boot.tor.enable = true;
telemetry.enable = true;
telemetry.opentelemetry.receiver.endpoint = "0.0.0.0:4317";
telemetry.apps.opentelemetry.receiver.endpoint = "0.0.0.0:4317";
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 4317 ];
networking.firewall.interfaces.wg0.allowedUDPPorts = [ 4317 ];

View file

@ -22,12 +22,8 @@
};
};
services.prometheus = {
checkConfig = "syntax-only";
enable = true;
# keep data for 30 days
extraFlags = [ "--storage.tsdb.retention.time=90d" ];
};
telemetry.apps.prometheus.enable = true;
telemetry.apps.prometheus.retentionTime = "90d";
services.grafana.provision.datasources.settings = {
apiVersion = 1;

View file

@ -67,8 +67,8 @@
features.boot.ssh.enable = true;
telemetry.enable = true;
telemetry.opentelemetry.receiver.endpoint = "0.0.0.0:4317";
telemetry.opentelemetry.exporter.endpoint = "10.100.0.2:4317"; # chnungus
telemetry.apps.opentelemetry.receiver.endpoint = "0.0.0.0:4317";
telemetry.apps.opentelemetry.exporter.endpoint = "10.100.0.2:4317"; # chnungus
networking.firewall.interfaces.wg0.allowedTCPPorts = [ 4317 ];
networking.firewall.interfaces.wg0.allowedUDPPorts = [ 4317 ];
healthchecks.closed.public.ports.opentelemetry = [ 4317 ];