{
  config,
  pkgs,
  lib,
  ...
}: {
  services.grafana = {
    enable = true;
    settings = {
      server = {
        http_addr = "localhost";
        http_port = 3033;
      };
    };
  };

  services.prometheus = {
    enable = true;
    exporters = {
    };

    scrapeConfigs = [
      {
        job_name = "synapse";
        metrics_path = "/_synapse/metrics";
        static_configs = [
          {
            targets = ["localhost:9000"];
          }
        ];
      }
      {
        job_name = "caddy";
        scrape_interval = "15s";
        static_configs = [
          {
            targets = ["localhost:2019"];
          }
        ];
      }
    ];
  };
}
