Configuring Grafana Image Renderer :: Kloudfuse Docs
Configuring Grafana Image Renderer
Grafana ships with the Grafana server. For scenarios where you must use stored images from dashboards for alerting or reports, enable the Grafana-Image-Renderer Plugin.
To enable the plugin, see the configuration steps in Grafana Documentation, the Grafana Helm Chart.
Relevant YAML configuration
grafana:
imageRenderer:
enabled: true
# resources: {} # Set resource limits for image-renderer pods {}
# nodeSelector: {} # Node labels for pod assignment {}
# tolerations: [] # Toleration labels for pod assignment []
# affinity: {} # Affinity settings for pod assignment {}
# extraConfigmapMounts: [] # Additional image-renderer configMap volume mounts (values are templated) []
# extraSecretMounts: [] # Additional image-renderer secret volume mounts []
# extraVolumeMounts: [] # Additional image-renderer volume mounts []
# extraVolumes: [] # Additional image-renderer volumes []
# serviceAccountName: "" # image-renderer deployment serviceAccountName ""
Server Requirements
Grafana creates browser instances in the background for the actual rendering. Depending on how many concurrent images are being created, this could cause performance problems if the Pod is running on the same machines as the Kloudfuse cluster.
To avoid this, it is recommended that you create a node to only run the image renderer. There are several advantages to this:
- The machine required to run this Pod is significantly smaller than one required for the Kfuse Cluster.
- It will prevent a heavy workload on the image renderer from impacting other processes on the machine.
- The node can be secured separately from the rest of the cluster, particularly with writing files to publicly accessible cloud storage.
For system requirements, Grafana recommended a minimum of 16GB, with more required for a higher workload.
Configuring the Pod
To begin configuring the pod, see the Grafana Documentation on Set Up Image Rendering.
While the image renders, the system temporarily writes the PNG image to the file system. After completion, the PNG image appears in the
pngfolder in the Grafana data folder, and then the system removes it. A background job runs every 10 minutes and removes temporary images. You can configure how long the system stores the image using the temp_data_lifetime setting.
Using Images in Alerts
Consider these requirements:
- To use images in notifications, Grafana must be set up to use image rendering.
- When a screenshot is taken, it is saved to the [data][paths] folder, even if Grafana is configured to upload screenshots to a cloud storage service.
- You should use a cloud storage service unless sending alerts to Discord, email, Pushover, Slack or Telegram.
- Image previews might not work in all instant messaging and communication platforms, as some services rewrite URLs to use their CDN.
- When uploading screenshots to a cloud storage service, Grafana uses a random filename for each image.
- Grafana does not delete screenshots from cloud storage. You need to use a storage policy.
- Grafana does not delete screenshots uploaded to its internal web server.