📊 prometheus setup
This commit is contained in:
parent
6fda2af072
commit
4fb6c04299
@ -32,7 +32,23 @@
|
|||||||
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
|
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJ0mE4MyMnfd1b2nlBJT7kpZ6Vov+ILuGNfzdp5ZBNQe walkah@walkah.net"
|
||||||
];
|
];
|
||||||
|
|
||||||
services.tailscale.enable = true;
|
environment.systemPackages = with pkgs; [ libraspberrypi ];
|
||||||
|
|
||||||
|
services = {
|
||||||
|
prometheus = {
|
||||||
|
enable = true;
|
||||||
|
port = 9090;
|
||||||
|
exporters = {
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = [ "systemd" ];
|
||||||
|
openFirewall = true;
|
||||||
|
port = 9100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
tailscale = { enable = true; };
|
||||||
|
};
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
|
@ -76,6 +76,45 @@
|
|||||||
# Or disable the firewall altogether.
|
# Or disable the firewall altogether.
|
||||||
networking.firewall.enable = false;
|
networking.firewall.enable = false;
|
||||||
|
|
||||||
|
services = {
|
||||||
|
grafana = {
|
||||||
|
enable = true;
|
||||||
|
domain = "plato.walkah.lab";
|
||||||
|
port = 2342;
|
||||||
|
addr = "0.0.0.0";
|
||||||
|
};
|
||||||
|
prometheus = {
|
||||||
|
enable = true;
|
||||||
|
port = 9090;
|
||||||
|
exporters = {
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
enabledCollectors = [ "systemd" ];
|
||||||
|
port = 9100;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
scrapeConfigs = [
|
||||||
|
{
|
||||||
|
job_name = "node";
|
||||||
|
static_configs = [{
|
||||||
|
targets = [
|
||||||
|
"plato:9100"
|
||||||
|
"agent:9100"
|
||||||
|
"form:9100"
|
||||||
|
"matter:9100"
|
||||||
|
"purpose:9100"
|
||||||
|
];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
job_name = "coredns";
|
||||||
|
static_configs = [{ targets = [ "plato:9153" ]; }];
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
# This value determines the NixOS release from which the default
|
# This value determines the NixOS release from which the default
|
||||||
# settings for stateful data, like file locations and database versions
|
# settings for stateful data, like file locations and database versions
|
||||||
# on your system were taken. It‘s perfectly fine and recommended to leave
|
# on your system were taken. It‘s perfectly fine and recommended to leave
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
errors
|
errors
|
||||||
cache
|
cache
|
||||||
dnssec
|
dnssec
|
||||||
|
prometheus 0.0.0.0:9153
|
||||||
forward . tls://1.1.1.1 tls://1.0.0.1 {
|
forward . tls://1.1.1.1 tls://1.0.0.1 {
|
||||||
tls_servername cloudflare-dns.com
|
tls_servername cloudflare-dns.com
|
||||||
}
|
}
|
||||||
|
@ -17,10 +17,10 @@
|
|||||||
"homepage": "",
|
"homepage": "",
|
||||||
"owner": "NixOS",
|
"owner": "NixOS",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "55fafd9e23aa3e674a8db89013a004512ec5d2a9",
|
"rev": "1c16013bd6e94da748b41cc123c6b509a23eb440",
|
||||||
"sha256": "02vy0544zvh7j6azmg35az0za55m2pyczb2361w0awriz2ckbpav",
|
"sha256": "1m2wif0qnci0q14plbqlb95vx214pxqgw5li86lyw6hsiy7y3zfn",
|
||||||
"type": "tarball",
|
"type": "tarball",
|
||||||
"url": "https://github.com/NixOS/nixpkgs/archive/55fafd9e23aa3e674a8db89013a004512ec5d2a9.tar.gz",
|
"url": "https://github.com/NixOS/nixpkgs/archive/1c16013bd6e94da748b41cc123c6b509a23eb440.tar.gz",
|
||||||
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
"url_template": "https://github.com/<owner>/<repo>/archive/<rev>.tar.gz"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user