telegraf: move telegraf.json into runtime directory

No need to persist this type of data. We also don't need to allocate a
persistent user for telegraf.

Also make it a directory because otherwise thre is a potential race
condition on startup.
This commit is contained in:
Jörg Thalheim
2025-09-18 08:26:07 +02:00
parent 92e2c841e3
commit 4b549365f7
3 changed files with 13 additions and 18 deletions

View File

@@ -36,7 +36,7 @@ def get_metrics(
"""
# Example: fetch Prometheus metrics with basic auth
url = f"http://{target_host.address}:9990"
url = f"http://{target_host.address}:9990/telegraf.json"
username = "prometheus"
var_name = "telegraf/password"
password_var = get_machine_var(machine, var_name)