36 lines
642 B
Nix
36 lines
642 B
Nix
{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
|
|
'';
|
|
};
|
|
}
|