feat(tanzanite): init grafana and prometheus
This commit is contained in:
parent
ed86270ec3
commit
0c2340692a
1 changed files with 41 additions and 0 deletions
|
@ -76,6 +76,47 @@ in {
|
||||||
proxyPass = "http://127.0.0.1:8009";
|
proxyPass = "http://127.0.0.1:8009";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
"grafana.stitchy.moe" = {
|
||||||
|
enableACME = true;
|
||||||
|
forceSSL = true;
|
||||||
|
locations."/" = {
|
||||||
|
proxyPass = "http://127.0.0.1:3000";
|
||||||
|
};
|
||||||
|
extraConfig = ''
|
||||||
|
allow 10.100.0.0/24;
|
||||||
|
allow 192.168.51.2;
|
||||||
|
allow 192.168.51.1;
|
||||||
|
deny all;
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
services = {
|
||||||
|
grafana = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
prometheus = {
|
||||||
|
enable = true;
|
||||||
|
exporters = {
|
||||||
|
node = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
globalConfig.scrape_interval = "10s";
|
||||||
|
scrapeConfigs = [{
|
||||||
|
job_name = "node";
|
||||||
|
static_configs = [{
|
||||||
|
targets = [ "localhost:${toString config.services.prometheus.exporters.node.port}"];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
{
|
||||||
|
job_name = "dendrite";
|
||||||
|
static_configs = [{
|
||||||
|
targets = [ "localhost:9008"];
|
||||||
|
}];
|
||||||
|
}
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue