Add monitoring host

This commit is contained in:
2024-12-01 01:51:29 +01:00
parent 5db87052d3
commit 3c3eaaa042
9 changed files with 160 additions and 1 deletions

View File

@@ -0,0 +1,7 @@
{ ... }:
{
imports = [
./loki.nix
./grafana.nix
];
}

View File

@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
services.grafana = {
enable = true;
settings = {
server = {
http_addr = "";
};
};
};
}

View File

@@ -0,0 +1,42 @@
{ ... }:
{
services.loki = {
enable = true;
configuration = {
auth_enabled = false;
server = {
http_listen_port = 3100;
};
common = {
ring = {
instance_addr = "127.0.0.1";
kvstore = {
store = "inmemory";
};
};
replication_factor = 1;
path_prefix = "/var/lib/loki";
};
schema_config = {
configs = [
{
from = "2024-01-01";
store = "tsdb";
object_store = "filesystem";
schema = "v13";
index = {
prefix = "loki_index_";
period = "24h";
};
}
];
};
storage_config = {
filesystem = {
directory = "/var/lib/loki/chunks";
};
};
};
};
}

View File

@@ -0,0 +1,6 @@
{ ... }:
{
services.prometheus = {
enable = true;
};
}