Add prometheus #118
2 changed files with 3 additions and 2 deletions
|
@ -67,9 +67,10 @@ in {
|
||||||
datasources.settings.datasources = [
|
datasources.settings.datasources = [
|
||||||
{
|
{
|
||||||
name = cfg.datasource.name;
|
name = cfg.datasource.name;
|
||||||
type = "Prometheus";
|
type = "prometheus";
|
||||||
url = cfg.datasource.url;
|
url = cfg.datasource.url;
|
||||||
isDefault = true;
|
isDefault = true;
|
||||||
|
editable = true;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
|
@ -61,7 +61,7 @@ in {
|
||||||
job_name = "node_exporter";
|
job_name = "node_exporter";
|
||||||
static_configs = [
|
static_configs = [
|
||||||
{
|
{
|
||||||
targets = (map (hostname: "${hostname}:${cfg.port_collecter}") (lib.attrsets.mapAttrsToList (server: server.deployment.hostname)) nodes) ++ cfg.other_nodes;
|
targets = (lib.attrsets.mapAttrsToList (key: value: "${value.config.deployment.targetHost}:${toString cfg.port_collecter}") nodes) ++ cfg.server.other_nodes;
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue