admin管理员组

文章数量:1126451

I am trying to configure Grafana to upload rendered images to a MinIO bucket using the S3-compatible external image storage feature. However, the images are being stored locally in the /var/lib/grafana/png directory instead of being uploaded to MinIO.

I have verified that:

  1. The MinIO alias is set correctly, and I can manually upload images to MinIO using the mc CLI.

  2. Grafana is configured with the following environment variables in a Docker Compose file:

    GF_UNIFIED_ALERTING_SCREENSHOTS_CAPTURE: true
    GF_UNIFIED_ALERTING_SCREENSHOTS_UPLOAD_EXTERNAL_IMAGE_STORAGE: true
    GF_EXTERNAL_IMAGE_STORAGE: s3
    GF_EXTERNAL_IMAGE_STORAGE_S3_ENDPOINT: http://minio:9000
    GF_EXTERNAL_IMAGE_STORAGE_S3_BUCKET: grafana
    GF_EXTERNAL_IMAGE_STORAGE_S3_REGION: us-east-1
    GF_EXTERNAL_IMAGE_STORAGE_S3_ACCESS_KEY: <my-access-key>
    GF_EXTERNAL_IMAGE_STORAGE_S3_SECRET_KEY: <my-secret-key>
    GF_EXTERNAL_IMAGE_STORAGE_S3_PATH_STYLE_ACCESS: true
    
  3. Grafana and MinIO are running in Docker containers on the same network.

Steps Taken:

  • Verified that MinIO is reachable from the Grafana container using curl.
  • Manually uploaded images to the MinIO bucket using the same credentials from within the Grafana container using aws-cli.
  • Enabled debug logs in Grafana but couldn't find any specific errors related to MinIO or image uploads.

Expected Behavior: Rendered images should be uploaded to the specified MinIO bucket.

Actual Behavior: Images are stored locally in /var/lib/grafana/png instead of being uploaded to MinIO.

Environment Details:

  • Grafana Version: latest Docker image
  • MinIO Version: latest Docker image
  • Docker Compose File: [include relevant sections here]

Questions:

  1. Is there a specific log or configuration I should check to debug this further?
  2. Has anyone successfully used MinIO with Grafana for external image storage? Are there additional steps or configurations required?

Any insights or suggestions would be greatly appreciated!

I configured Grafana to use MinIO as external image storage by setting the appropriate S3 environment variables in my Docker Compose file. I expected Grafana to upload rendered images to the specified MinIO bucket. However, the images are being stored locally in the /var/lib/grafana/png directory inside the Grafana container, and no uploads are happening to MinIO. I also tried manually uploading to MinIO using the same credentials via the mc CLI, and it worked fine, confirming that the MinIO setup and access keys are correct. Despite enabling debug logs in Grafana, I couldn't find any errors or logs related to image uploads failing.

本文标签: