Monitoring + home assistant
This commit is contained in:
parent
ebdfe095d8
commit
4b6fc29c91
4 changed files with 101 additions and 2 deletions
35
systems/x86_64-linux/stargate/services/monitoring.nix
Normal file
35
systems/x86_64-linux/stargate/services/monitoring.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
pkgs,
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
# https://dataswamp.org/~solene/2022-09-11-exploring-monitoring-stacks.html
|
||||
{
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_addr = "127.0.0.1";
|
||||
http_port = 3000;
|
||||
# Grafana needs to know on which domain and URL it's running
|
||||
domain = "kylekrein.com";
|
||||
root_url = "https://grafana.kylekrein.com/";
|
||||
serve_from_sub_path = false;
|
||||
};
|
||||
};
|
||||
};
|
||||
services.prometheus.exporters.node.enable = true;
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "stargate";
|
||||
static_configs = [
|
||||
{targets = ["127.0.0.1:9100"];}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue