Compare commits

...

3 Commits

3 changed files with 39 additions and 16 deletions

View File

@ -71,7 +71,7 @@
+ node_memory_active_bytes) + node_memory_active_bytes)
/ node_memory_total_bytes / node_memory_total_bytes
''; '';
meta = { config = {
name_format = "`\${labels.instance} - Memory`"; name_format = "`\${labels.instance} - Memory`";
yaxis = "y"; yaxis = "y";
fill = "tozeroy"; fill = "tozeroy";
@ -84,7 +84,7 @@
/ ignoring(mode) group_left / ignoring(mode) group_left
sum by (job,instance)(irate(node_cpu_seconds_total[5m])) sum by (job,instance)(irate(node_cpu_seconds_total[5m]))
''; '';
meta = { config = {
name_format = "`\${labels.instance} - \${labels.mode}`"; name_format = "`\${labels.instance} - \${labels.mode}`";
axis = "y"; axis = "y";
}; };
@ -98,6 +98,7 @@
yaxes = [ yaxes = [
{ {
anchor = "y"; anchor = "y";
type = "log";
} }
]; ];
plots = [ plots = [
@ -106,7 +107,7 @@
query = '' query = ''
stun_attempt_latency_ms stun_attempt_latency_ms
''; '';
meta = { config = {
name_format = "`UDP \${labels.domain} latency`"; name_format = "`UDP \${labels.domain} latency`";
yaxis = "y"; yaxis = "y";
}; };
@ -116,8 +117,8 @@
query = '' query = ''
ping_latency ping_latency
''; '';
meta = { config = {
name_format = "`Ping \${labels.device} latency`"; name_format = "`Ping \${labels.domain} latency`";
yaxis = "y"; yaxis = "y";
}; };
} }
@ -130,6 +131,7 @@
yaxes = [ yaxes = [
{ {
anchor = "y"; anchor = "y";
type = "log";
} }
]; ];
plots = [ plots = [
@ -138,7 +140,7 @@
query = '' query = ''
irate(node_network_receive_bytes_total{device=~"(lo|en).*"}[5m]) irate(node_network_receive_bytes_total{device=~"(lo|en).*"}[5m])
''; '';
meta = { config = {
name_format = "`\${labels.device} Rx`"; name_format = "`\${labels.device} Rx`";
yaxis = "y"; yaxis = "y";
}; };
@ -148,7 +150,7 @@
query = '' query = ''
irate(node_network_transmit_bytes_total{device=~"(lo|en).*"}[5m]) irate(node_network_transmit_bytes_total{device=~"(lo|en).*"}[5m])
''; '';
meta = { config = {
name_format = "`\${labels.device} Tx`"; name_format = "`\${labels.device} Tx`";
yaxis = "y"; yaxis = "y";
}; };

View File

@ -347,11 +347,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1711068625, "lastModified": 1716397295,
"narHash": "sha256-kNfh3rmFfHKTng6Aun1UZ/atl51XobRjLIeYRJQ6628=", "narHash": "sha256-dGJ2TvmOrgenBLvbYQBk9zfx5g+LCG8qdjQWMNF8Hws=",
"owner": "zaphar", "owner": "zaphar",
"repo": "Heracles", "repo": "Heracles",
"rev": "471d159af752b62f8774d1e4462f2111059583da", "rev": "ae669767c82965e1db334c178f211fa4c4586df6",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -126,6 +126,8 @@ with lib;
WatchPaths = [ WatchPaths = [
"/etc/${config.environment.etc."heracles.yaml".target}" "/etc/${config.environment.etc."heracles.yaml".target}"
]; ];
StandardOutPath = "/var/log/heracles.log";
StandardErrorPath = "/var/log/heracles.err.log";
KeepAlive = true; KeepAlive = true;
RunAtLoad = true; RunAtLoad = true;
}; };
@ -138,11 +140,9 @@ with lib;
"--listenHost=${config.services.durnitisp.listen}" "--listenHost=${config.services.durnitisp.listen}"
]; ];
KeepAlive = { KeepAlive = true;
NetworkState = true; StandardOutPath = "/var/log/durnitisp.log";
}; StandardErrorPath = "/var/log/durnitisp.err.log";
#StandardOutPath = "/var/log/durnitisp.log";
#StandardErrorPath = "var/log/durnitisp.err.log";
RunAtLoad = true; RunAtLoad = true;
}; };
}; };
@ -165,7 +165,28 @@ with lib;
RunAtLoad = true; RunAtLoad = true;
}; };
}; };
};
environment.etc."newsyslog.d/org.nixos.prometheus.conf" = mkIf config.services.prometheus.enable {
text = ''
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
${config.launchd.user.agents.prometheus.serviceConfig.StandardOutPath} 644 10 1000 * NJ
${config.launchd.user.agents.prometheus.serviceConfig.StandardErrorPath} 644 10 1000 * NJ
'';
};
environment.etc."newsyslog.d/org.nixos.heracles.conf" = mkIf config.services.prometheus.enable {
text = ''
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
${config.launchd.user.agents.heracles.serviceConfig.StandardOutPath} 644 10 1000 * NJ
${config.launchd.user.agents.heracles.serviceConfig.StandardErrorPath} 644 10 1000 * NJ
'';
};
environment.etc."newsyslog.d/org.nixos.durnitisp.conf" = mkIf config.services.durnitisp.enable {
text = ''
# logfilename [owner:group] mode count size when flags [/pid_file] [sig_num]
${config.launchd.daemons.durnitisp.serviceConfig.StandardOutPath} 644 10 1000 * NJ
${config.launchd.daemons.durnitisp.serviceConfig.StandardErrorPath} 644 10 1000 * NJ
'';
};
};
} }