add metrics to web
This commit is contained in:
@@ -1,10 +1,25 @@
|
||||
{ config, ... }:
|
||||
{
|
||||
services.victoriametrics.enable = true;
|
||||
let
|
||||
configure_prom = builtins.toFile "prometheus.yml" ''
|
||||
scrape_configs:
|
||||
- job_name: '${config.networking.hostName}'
|
||||
stream_parse: true
|
||||
static_configs:
|
||||
- targets:
|
||||
- 127.0.0.1:9100
|
||||
'';
|
||||
in {
|
||||
services.prometheus.exporters.node.enable = true;
|
||||
|
||||
sops.secrets.victoria-nginx-password.owner = "nginx";
|
||||
|
||||
services.victoriametrics = {
|
||||
enable = true;
|
||||
extraOptions = [
|
||||
"-promscrape.config=${configure_prom}"
|
||||
];
|
||||
};
|
||||
|
||||
services.nginx.virtualHosts."victoria-server.cloonar.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
||||
Reference in New Issue
Block a user