mirror of
https://github.com/Stunkymonkey/nixos.git
synced 2025-05-24 09:54:40 +02:00
service/prometheus: move datasource config from grafana
This commit is contained in:
parent
f16141a060
commit
879f642f40
2 changed files with 20 additions and 20 deletions
|
@ -47,19 +47,7 @@ in
|
|||
};
|
||||
};
|
||||
|
||||
provision = {
|
||||
enable = true;
|
||||
datasources.settings.datasources = [
|
||||
(lib.optionalAttrs config.services.prometheus.enable {
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
jsonData = {
|
||||
timeInterval = config.services.prometheus.globalConfig.scrape_interval;
|
||||
};
|
||||
})
|
||||
];
|
||||
};
|
||||
provision.enable = true;
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
|
|
|
@ -61,13 +61,25 @@ in
|
|||
];
|
||||
};
|
||||
|
||||
services.grafana.provision.dashboards.settings.providers = [
|
||||
services.grafana.provision = {
|
||||
datasources.settings.datasources = [
|
||||
{
|
||||
name = "Prometheus";
|
||||
type = "prometheus";
|
||||
url = "http://127.0.0.1:${toString config.services.prometheus.port}";
|
||||
jsonData = {
|
||||
timeInterval = config.services.prometheus.globalConfig.scrape_interval;
|
||||
};
|
||||
}
|
||||
];
|
||||
dashboards.settings.providers = [
|
||||
{
|
||||
name = "Node Exporter";
|
||||
options.path = pkgs.node-exporter-dashboard;
|
||||
disableDeletion = true;
|
||||
}
|
||||
];
|
||||
};
|
||||
|
||||
my.services.nginx.virtualHosts = [
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue