forked from fi/nix-infra
Add metrics host with Grafana and Prometheus
This commit is contained in:
parent
b7bae9e9de
commit
d625f3f887
6 changed files with 36 additions and 10 deletions
|
|
@ -1,11 +1,11 @@
|
|||
{ ... }:
|
||||
{ config, ... }:
|
||||
{
|
||||
services.grafana = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
domain = "grafana2.grzb.de";
|
||||
root_url = "https://grafana2.grzb.de";
|
||||
domain = "grafana.grzb.de";
|
||||
root_url = "https://${config.services.grafana.settings.server.domain}";
|
||||
};
|
||||
security = {
|
||||
cookie_secure = true;
|
||||
|
|
@ -24,5 +24,13 @@
|
|||
startTLS_policy = "NoStartTLS";
|
||||
};
|
||||
};
|
||||
provision.datasources.settings.datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://localhost:${builtins.toString config.services.prometheus.port}";
|
||||
isDefault = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue