2023-02-10 17:34:46 +00:00
|
|
|
{ config, pkgs, ... }: {
|
|
|
|
services.grafana = {
|
|
|
|
enable = true;
|
|
|
|
settings.server = {
|
|
|
|
domain = "grafana.technogothic.net";
|
|
|
|
http_port = 2342;
|
|
|
|
http_addr = "localhost";
|
|
|
|
};
|
2023-03-18 20:18:27 +00:00
|
|
|
settings."auth.anonymous" = {
|
|
|
|
enabled = true;
|
|
|
|
org_name = "Main Org.";
|
|
|
|
org_role = "Viewer";
|
|
|
|
};
|
2023-02-10 17:34:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts =
|
|
|
|
[ config.services.grafana.settings.server.http_port ];
|
|
|
|
|
|
|
|
services.prometheus = {
|
|
|
|
enable = true;
|
|
|
|
port = 9001;
|
|
|
|
retentionTime = "365d";
|
2023-03-06 19:43:10 +00:00
|
|
|
scrapeConfigs = [
|
|
|
|
{
|
|
|
|
job_name = "bloodletting";
|
|
|
|
static_configs = [{
|
|
|
|
targets = [
|
|
|
|
"localhost:${
|
|
|
|
toString config.services.prometheus.exporters.node.port
|
|
|
|
}"
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
}
|
|
|
|
{
|
|
|
|
job_name = "nginx";
|
|
|
|
static_configs = [{
|
|
|
|
targets = [
|
|
|
|
"localhost:${
|
|
|
|
toString config.services.prometheus.exporters.nginx.port
|
|
|
|
}"
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
}
|
2023-03-25 13:24:09 +00:00
|
|
|
{
|
|
|
|
job_name = "telegraf";
|
|
|
|
static_configs = [{
|
|
|
|
targets = [
|
|
|
|
config.services.telegraf.extraConfig.outputs.prometheus_client.listen
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
}
|
2023-06-11 20:28:27 +00:00
|
|
|
{
|
|
|
|
job_name = "process";
|
|
|
|
static_configs = [{
|
|
|
|
targets = [
|
|
|
|
"localhost:${
|
|
|
|
toString config.services.prometheus.exporters.process.port
|
|
|
|
}"
|
|
|
|
];
|
|
|
|
}];
|
|
|
|
}
|
2023-03-06 19:43:10 +00:00
|
|
|
];
|
2023-02-10 17:34:46 +00:00
|
|
|
};
|
|
|
|
}
|