summaryrefslogtreecommitdiffstats
path: root/lass/2configs/monitoring/client.nix
blob: e2b7dcae66a7d91ffa506e08f039467470d4e798 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{pkgs, config, ...}:
with import <stockholm/lib>;
{
  services.telegraf = {
    enable = true;

    extraConfig = {
      agent.interval = "1s";
      outputs = {
        influxdb = {
          urls = ["http://prism:8086"];
          database = "telegraf_db";
          user_agent = "telegraf";
        };
      };
      inputs = {
        cpu = {
          percpu = false;
          totalcpu = true;
        };
        mem = {};
        net = {};
      };
    };
  };

  services.journalbeat = {
    enable = true;
    extraConfig = ''
      output.elasticsearch:
        hosts: ["prism:9200"]
        template.enabled: false
    '';
  };
}