Add prometheus #118

Merged
esy merged 27 commits from prometheus2 into main 2024-05-23 21:52:10 +00:00
2 changed files with 3 additions and 2 deletions
Showing only changes of commit 9148963c1f - Show all commits

View file

@ -67,9 +67,10 @@ in {
datasources.settings.datasources = [
{
name = cfg.datasource.name;
type = "Prometheus";
type = "prometheus";
url = cfg.datasource.url;
isDefault = true;
editable = true;
}
];
};

View file

@ -61,7 +61,7 @@ in {
job_name = "node_exporter";
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;
}
];
}