grafana/module.nix: fix datasources
This commit is contained in:
parent
49969059ec
commit
936d8f9090
1 changed files with 4 additions and 4 deletions
|
@ -50,19 +50,19 @@ in {
|
||||||
enable = true;
|
enable = true;
|
||||||
datasources.settings = {
|
datasources.settings = {
|
||||||
datasources = [
|
datasources = [
|
||||||
(mkIf config.modules.system.services.database.postgresql.enable {
|
(mkIf config.modules.system.services.prometheus.enable {
|
||||||
name = "Prometheus";
|
name = "Prometheus";
|
||||||
type = "prometheus";
|
type = "prometheus";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://127.0.0.1:4024";
|
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
})
|
})
|
||||||
|
|
||||||
(mkIf config.modules.system.services.prometheus.enable {
|
(mkIf config.modules.system.services.database.postgresql.enable {
|
||||||
name = "PostgreSQL";
|
name = "PostgreSQL";
|
||||||
type = "postgres";
|
type = "postgres";
|
||||||
access = "proxy";
|
access = "proxy";
|
||||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
url = "http://127.0.0.1:${toString config.services.prometheus.exporters.postgres.port}";
|
||||||
})
|
})
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue