Prometheus extraScrapeConfigs as parameter
This commit is contained in:
parent
addd0c5df4
commit
f20c086d6f
2 changed files with 32 additions and 21 deletions
|
|
@ -21,6 +21,12 @@ in
|
|||
file = ../../secrets/grafana-secret-auth.age;
|
||||
owner = "grafana";
|
||||
};
|
||||
searx-prometheus-secret = {
|
||||
file = ../../secrets/searx-prometheus-secret.age;
|
||||
owner = config.users.users."prometheus".name;
|
||||
group = config.users.groups."prometheus".name;
|
||||
mode = "0644";
|
||||
};
|
||||
};
|
||||
|
||||
my = {
|
||||
|
|
@ -48,7 +54,23 @@ in
|
|||
};
|
||||
proxy.domain = p.domains.public;
|
||||
};
|
||||
prometheus.enable = true;
|
||||
prometheus = {
|
||||
enable = true;
|
||||
extraScrapeConfigs = [
|
||||
{
|
||||
job_name = "caddy";
|
||||
static_configs = [ { targets = [ "${p.hosts.caddy}:2024" ]; } ];
|
||||
}
|
||||
{
|
||||
job_name = "searxng";
|
||||
static_configs = [ { targets = [ "${p.hosts.caddy}:8080" ]; } ];
|
||||
basic_auth = {
|
||||
username = "searxng";
|
||||
password_file = config.age.secrets.searx-prometheus-secret.path;
|
||||
};
|
||||
}
|
||||
];
|
||||
};
|
||||
loki.enable = true;
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue