h7x4
45497aea2b
- Set up a bunch of exporters - Download matching dashboard declarations - Remove influxdb
22 lines
394 B
Nix
22 lines
394 B
Nix
{ ... }:
|
|
{
|
|
services.prometheus = {
|
|
scrapeConfigs = [{
|
|
job_name = "postgres";
|
|
scrape_interval = "15s";
|
|
static_configs = [
|
|
{
|
|
targets = [ "localhost:10392" ];
|
|
}
|
|
];
|
|
}];
|
|
|
|
exporters.postgres = {
|
|
enable = true;
|
|
port = 10392;
|
|
runAsLocalSuperUser = true;
|
|
extraFlags = [ "--auto-discover-databases" ];
|
|
};
|
|
};
|
|
}
|