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;
|
||||
datasources.settings = {
|
||||
datasources = [
|
||||
(mkIf config.modules.system.services.database.postgresql.enable {
|
||||
(mkIf config.modules.system.services.prometheus.enable {
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
access = "proxy";
|
||||
url = "http://127.0.0.1:4024";
|
||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
isDefault = true;
|
||||
})
|
||||
|
||||
(mkIf config.modules.system.services.prometheus.enable {
|
||||
(mkIf config.modules.system.services.database.postgresql.enable {
|
||||
name = "PostgreSQL";
|
||||
type = "postgres";
|
||||
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