Sign inSign up

andreas404/insightd-agent

By andreas404

•Updated 4 months ago

Lightweight monitoring agent for insightd — collects Docker and host metrics

Image
0

4.1K

andreas404/insightd-agent repository overview

⁠Insightd Agent

Lightweight monitoring agent for insightd⁠. Deploy on each host or k8s node to collect container and system metrics, reporting back to the central hub via MQTT.

Supports two runtimes:

  • Docker — auto-detected via the docker socket (default)
  • Kubernetes — runs as a DaemonSet, one pod per node, uses kubelet stats

⁠Quick Start (Docker)

docker run -d \
  --name insightd-agent \
  --restart unless-stopped \
  -v /var/run/docker.sock:/var/run/docker.sock \
  -v /:/host:ro \
  -e INSIGHTD_HOST_ID=my-server \
  -e INSIGHTD_MQTT_URL=mqtt://your-hub-ip:1883 \
  -e INSIGHTD_MQTT_USER=insightd \
  -e INSIGHTD_MQTT_PASS=your-mqtt-password \
  andreas404/insightd-agent:latest

The agent will immediately start collecting metrics and publishing to the hub.

Tip: The hub's Add Agent page generates a ready-to-paste docker run command with your MQTT details pre-filled.

⁠Quick Start (Kubernetes / k3s)

Run as a DaemonSet — see agent/k8s/⁠ for the manifests and docs/kubernetes-setup.md⁠ for the full guide.

kubectl apply -f https://raw.githubusercontent.com/goldenproductions/insightd/main/agent/k8s/rbac.yaml
kubectl apply -f https://raw.githubusercontent.com/goldenproductions/insightd/main/agent/k8s/daemonset.yaml

Edit the DaemonSet first to set INSIGHTD_MQTT_URL (and optionally INSIGHTD_HOST_GROUP). K8s mode is read-only — container actions and image update checks aren't supported (those are managed by the cluster).

⁠What It Collects

MetricDocker modeKubernetes mode
ContainersStatus, CPU, RAM, restarts, network I/O, block I/O, health checksSame — sourced from kubelet cAdvisor
Host CPU/proc/statkubelet /stats/summary
Host memory/proc/meminfokubelet /stats/summary + Node API capacity
Host uptime/proc/uptimeNode metadata.creationTimestamp
DisksUsage per mount, days-until-full forecastSame
GPUUtilization, memory, temperature (NVIDIA)Not collected
TemperatureCPU/system sensor readingsNot collected
Disk I/ORead/write throughputNot collected
Network I/OPer-interface bandwidthNot collected
Load average/proc/loadavgNot collected (kernel concept that doesn't map to a single node)

Metrics are collected every 5 minutes (configurable) and published to MQTT. In k8s mode, the values that aren't collected appear as null rather than misleading numbers — /proc and /sys inside the agent pod reflect the underlying machine's kernel, not the node.

⁠Additional Capabilities

  • Container actions — start/stop/restart containers remotely from the hub UI (opt-in)
  • Log tailing — fetch container logs on demand from the hub UI
  • Remote updates — update the agent from the hub UI via MQTT (opt-in)
  • Image update detection — compares local images against Docker Hub registry

⁠Configuration

VariableDefaultDescription
INSIGHTD_HOST_IDlocalUnique name for this host
INSIGHTD_HOST_GROUP—Optional logical group label (e.g. production, basement) for the Hosts page
INSIGHTD_RUNTIMEautoContainer runtime: auto, docker, or kubernetes
INSIGHTD_MQTT_URL—MQTT broker URL (required)
INSIGHTD_MQTT_USER—MQTT username
INSIGHTD_MQTT_PASS—MQTT password
INSIGHTD_COLLECT_INTERVAL5Collection interval (minutes)
INSIGHTD_ALLOW_ACTIONSfalseEnable container start/stop/restart (Docker mode)
INSIGHTD_ALLOW_UPDATESfalseEnable remote agent updates (Docker mode)
INSIGHTD_DISK_WARN_THRESHOLD85Disk warning threshold (%)
TZUTCTimezone

⁠Volumes

PathPurpose
/var/run/docker.sockDocker socket (required)
/hostHost filesystem mount (read-only, for disk/host metrics)

⁠Resources

  • ~15MB RAM typical usage
  • No local storage needed
  • Multi-arch: linux/amd64, linux/arm64

Tag summary

Content type

Image

Digest

sha256:829a562c1…

Size

92.7 MB

Last updated

4 months ago

docker pull andreas404/insightd-agent