summaryrefslogtreecommitdiffstats
path: root/lass/2configs/monitoring/client.nix
blob: eebf2f2e99a53fda605e949e9fd135fdb830131b (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
{pkgs, config, ...}:
with import <stockholm/lib>;
{
  lass.telegraf = {
    enable = true;
    outputs = ''
      [outputs.influxdb]
        urls = ["http://prism:8086"]
        database = "all_data"
        user_agent = "telegraf"
    '';
    inputs = [
      ''
        [cpu]
          percpu = false
          totalcpu = true
          drop = ["cpu_time"]
      ''
      ''
        [[inputs.mem]]
      ''
      ''
        [[inputs.ping]]
        urls = ["8.8.8.8"]
      ''
    ];
  };
  systemd.services.telegraf.path = with pkgs; [
    iputils
    lm_sensors
  ];
}