service/hedgedoc: add monitoring and dashboard

This commit is contained in:
Felix Buehler 2023-06-04 15:23:47 +02:00
parent 5f8f6f0263
commit ec4d6379d0
3 changed files with 834 additions and 0 deletions

View file

@ -50,6 +50,30 @@ in
#systemd.services.hedgedoc.serviceConfig.StateDirectory = lib.mkForce "/var/lib/hedgedoc";
systemd.services.hedgedoc.serviceConfig.StateDirectory = lib.mkForce "hedgedoc";
services.prometheus = {
scrapeConfigs = [
{
job_name = "hedgedoc";
static_configs = [
{
targets = [ "127.0.0.1:${toString cfg.port}" ];
labels = {
instance = config.networking.hostName;
};
}
];
}
];
};
services.grafana.provision.dashboards.settings.providers = [
{
name = "Hedgedoc";
options.path = pkgs.grafana-dashboards.hedgedoc;
disableDeletion = true;
}
];
my.services.nginx.virtualHosts = [
{
subdomain = "notes";