This commit is contained in:
parent
c32e288273
commit
ebcdefd0ca
@ -74,6 +74,7 @@
|
|||||||
|
|
||||||
settings = {
|
settings = {
|
||||||
ListenAddr = ":9969";
|
ListenAddr = ":9969";
|
||||||
|
Profiling = true;
|
||||||
StepMonitors = [
|
StepMonitors = [
|
||||||
{
|
{
|
||||||
Enabled = true;
|
Enabled = true;
|
||||||
|
41
services/monitoring/alloy.nix
Normal file
41
services/monitoring/alloy.nix
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
@ -7,5 +7,6 @@
|
|||||||
./pve.nix
|
./pve.nix
|
||||||
./alerttonotify.nix
|
./alerttonotify.nix
|
||||||
./pyroscope.nix
|
./pyroscope.nix
|
||||||
|
./alloy.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user