Add alloy
Some checks failed
Run nix flake check / flake-check (push) Has been cancelled

This commit is contained in:
Torjus Håkestad 2025-05-24 12:40:39 +02:00
parent c32e288273
commit ebcdefd0ca
Signed by: torjus
SSH Key Fingerprint: SHA256:KjAds8wHfD2mBYK2H815s/+ABcSdcIHUndwHEdSxml4
3 changed files with 43 additions and 0 deletions

View File

@ -74,6 +74,7 @@
settings = { settings = {
ListenAddr = ":9969"; ListenAddr = ":9969";
Profiling = true;
StepMonitors = [ StepMonitors = [
{ {
Enabled = true; Enabled = true;

View File

@ -0,0 +1,41 @@
{ ... }:
{
services.alloy = {
enable = true;
};
environment.etc."alloy/config.alloy" = {
enable = true;
mode = "0644";
text = ''
pyroscope.write "local_pyroscope" {
endpoint {
url = "http://localhost:4040";
}
}
pyroscope.scrape "labmon" {
targets = [{"__address__" = "localhost:9969", "service_name" = "labmon"}]
forward_to = [pyroscope.write.local_pyroscope.receiver]
profiling_config {
profile.process_cpu {
enabled = true;
}
profile.memory {
enabled = true;
}
profile.mutex {
enabled = true;
}
profile.block {
enabled = true;
}
profile.goroutine {
enabled = true;
}
}
}
'';
};
}

View File

@ -7,5 +7,6 @@
./pve.nix ./pve.nix
./alerttonotify.nix ./alerttonotify.nix
./pyroscope.nix ./pyroscope.nix
./alloy.nix
]; ];
} }