summaryrefslogtreecommitdiff
path: root/hosts/atlas/prometheus.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/atlas/prometheus.nix')
-rw-r--r--hosts/atlas/prometheus.nix31
1 files changed, 6 insertions, 25 deletions
diff --git a/hosts/atlas/prometheus.nix b/hosts/atlas/prometheus.nix
index b0c3f7b..041c407 100644
--- a/hosts/atlas/prometheus.nix
+++ b/hosts/atlas/prometheus.nix
@@ -1,33 +1,14 @@
-{config, ...}: let
- scrapeExporter = name: host: port: {
- job_name = "${name}";
- static_configs = [
- {
- targets = [
- "${host}:${port}"
- ];
- }
- ];
- };
-in {
- services.prometheus = {
+{config, ...}: {
+ networking.firewall.allowedTCPPorts = [config.services.prometheus.exporters.node.port];
+
+ services.prometheus.exporters.node = {
enable = true;
- port = 5000;
- exporters = {
- node = {
- enable = true;
- enabledCollectors = ["systemd"];
- port = 5001;
- };
- };
- scrapeConfigs = [
- (scrapeExporter "atlas" "127.0.0.1" "${toString config.services.prometheus.exporters.node.port}")
- ];
+ enabledCollectors = ["systemd"];
};
getchoo.server.services.promtail.clients = [
{
- url = "p-body:3030/loki/api/v1/push";
+ url = "http://p-body:3030/loki/api/v1/push";
}
];
}