Skip to content

Rendered image with context Grafana Image Renderer not the png #608

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

Closed
Huimintai opened this issue Mar 7, 2025 · 4 comments
Closed

Rendered image with context Grafana Image Renderer not the png #608

Huimintai opened this issue Mar 7, 2025 · 4 comments

Comments

@Huimintai
Copy link

Huimintai commented Mar 7, 2025

What happened:
The image render can not generate a png but a text file:

Image

When check the download image file:

# file Pipelines_Day.png
Pipelines_Day.png: ASCII text, with no line terminators
# cat Pipelines_Day.png
Grafana Image Renderer

What you expected to happen:
Render the png images.

Anything else we need to know?:
The image render deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: grafana-image-renderer
  labels:
    app: grafana-image-renderer    
spec:
  replicas: 1
  selector:
    matchLabels:
      app: grafana-image-renderer  
  template:
    metadata:
      labels:
        app: grafana-image-renderer 
    spec:
      containers:
      - name: renderer
        image: grafana/grafana-image-renderer:latest
        ports:
        - name: http
          containerPort: 8081
        env:
        - name: ENABLE_METRICS
          value: "true"
        - name: IGNORE_HTTPS_ERRORS
          value: "true"
        - name: LOG_LEVEL
          value: debug
        resources:
          limits:
            cpu: 1000m
            memory: 1000Mi
          requests:
            cpu: 100m
            memory: 100Mi
---
apiVersion: v1
kind: Service
metadata:
  name: grafana-image-renderer
  labels:
    app: grafana-image-renderer   
spec:
  ports:
  - port: 8081
    targetPort: 8081
    name: http
  selector:
    app: grafana-image-renderer    

grafana env:

        - name: GF_RENDERING_SERVER_URL
          value: http://grafana-image-renderer:8081
        - name: GF_RENDERING_CALLBACK_URL
          value: http://grafana:80

grafana log :

logger=rendering renderer=http t=2025-03-07T06:58:54.048557399Z level=info msg=Rendering path="d-solo/fe84xuzicu6f4b?orgId=1&from=2025-02-28T06:58:30.306Z&to=2025-03-07T06:58:30.306Z&timezone=UTC&var-datasource=P23BF0D244A4CB62C&var-pipelinetype=PR&var-stagetype=Integration%20Tests&var-branch=develop&var-taskname=Post%20upgrade%20tests&panelId=panel-1&__feature.dashboardSceneSolo&width=1000&height=500&scale=1&tz=UTC" userID=1
logger=rendering renderer=http t=2025-03-07T06:58:54.050524376Z level=debug msg="calling remote rendering service" url="http://grafana-image-renderer:8081?deviceScaleFactor=1.000000&domain=grafana&encoding=png&height=500&renderKey=kw3hpOYyZ6UVWBkhUzNRh9Nn4LpQp5Pn&timeout=60&timezone=UTC&url=http%3A%2F%2Fgrafana%3A80%2Fd-solo%2Ffe84xuzicu6f4b%3ForgId%3D1%26from%3D2025-02-28T06%3A58%3A30.306Z%26to%3D2025-03-07T06%3A58%3A30.306Z%26timezone%3DUTC%26var-datasource%3DP23BF0D244A4CB62C%26var-pipelinetype%3DPR%26var-stagetype%3DIntegration%2520Tests%26var-branch%3Ddevelop%26var-taskname%3DPost%2520upgrade%2520tests%26panelId%3Dpanel-1%26__feature.dashboardSceneSolo%26width%3D1000%26height%3D500%26scale%3D1%26tz%3DUTC%26render%3D1&width=1000"
logger=rendering renderer=http t=2025-03-07T06:58:54.05511352Z level=debug msg="Successfully rendered image" path="d-solo/fe84xuzicu6f4b?orgId=1&from=2025-02-28T06:58:30.306Z&to=2025-03-07T06:58:30.306Z&timezone=UTC&var-datasource=P23BF0D244A4CB62C&var-pipelinetype=PR&var-stagetype=Integration%20Tests&var-branch=develop&var-taskname=Post%20upgrade%20tests&panelId=panel-1&__feature.dashboardSceneSolo&width=1000&height=500&scale=1&tz=UTC"

image render log:

{"level":"debug","message":"::ffff:10.244.0.21 - - [07/Mar/2025:07:02:19 +0000] \"GET /?deviceScaleFactor=1.000000&domain=grafana&encoding=png&height=500&renderKey=zZCNp2Q7LraeIsMu4lKSndRy5LjZEDIw&timeout=60&timezone=UTC&url=http%3A%2F%2Fgrafana%3A80%2Fd-solo%2Ffe84xuzicu6f4b%3ForgId%3D1%26from%3D2025-02-28T06%3A58%3A30.306Z%26to%3D2025-03-07T06%3A58%3A30.306Z%26timezone%3DUTC%26var-datasource%3DP23BF0D244A4CB62C%26var-pipelinetype%3DPR%26var-stagetype%3DIntegration%2520Tests%26var-branch%3Ddevelop%26var-taskname%3DPost%2520upgrade%2520tests%26panelId%3Dpanel-1%26__feature.dashboardSceneSolo%26width%3D1000%26height%3D500%26scale%3D1%26tz%3DUTC%26render%3D1&width=1000 HTTP/1.1\" 200 22 \"-\" \"Grafana/11.5.1\"\n"}

Environment:

  • Grafana Image Renderer version: latest
  • Grafana version: 11.5.1
  • Installed plugin or remote renderer service: remote
  • OS Grafana Image Renderer is installed on:
  • User OS & Browser: Chrome
  • Others:
@github-project-automation github-project-automation bot moved this to 🗂️ Needs Triage / Escalation in Sharing squad Mar 7, 2025
@evictorero
Copy link
Contributor

Hi @Huimintai, which image renderer version are you using, or which was the latest at the time when you tested?
Was this working before, or is it a brand-new installation?
Can you try adding /render at the end of your GF_RENDERING_SERVER_URL value ?

@Huimintai
Copy link
Author

Hi @Huimintai, which image renderer version are you using, or which was the latest at the time when you tested? Was this working before, or is it a brand-new installation? Can you try adding /render at the end of your GF_RENDERING_SERVER_URL value ?

This is the image: grafana/grafana-image-renderer:latest which I used and this is the first time I try to test the remote call.

@evictorero
Copy link
Contributor

Yes, but latest depends on the moment where you download it, it is not a version itself.
However, I don't think this is related to the version, I think the configuration is wrong, please update the GF_RENDERING_SERVER_URL and try again.

@evictorero
Copy link
Contributor

I couldn't reproduce it. Feel free to open a new issue if the problem persists.

@github-project-automation github-project-automation bot moved this from 🗂️ Needs Triage / Escalation to 🚀 Done in Sharing squad Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 🚀 Done
Development

No branches or pull requests

2 participants