summaryrefslogtreecommitdiff
path: root/hosts/atlas/prometheus.nix
diff options
context:
space:
mode:
authorseth <[email protected]>2023-05-22 19:27:36 -0400
committerseth <[email protected]>2023-05-22 19:27:36 -0400
commit2cb6cfab9553184c1e6a10303cb832fe96080d00 (patch)
tree5a5d815e3d66fb8e1a550aec6a4dece9fe82b66b /hosts/atlas/prometheus.nix
parent3a7cc8116cce947f5652e0e46f4d60d59bfb5717 (diff)
atlas/pbody: fix monitoring
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";
}
];
}