Compare commits
2 commits
96f2be8fc9
...
734a85ab04
Author | SHA1 | Date | |
---|---|---|---|
|
734a85ab04 | ||
|
c495d165df |
configuration/services
|
@ -28,13 +28,6 @@ let
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
# Encryption support
|
|
||||||
extraSettings = {
|
|
||||||
"de.sorunome.msc2409.push_ephemeral" = true;
|
|
||||||
push_ephemeral = true;
|
|
||||||
"org.matrix.msc3202" = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
runtimeRegistration = "${cfg.registrationFile}";
|
runtimeRegistration = "${cfg.registrationFile}";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
@ -97,11 +90,8 @@ in
|
||||||
# Only allow webhooks from localhost for the moment
|
# Only allow webhooks from localhost for the moment
|
||||||
urlPrefix = "http://127.0.0.1:9000/webhook";
|
urlPrefix = "http://127.0.0.1:9000/webhook";
|
||||||
userIdPrefix = "_webhooks_";
|
userIdPrefix = "_webhooks_";
|
||||||
allowJsTransformationFunctions = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
encryption.storagePath = "/var/lib/matrix-hookshot/cryptostore";
|
|
||||||
|
|
||||||
permissions = [
|
permissions = [
|
||||||
{
|
{
|
||||||
actor = "matrix.tlater.net";
|
actor = "matrix.tlater.net";
|
||||||
|
|
|
@ -10,20 +10,6 @@ in
|
||||||
{
|
{
|
||||||
services.prometheus = {
|
services.prometheus = {
|
||||||
exporters = {
|
exporters = {
|
||||||
blackbox = {
|
|
||||||
enable = true;
|
|
||||||
listenAddress = "127.0.0.1";
|
|
||||||
configFile = yaml.generate "blackbox.yaml" {
|
|
||||||
modules = {
|
|
||||||
http_2xx = {
|
|
||||||
prober = "http";
|
|
||||||
timeout = "5s";
|
|
||||||
http.preferred_ip_protocol = "ip4";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
# Periodically check domain registration status
|
# Periodically check domain registration status
|
||||||
domain = {
|
domain = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -85,6 +71,7 @@ in
|
||||||
# TODO(tlater):
|
# TODO(tlater):
|
||||||
# - wireguard (?)
|
# - wireguard (?)
|
||||||
# - postgres (?)
|
# - postgres (?)
|
||||||
|
# - blackbox (?) (curl to see if http and similar is up)
|
||||||
# - ssl_exporter (?)
|
# - ssl_exporter (?)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,10 +6,7 @@ in
|
||||||
services.grafana = {
|
services.grafana = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
server = {
|
server.http_port = 3001; # Default overlaps with gitea
|
||||||
http_port = 3001; # Default overlaps with gitea
|
|
||||||
root_url = "https://metrics.tlater.net";
|
|
||||||
};
|
|
||||||
|
|
||||||
security = {
|
security = {
|
||||||
admin_user = "tlater";
|
admin_user = "tlater";
|
||||||
|
|
|
@ -47,7 +47,7 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
extraSettings = mkOption {
|
extraSettings = mkOption {
|
||||||
inherit (pkgs.formats.yaml { }) type;
|
type = types.anything;
|
||||||
description = ''
|
description = ''
|
||||||
Other settings to set for this scrape config.
|
Other settings to set for this scrape config.
|
||||||
'';
|
'';
|
||||||
|
@ -217,7 +217,6 @@ in
|
||||||
name: exporter:
|
name: exporter:
|
||||||
# A bunch of deprecated exporters that need to be ignored
|
# A bunch of deprecated exporters that need to be ignored
|
||||||
!(builtins.elem name [
|
!(builtins.elem name [
|
||||||
"blackbox"
|
|
||||||
"minio"
|
"minio"
|
||||||
"tor"
|
"tor"
|
||||||
"unifi-poller"
|
"unifi-poller"
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{ config, lib, ... }:
|
{ config, ... }:
|
||||||
let
|
|
||||||
blackbox_host = config.services.prometheus.exporters.blackbox.listenAddress;
|
|
||||||
blackbox_port = config.services.prometheus.exporters.blackbox.port;
|
|
||||||
in
|
|
||||||
{
|
{
|
||||||
config.services.victoriametrics = {
|
config.services.victoriametrics = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -13,35 +9,6 @@ in
|
||||||
targets = [ "127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}" ];
|
targets = [ "127.0.0.1:${toString config.services.forgejo.settings.server.HTTP_PORT}" ];
|
||||||
extraSettings.authorization.credentials_file = config.sops.secrets."forgejo/metrics-token".path;
|
extraSettings.authorization.credentials_file = config.sops.secrets."forgejo/metrics-token".path;
|
||||||
};
|
};
|
||||||
|
|
||||||
blackbox = {
|
|
||||||
static_configs = lib.singleton {
|
|
||||||
targets = lib.mapAttrsToList (vHost: _: "https://${vHost}") config.services.nginx.virtualHosts;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraSettings = {
|
|
||||||
metrics_path = "/probe";
|
|
||||||
params.module = [ "http_2xx" ];
|
|
||||||
|
|
||||||
relabel_configs = [
|
|
||||||
{
|
|
||||||
source_labels = [ "__address__" ];
|
|
||||||
target_label = "__param_target";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
source_labels = [ "__param_target" ];
|
|
||||||
target_label = "instance";
|
|
||||||
}
|
|
||||||
{
|
|
||||||
target_label = "__address__";
|
|
||||||
replacement = "${blackbox_host}:${toString blackbox_port}";
|
|
||||||
}
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
blackbox_exporter.targets = [ "${blackbox_host}:${toString blackbox_port}" ];
|
|
||||||
|
|
||||||
coturn.targets = [ "127.0.0.1:9641" ];
|
coturn.targets = [ "127.0.0.1:9641" ];
|
||||||
|
|
||||||
crowdsec.targets =
|
crowdsec.targets =
|
||||||
|
|
Loading…
Reference in a new issue