grafana / loki

Like Prometheus, but for logs.
https://grafana.com/loki
GNU Affero General Public License v3.0
23.29k stars 3.38k forks source link

Docker Loki Driver ARM64 #5682

Open feniarus opened 2 years ago

feniarus commented 2 years ago

Is your feature request related to a problem? Please describe. I tried installing the Loki Docker Driver but it doesn't work because it is for AMD64 only at the moment.

Describe the solution you'd like Adding support for ARM64 and ARM/v7 Can be done by cross compiling even on AMD64 As example via GOOS=linux GOARCH=arm GOARM=7 go build ./clients/cmd/docker-driver will build the docker-driver for arm/v7 on AMD64

Describe alternatives you've considered A Version for ARM64/v8 of the Loki docker plugin is on Docker hub available miacis/loki-docker-driver

cstyan commented 2 years ago

I think this is something we'd be open to accepting a PR for, have a look at this in progress PR that's adding arm64 support for another component as an example.

nepeat commented 1 year ago

Linking this for reference if anyone else stumbles upon this issue.

1973 is tracking a similar issue but for armv6 and armv7 due to its age (Apr 22, 2020)

mattmeye commented 1 year ago

+1

fede843 commented 1 year ago

same here. +1

fabriciofeijo commented 1 year ago

same here +1

adiii717 commented 1 year ago

same here +1

francescor commented 7 months ago

we need it badly, too

peterhirn commented 7 months ago

I ran into some stability issues on arm using the docker driver so I switched over to journald which works very well for my setup. Pasting my config here for reference.

/etc/docker/daemon.json

{
  "log-driver": "journald",
  "log-opts": {
    "tag": "{{.Name}}/{{.ID}}"
  }
}

promtail.yaml

scrape_configs:
  - job_name: journald
    journal:
      max_age: 12h
      path: /var/log/journal
      labels:
        job: journald
    relabel_configs:
      - action: drop
        source_labels: [__journal__systemd_unit]
        regex: session-.*
      - source_labels: [__journal__hostname]
        target_label: hostname
      - source_labels: [__journal__boot_id]
        target_label: boot_id
      - source_labels: [__journal__systemd_unit]
        target_label: unit
      - source_labels: [__journal_priority]
        target_label: priority
      - source_labels: [__journal_container_name]
        target_label: container
      - source_labels: [__journal_container_id]
        target_label: container_id
      - source_labels: [__journal_image_name]
        target_label: image
    pipeline_stages:
      - match:
          selector: '{job="journald"} |= ".mount: Deactivated successfully."'
          action: drop
francescor commented 7 months ago

@peterhirn loki for us works well, in ARM, too: our issue is that we see it is running in "emulation" with x86_64-binfmt

ps aux | grep docker-driver
root     3548175 19.7  0.7 1985908 237248 ?      Ssl  09:30  27:24 /usr/libexec/qemu-binfmt/x86_64-binfmt-P /bin/docker-driver /bin/docker-driver

so we are sure this results in performance being pretty bad

mpiorowski commented 1 month ago

Any updates? Hetzner arm servers are amazing, and on each of them playing with bulding the arm64 version of this plugin is tedious.

francescor commented 1 month ago

ping