feat: Added grafana other devices
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
{...}: {
|
||||
{ ... }:
|
||||
{
|
||||
imports = [
|
||||
./tailscale.nix
|
||||
./samba.nix
|
||||
@@ -9,6 +10,7 @@
|
||||
./homeassistant.nix
|
||||
./flaresolverr.nix
|
||||
./caddy.nix
|
||||
./monitoring.nix
|
||||
# ./grafana.nix
|
||||
# ./dnscrypt.nix
|
||||
# ./resolved.nix
|
||||
|
||||
42
nixos/tsuba/services/monitoring.nix
Normal file
42
nixos/tsuba/services/monitoring.nix
Normal file
@@ -0,0 +1,42 @@
|
||||
{ ... }:
|
||||
{
|
||||
services = {
|
||||
prometheus = {
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = [
|
||||
"systemd"
|
||||
"textfile"
|
||||
"filesystem"
|
||||
"loadavg"
|
||||
"meminfo"
|
||||
"netdev"
|
||||
"stat"
|
||||
"time"
|
||||
"uname"
|
||||
"vmstat"
|
||||
];
|
||||
port = 9100;
|
||||
};
|
||||
process = {
|
||||
enable = true;
|
||||
settings.process_names = [
|
||||
{
|
||||
name = "{{.Comm}}";
|
||||
cmdline = [ ".*" ];
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Open firewall ports for Prometheus exporters
|
||||
networking.firewall = {
|
||||
allowedTCPPorts = [
|
||||
9100 # node exporter
|
||||
9256 # process exporter
|
||||
];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user