nix-dotfiles/hosts/tsuki/services/grafana/prometheus.nix
h7x4 f2a89d7c82
grafana: split up configuration + postgres
- Move `services/grafana.nix` to `services/grafana/default.nix`
- Split up all data collectors into separate files under
  `services/grafana`
- Make grafana use postgres as its database
2022-11-26 17:16:04 +01:00

53 lines
1.1 KiB
Nix

{ secrets, ... }: {
services.prometheus = {
enable = true;
port = secrets.ports.prometheus;
scrapeConfigs = [
{
job_name = "synapse";
scrape_interval = "15s";
metrics_path = "/_synapse/metrics";
static_configs = [
{
targets = [ "localhost:${toString secrets.ports.matrix.listener}" ];
}
];
}
# {
# job_name = "minecraft";
# # scrape_interval = "15s";
# # metrics_path = "/_synapse/metrics";
# static_configs = [
# {
# targets = [ "${secrets.ips.crafty}:${toString secrets.ports.prometheus-crafty}" ];
# labels = {
# server_name = "my-minecraft-server";
# };
# }
# ];
# }
];
exporters = {
# jitsi.enable = true;
nginx.enable = true;
nginxlog.enable = true;
systemd.enable = true;
# openldap
# openvpn
# nextcloud
# influxdb
# wireguard
# postgres = {
# enable = true;
# };
};
# globalConfig = {
# };
};
}