Last active
May 27, 2020 17:28
-
-
Save LnL7/1b22c1b5d69a9975053f10df17ffe371 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
services.nginx.virtualHosts."hostname".locations."/prometheus".proxyPass = "http://127.0.0.1:9090"; | |
services.prometheus.enable = true; | |
services.prometheus.stateDir = "prometheus2"; | |
services.prometheus.extraFlags = [ "--web.external-url=http://hostname/prometheus/" "--storage.tsdb.retention.time=3d" ]; | |
services.prometheus.scrapeConfigs = [ | |
{ | |
job_name = "node"; | |
static_configs = [{ targets = ["hostname:9100"]; labels.distro = "nixos"; }]; | |
} | |
]; | |
services.prometheus.exporters.node.enable = true; | |
services.prometheus.exporters.node.enabledCollectors = [ "systemd" ]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment