1# VictoriaMetrics presets 2 3```nix 4{...}: { 5 gensokyo.presets.vmetrics = true; 6} 7``` 8 9This enables vmetrics and some default configurations. Afterwards, you can add new scrape configs like below. 10 11```nix 12{...}: { 13 services.vmagent.prometheusConfig.scrape_configs = [{ 14 job_name = "nginx"; 15 static_configs = [{targets = ["localhost:${builtins.toString config.services.prometheus.exporters.nginx.port}"];}]; 16 relabel_configs = [{ 17 target_label = "instance"; 18 replacement = "${config.networking.fqdnOrHostName}"; 19 }]; 20 }]; 21} 22``` 23 24## Prerequisites 25 26You need to do the following things when adding a new host. 27 28### Secrets 29 30Include the follow secret configuration. 31 32```yaml 33vmetrics: 34 auth: # openssl rand 129 | base64 -w0 | tr "/=+" "-_." 35``` 36 37Then add to koumakan.