link telegraf to grafana

This commit is contained in:
Lillian Violet 2024-03-28 11:37:35 +01:00
parent abba99a2b3
commit 4e05dfccf4
2 changed files with 9 additions and 7 deletions

View file

@ -6,6 +6,8 @@
user,
...
}: {
sops.secrets."grafana-telegraf-key".mode = "0440";
sops.secrets."grafana-telegraf-key".owner = config.users.users.telegraf.name;
services.telegraf = {
enable = true;
extraConfig = {
@ -41,13 +43,12 @@
system = {};
};
outputs = {
influxdb = {
database = "telegraf";
urls = ["localhost:8086"];
http = {
url = "http://localhost:${toString config.services.prometheus.port}/api/live/push/custom_stream_id";
data_format = "influx";
headers = "Authorization: Bearer glsa_lqpcKV34Pp0d7eIhKN79E2HTwzWWwN4m_fe64e398";
};
};
};
};
services.influxdb.enable = true;
}