feat: Telegraf node installer (Linux apt/dnf/apk/static, Proxmox, Apache, Docker; Windows PowerShell)
This commit is contained in:
commit
9a878e8b8b
9 files changed
+513
No files matched your search
@@ -0,0 +1,13 @@
|
||||
# Apache: Access-Log → Loki (roh) + optional Request-Metriken → Prometheus
|
||||
[[inputs.tail]]
|
||||
files = ["${APACHE_LOG}"]
|
||||
from_beginning = false
|
||||
name_override = "apache_log"
|
||||
data_format = "value"
|
||||
data_type = "string"
|
||||
[inputs.tail.tags]
|
||||
source = "apache"
|
||||
|
||||
# Optional: mod_status (a2enmod status; ExtendedStatus On; /server-status?auto lokal freigeben)
|
||||
# [[inputs.apache]]
|
||||
# urls = ["http://localhost/server-status?auto"]
|
||||
@@ -0,0 +1,47 @@
|
||||
# NetBird Observability — Basis-Konfiguration (alle Linux-Nodes)
|
||||
# Variablen aus /etc/default/telegraf: NODE_NAME, PROM_URL, LOKI_URL
|
||||
|
||||
[global_tags]
|
||||
node = "${NODE_NAME}"
|
||||
|
||||
[agent]
|
||||
interval = "15s"
|
||||
flush_interval = "15s"
|
||||
metric_batch_size = 1000
|
||||
metric_buffer_limit = 20000
|
||||
hostname = "${NODE_NAME}"
|
||||
omit_hostname = false
|
||||
|
||||
# ---- Metriken → Prometheus Remote Write (imac) ----
|
||||
[[outputs.http]]
|
||||
url = "${PROM_URL}"
|
||||
data_format = "prometheusremotewrite"
|
||||
timeout = "10s"
|
||||
namedrop = ["docker_log", "apache_log"]
|
||||
[outputs.http.headers]
|
||||
Content-Type = "application/x-protobuf"
|
||||
Content-Encoding = "snappy"
|
||||
X-Prometheus-Remote-Write-Version = "0.1.0"
|
||||
|
||||
# ---- Logs → Loki (imac) ----
|
||||
[[outputs.loki]]
|
||||
domain = "${LOKI_URL}"
|
||||
endpoint = "/loki/api/v1/push"
|
||||
timeout = "10s"
|
||||
namepass = ["docker_log", "apache_log"]
|
||||
sanitize_label_names = true
|
||||
metric_name_label = ""
|
||||
|
||||
# ---- Host-Metriken ----
|
||||
[[inputs.cpu]]
|
||||
percpu = false
|
||||
totalcpu = true
|
||||
[[inputs.mem]]
|
||||
[[inputs.swap]]
|
||||
[[inputs.system]]
|
||||
[[inputs.disk]]
|
||||
ignore_fs = ["tmpfs", "devtmpfs", "overlay", "squashfs", "fuse.lxcfs"]
|
||||
[[inputs.diskio]]
|
||||
[[inputs.net]]
|
||||
[[inputs.processes]]
|
||||
[[inputs.kernel]]
|
||||
@@ -0,0 +1,20 @@
|
||||
# Docker-Container: Stats + Logs (nur wenn /var/run/docker.sock existiert)
|
||||
[[inputs.docker]]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
perdevice_include = []
|
||||
total_include = ["cpu", "blkio", "network"]
|
||||
docker_label_include = []
|
||||
docker_label_exclude = ["*"]
|
||||
|
||||
[[inputs.docker_log]]
|
||||
endpoint = "unix:///var/run/docker.sock"
|
||||
from_beginning = false
|
||||
source_tag = false
|
||||
docker_label_include = []
|
||||
docker_label_exclude = ["*"]
|
||||
[inputs.docker_log.tagdrop]
|
||||
container_image = ["telegraf"]
|
||||
|
||||
[[processors.override]]
|
||||
namepass = ["docker_log"]
|
||||
fielddrop = ["container_id"]
|
||||
@@ -0,0 +1,12 @@
|
||||
# Proxmox VE: VM/CT-Metriken über die PVE-API (Token mit PVEAuditor-Rolle)
|
||||
# Token anlegen (auf dem PVE-Host):
|
||||
# pveum user add telegraf@pve
|
||||
# pveum user token add telegraf@pve monitoring -privsep 1
|
||||
# pveum acl modify / -token 'telegraf@pve!monitoring' -role PVEAuditor
|
||||
# Ergebnis "telegraf@pve!monitoring=xxxxxxxx-…" als --pve-token übergeben.
|
||||
[[inputs.proxmox]]
|
||||
base_url = "https://127.0.0.1:8006/api2/json"
|
||||
api_token = "${PVE_TOKEN}"
|
||||
node_name = "${NODE_NAME}"
|
||||
insecure_skip_verify = true
|
||||
response_timeout = "10s"
|
||||
Reference in new issue
Block a user