add c10y o11y
This commit is contained in:
parent
3d47eb1552
commit
e97861a45a
2 changed files with 103 additions and 60 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 = {
|
||||
|
|
|
|||
Loading…
Reference in a new issue