Enable prometheus, add loki config example, we don't have a global log system so it's not useful though
This commit is contained in:
parent
b5be1009cf
commit
fe1dbd4f95
5 changed files with 107 additions and 1 deletions
|
@ -0,0 +1,38 @@
|
|||
{
|
||||
config,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 9001;
|
||||
# Export the current system metrics
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
enabledCollectors = ["systemd"];
|
||||
port = 9002;
|
||||
};
|
||||
};
|
||||
scrapeConfigs = [
|
||||
# Scrape the current system
|
||||
{
|
||||
job_name = "GrafanaService system";
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["127.0.0.1:9002"];
|
||||
}
|
||||
];
|
||||
}
|
||||
# Scrape the Loki service
|
||||
# {
|
||||
# job_name = "Loki service";
|
||||
# static_configs = [
|
||||
# {
|
||||
# targets = ["127.0.0.1:3100"];
|
||||
# }
|
||||
# ];
|
||||
# }
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue