Multi-agentcy doesn't work (traefik-log-dashboard discussion #86)

:speech_balloon: GitHub discussion traefik-log-dashboard #86 in Help, started by plakun on GitHub

Hello.
I try to use multiple agent installment with dashboard frontend in kubernetes, and looks like it doesn’t work.
Agents look like ok in dashboard, but i see in dashboard logs that it tries to connect to localhost instead of added agents.

External Image
External Image
External Image

Deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: traefik-log-dashboard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: traefik-log-dashboard-app
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 1
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: traefik-log-dashboard-app 
    spec:
      containers:
      - image: hhftechnology/traefik-log-dashboard:latest
        name: traefik-log-dashboard
        resources:
          requests:
            cpu: 500m
            memory: 512Mi
          limits:
            cpu: 2000m
            memory: 2048Mi
        env:
        - name: PORT
          valueFrom:
            secretKeyRef:
              name: traefik-log-env
              key: PORT
        - name: NODE_ENV
          valueFrom:
            secretKeyRef: …

---
💬 Join in here or [on GitHub](https://github.com/hhftechnology/traefik-log-dashboard/discussions/86).
<!-- hhf-forum-sync -->

hhftechnology commented on GitHub:

your dashboard needs to be configured with the agents’ URLs and authentication tokens.
In Kubernetes, you need to:

  1. Create Kubernetes Services for each agent
  2. Configure the dashboard with agent URLs pointing to those services
  3. Add agents through the dashboard UI

Here’s the detailed solution for future reference:

Solution: Kubernetes Multi-Agent Setup

1. Create Services for Your Agents

First, you need to expose your agents as Kubernetes services. Since your agents are running in Podman, you’ll need to either:

Option A: Run agents in Kubernetes (Recommended)
Option B: Expose Podman agents to Kubernetes (if agents must stay in Podman)

Let me show you Option A (running agents in Kubernetes):

---
# Agent 1 Deployment
apiVersion: apps/v1
kind: Deployment
metadata:
  name: traefik-agent-01
  namespace: traefik-log-dashboard
spec:
  replicas: 1
  selector:
    matchLabels:
      app: traefik-agent
      instance: agent-01
  template:
    metadata:
      labels:
        app: traefik-agent
        instance: agent-01
    spec:
      containers:
      - name: agent
        image: hhftechnology/traefik-log-dashboard-agent:latest
        ports:
        - containerPort: 5001
          name: api
        env:
        - name: PORT
          value: "5001"
        - name: TRAEFIK_LOG_DASHBOARD_ACCESS_PATH
          value: "/logs/access.log"
        - name: TRAEFIK_LOG_DASHBOARD_ERROR_PATH
          value: "/logs/traefik.log"
        - name: TRAEFIK_LOG_DASHBOARD_AUTH_TOKEN
          valueFrom:
            secretKeyRef:
              name: traefik-agent-tokens
              key: agent-01-token
        - name: TRAEFIK_LOG_DASHBOARD_SYSTEM_MONITORING
          value: "true"
        - name: TRAEFIK_LOG_DASHBOARD_LOG_FORMAT
          value: "json"
        - name: TRAEFIK_LOG_DASHBOARD_GEOIP_ENABLED
          value: "false"
        volumeMounts:
        - name: traefik-logs
          mountPath: /logs
          readOnly: true
        - name: agent-data
          mountPath: /data
        resources:
          requests:
            cpu: 100m
            memory: 128Mi
          limits:
            cpu: 500m
            memory: 512Mi
        livenessProbe:
          httpGet:
            path: /api/logs/status
            port: 5001
          initialDelaySeconds: 10
          periodSeconds: 30
        readinessProbe:
          httpGet:
            path: /api/logs/status
            port: 5001
          initialDelaySeconds: 5
          periodSeconds: 10
      volumes:
      - name: traefik-logs
        hostPath:
          path: /var/log/traefik  # Adjust to your Traefik logs location
          type: Directory
      - name: agent-data
        persistentVolumeClaim:
          claimName: agent-01-data

---
# Agent 1 Service
apiVersion: v1
kind: Service
metadata:
  name: traefik-agent-01
  namespace: traefik-log-dashboard
spec:
  selector:
    app: traefik-agent
    instance: agent-01
  ports:
  - name: api
    port: 5001 …

plakun commented on GitHub:

Well, i did exactly what you wrote in p.4, option 2 :slight_smile:
Dashboard is in k8s.
Traefik is on linux virtual machine, agent is on the same vm in podman.
I have added agents through dashboard UI, added theres keys, i can see agents in UI. But dashboard still tries to connect to default agent on localhost ignoring my settings.
I see another ticket where topic starter acted exactly how it is written in manual and he has same problem - Multi Agent Not Working · Issue #89 · hhftechnology/traefik-log-dashboard · GitHub

Btw there is no wget in dashboard image to trobleshoot connectivity as it said in p.5.

kubectl get pods -n traefik-log-dashboard
NAME                                     READY   STATUS    RESTARTS   AGE
traefik-log-dashboard-55786d8659-tw7rk   1/1     Running   0          2d19h
kubectl exec -it traefik-log-dashboard-55786d8659-tw7rk -n traefik-log-dashboard -- wget -O- http://traefik-agent-01:5001/api/logs/status
2025-10-20T04:48:21.321366Z: 2025-10-20T04:48:21.321072Z: executable file `wget` not found in $PATH: No such file or directory

hhftechnology replied in a thread on GitHub to plakun:

I see another ticket where topic starter acted exactly how it is written in manual and he has same problem - https://github.com/hhftechnology/traefik-log-dashboard/issues/89

Btw there is no wget in dashboard image to trobleshoot connectivity as it said in p.5.

kubectl get pods -n traefik-log-dashboard
NAME                                     READY   STATUS    RESTARTS   AGE
traefik-log-dashboard-55786d8659-tw7rk   1/1     Running   0          2d19h
kubectl exec -it traefik-log-dashboard-55786d8659-tw7rk -n traefik-log-dashboard -- wget -O- http://traefik-agent-01:5001/api/logs/status
2025-10-20T04:48:21.321366Z: 2025-10-20T04:48:21.321072Z: executable file `wget` not found in $PATH: No such file or directory

you can ship the health check for the dashboard, till i figure how to archive this optimal.
currently i don’t have perfect fix, and i don’t want to apply a bandage.

hhftechnology replied in a thread on GitHub to plakun:

other than that, multi agent work just fine

osmollo commented on GitHub:

Hi!

I have the same problem but im using docker-compose to deploy the containers:

I have 2 agents in different servers behind a traefik proxy and the dashboard instance is in a thind server with connectivity with agents

agent-1:

  traefik_agent:
    container_name: traefik_agent
    environment:
        PORT: '5000'
        TRAEFIK_LOG_DASHBOARD_ACCESS_PATH: /logs/access.log
        TRAEFIK_LOG_DASHBOARD_AUTH_TOKEN: <token_agent_1>
        TRAEFIK_LOG_DASHBOARD_ERROR_PATH: /logs/traefik.log
        TRAEFIK_LOG_DASHBOARD_GEOIP_CITY_DB: /geoip/GeoLite2-City.mmdb
        TRAEFIK_LOG_DASHBOARD_GEOIP_COUNTRY_DB: /geoip/GeoLite2-Country.mmdb
        TRAEFIK_LOG_DASHBOARD_GEOIP_ENABLED: true
        TRAEFIK_LOG_DASHBOARD_LOG_FORMAT: json
        TRAEFIK_LOG_DASHBOARD_SYSTEM_MONITORING: true
    image: hhftechnology/traefik-log-dashboard-agent:dev-dashboard
    labels:
        traefik.docker.network: traefik
        traefik.http.routers.traefik_agent-secure.rule: Host(`agent.mydomain1`)
        traefik.http.services.traefik_agent.loadbalancer.server.port: '5000'
    networks:
    - traefik
    volumes:
    - traefik:/logs:ro
    - agent_geoip:/geoip:ro
    - agent_positions:/data

agent-2:

  traefik_agent:
    container_name: traefik_agent
    environment:
        LOG_LEVEL: debug
        PORT: 5000
        TRAEFIK_LOG_DASHBOARD_ACCESS_PATH: /logs/access.log
        TRAEFIK_LOG_DASHBOARD_AUTH_TOKEN: <token_agent_2>
        TRAEFIK_LOG_DASHBOARD_ERROR_PATH: /logs/traefik.log
        TRAEFIK_LOG_DASHBOARD_GEOIP_CITY_DB: /geoip/GeoLite2-City.mmdb
        TRAEFIK_LOG_DASHBOARD_GEOIP_COUNTRY_DB: /geoip/GeoLite2-Country.mmdb
        TRAEFIK_LOG_DASHBOARD_GEOIP_ENABLED: true
        TRAEFIK_LOG_DASHBOARD_SYSTEM_MONITORING: true
        TRAEFIK_LOG_DASHBOARD_LOG_FORMAT: json
    image: hhftechnology/traefik-log-dashboard-agent:dev-dashboard
    labels:
        traefik.docker.network: traefik
        traefik.http.routers.traefik_agent-secure.rule: Host(`agent.mydomain2`)
        traefik.http.services.traefik_agent.loadbalancer.server.port: '5000'
    networks:
    - traefik
    volumes:
    - traefik:/logs:ro
    - agent_geoip:/geoip:ro
    - agent_positions:/data

dashboard:

  traefik_dashboard:
    container_name: traefik_dashboard
    environment:
        NODE_ENV: production
        PORT: 3000
    image: hhftechnology/traefik-log-dashboard:dev-dashboard
    labels:
        backup: false
        caddy: log.mydomain
        caddy.import: tinyauth_forwarder *
        caddy.reverse_proxy: '{{upstreams 3000}}'
        caddy_ingress_network: traefik_dashboard
    networks:
    - traefik_dashboard

And this is the agent configuration in dashboard:

{
  "version": "1.0",
  "exportDate": "2025-10-20T16:29:21.097Z",
  "agents": [
    {
      "id": "agent-1",
      "name": "agent-1",
      "url": "https://agent.mydomain1",
      "token": "<token_agent_1>",
      "location": "off-site",
      "number": 1,
      "tags": [] …

osmollo replied in a thread on GitHub to osmollo:

Hi!!! I was testing the dashboard with the browser’s devtool opened and the error 500 is due to the request to the agent api really attacks to dashboard domain:

External Image

osmollo replied in a thread on GitHub to osmollo:

It works!!!

After reading the other discussion about this issue (Multi Agent Not Working · hhftechnology/traefik-log-dashboard · Discussion #90 · GitHub) I updated the docker image with tag dev-dashboard and voilá!

Thank you so much

plakun commented on GitHub:

using dev-dashboard with pv in k8s realy helped, thx.
Now I see that when switching the data source, some fields get “stuck” — their data doesn’t update until the browser page is reloaded.

hhftechnology commented on GitHub:

@​plakun @​osmollo check the docs for issues . latest release should fix all the pending issues. image: hhftechnology/traefik-log-dashboard-agent:2.1.0

plakun commented on GitHub:

You should fix docs in Release Release v2.1.0 · hhftechnology/traefik-log-dashboard · GitHub
there is wrong tag “v2.1.0”

osmollo replied in a thread on GitHub to hhftechnology:

Hi! thank you so much for the update…

@​hhftechnology In the release notes, i saw that default port for agent has changed to 8080, is it correct? I guess that is a breaking change that should be more vissible. Also in release notes, the link to CHANGELOG.md is not working, that file doesn’t exist

Regards

osmollo replied in a thread on GitHub to hhftechnology:

Hi!

@​hhftechnology I was trying to update my containers and none of those docker images exist:

External Image

hhftechnology replied in a thread on GitHub to hhftechnology:

Remove the v.

hhftechnology replied in a thread on GitHub to plakun:

Yes , I will do it today

osmollo replied in a thread on GitHub to hhftechnology:

oh f*ck! it was @​plakun said in the below comment, sorry