mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-11 23:22:40 +02:00
feat: victorica-metrics & prometheus - remote write
This commit is contained in:
@@ -45,36 +45,49 @@ in {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
virtualHosts."git.writefor.fun".extraConfig = ''
|
virtualHosts."git.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:3301
|
reverse_proxy http://localhost:3301
|
||||||
'';
|
'';
|
||||||
virtualHosts."sftpgo.writefor.fun".extraConfig = ''
|
virtualHosts."sftpgo.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:3302
|
reverse_proxy http://localhost:3302
|
||||||
'';
|
'';
|
||||||
virtualHosts."webdav.writefor.fun".extraConfig = ''
|
virtualHosts."webdav.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:3303
|
reverse_proxy http://localhost:3303
|
||||||
'';
|
'';
|
||||||
virtualHosts."transmission.writefor.fun".extraConfig = ''
|
virtualHosts."transmission.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:9091
|
reverse_proxy http://localhost:9091
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# Monitoring
|
# Monitoring
|
||||||
virtualHosts."uptime-kuma.writefor.fun".extraConfig = ''
|
virtualHosts."uptime-kuma.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:53350
|
reverse_proxy http://localhost:53350
|
||||||
'';
|
'';
|
||||||
virtualHosts."grafana.writefor.fun".extraConfig = ''
|
virtualHosts."grafana.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:3351
|
reverse_proxy http://localhost:3351
|
||||||
'';
|
'';
|
||||||
virtualHosts."prometheus.writefor.fun".extraConfig = ''
|
virtualHosts."prometheus.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
|
encode zstd gzip
|
||||||
|
reverse_proxy http://localhost:9090
|
||||||
|
'';
|
||||||
|
# Do not redirect to https for api path
|
||||||
|
virtualHosts."http://prometheus.writefor.fun/api/v1/write".extraConfig = ''
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:9090
|
reverse_proxy http://localhost:9090
|
||||||
'';
|
'';
|
||||||
virtualHosts."alertmanager.writefor.fun".extraConfig = ''
|
virtualHosts."alertmanager.writefor.fun".extraConfig = ''
|
||||||
|
${hostCommonConfig}
|
||||||
encode zstd gzip
|
encode zstd gzip
|
||||||
reverse_proxy http://localhost:9093
|
reverse_proxy http://localhost:9093
|
||||||
'';
|
'';
|
||||||
|
|||||||
@@ -12,7 +12,11 @@
|
|||||||
port = 9090;
|
port = 9090;
|
||||||
webExternalUrl = "http://prometheus.writefor.fun";
|
webExternalUrl = "http://prometheus.writefor.fun";
|
||||||
|
|
||||||
extraFlags = ["--storage.tsdb.retention.time=45d"];
|
extraFlags = [
|
||||||
|
"--storage.tsdb.retention.time=45d"
|
||||||
|
# https://prometheus.io/docs/prometheus/latest/storage/#remote-storage-integrations
|
||||||
|
"--web.enable-remote-write-receiver"
|
||||||
|
];
|
||||||
# Directory below /var/lib to store Prometheus metrics data.
|
# Directory below /var/lib to store Prometheus metrics data.
|
||||||
stateDir = "prometheus2";
|
stateDir = "prometheus2";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user