feat(etna): add prometheus and grafana
This commit is contained in:
parent
8d4c932d87
commit
429283edc6
2 changed files with 48 additions and 0 deletions
|
@ -25,6 +25,7 @@ in {
|
|||
./vaultwarden.nix
|
||||
./forgejo.nix
|
||||
./shlink.nix
|
||||
./metrics.nix
|
||||
];
|
||||
|
||||
age.secrets = mkSecrets {
|
||||
|
|
47
systems/etna/metrics.nix
Normal file
47
systems/etna/metrics.nix
Normal file
|
@ -0,0 +1,47 @@
|
|||
{...}: {
|
||||
cfTunnels."grafana.uku3lig.net" = "http://localhost:2432";
|
||||
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
http_port = 2432;
|
||||
root_url = "https://grafana.uku3lig.net";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.prometheus = {
|
||||
enable = true;
|
||||
port = 9090;
|
||||
|
||||
globalConfig.scrape_interval = "15s";
|
||||
|
||||
exporters = {
|
||||
node = {
|
||||
enable = true;
|
||||
port = 9091;
|
||||
enabledCollectors = ["systemd"];
|
||||
};
|
||||
};
|
||||
|
||||
scrapeConfigs = [
|
||||
{
|
||||
job_name = "scrape-node";
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["localhost:9091"];
|
||||
}
|
||||
];
|
||||
}
|
||||
{
|
||||
job_name = "scrape-api-rs";
|
||||
static_configs = [
|
||||
{
|
||||
targets = ["localhost:5001"];
|
||||
}
|
||||
];
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue