add metrics to web
This commit is contained in:
@@ -1,10 +1,25 @@
|
|||||||
{ config, ... }:
|
{ config, ... }:
|
||||||
{
|
let
|
||||||
services.victoriametrics.enable = true;
|
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;
|
services.prometheus.exporters.node.enable = true;
|
||||||
|
|
||||||
sops.secrets.victoria-nginx-password.owner = "nginx";
|
sops.secrets.victoria-nginx-password.owner = "nginx";
|
||||||
|
|
||||||
|
services.victoriametrics = {
|
||||||
|
enable = true;
|
||||||
|
extraOptions = [
|
||||||
|
"-promscrape.config=${configure_prom}"
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
services.nginx.virtualHosts."victoria-server.cloonar.com" = {
|
services.nginx.virtualHosts."victoria-server.cloonar.com" = {
|
||||||
forceSSL = true;
|
forceSSL = true;
|
||||||
enableACME = true;
|
enableACME = true;
|
||||||
|
|||||||
Reference in New Issue
Block a user