add c10y o11y

This commit is contained in:
Henry Hiles 2026-10-12 12:54:35 -04:00
commit e97861a45a
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
2 changed files with 103 additions and 60 deletions

View file

@ -23,7 +23,10 @@ in
{
grafana = {
enable = true;
declarativePlugins = [ ];
declarativePlugins = with pkgs.grafanaPlugins; [
prometheus
];
settings = {
server = {
inherit domain;
@ -183,6 +186,14 @@ in
hash = "sha256-6bM0mqm1nF7xadc0ojNWIxJXCHio5db97NjENHIpwdI=";
};
}
{
name = "Continuwuity Stats";
options.path = pkgs.fetchurl {
name = "continuwuity-stats.json";
url = "https://continuwuity.org/guides/grafana-dashboard.json";
hash = "sha256-1s7vFEaZMiqH9h//BdrBwtWuYiqlxzUmYwdpMPYyuMo=";
};
}
{
name = "Caddy Hosts";
options.path = pkgs.stdenv.mkDerivation {

View file

@ -1,5 +1,9 @@
{ config, ... }:
{
systemd.services.prometheus.serviceConfig.SupplementaryGroups = [
config.services.matrix-continuwuity.group
];
services.prometheus = {
enable = true;
listenAddress = "127.0.0.7";
@ -32,6 +36,19 @@
{ targets = [ "localhost:2019" ]; }
];
}
{
job_name = "continuwuity";
metrics_path = "/_continuwuity/metrics";
static_configs = [
{ targets = [ "localhost" ]; }
];
relabel_configs = [
{
target_label = "__unix_socket__";
replacement = config.services.matrix-continuwuity.settings.global.unix_socket_path;
}
];
}
];
exporters = {