Grafana Alert Email Image Fails


I’m unable to receive Grafana images within our alert emails as image renderer (latest) service is failing to render image over email (receiving “401 Unauthorized” error in Grafana logs). I’m currently using Grafana 8.0.6 and data is flowing from on-prem InfluxDB. Will be great if someone can help on this!!!

Given below is snippet of error log details (somewhat anonymized):

e[32mINFOe[0m[12-19|16:36:30] New state change e[32mloggere[0m=alerting.resultHandler e[32mruleIde[0m=213 e[32mnewStatee[0m=alerting e[32mprev statee[0m=pending
e[32mINFOe[0m[12-19|16:36:30] Rendering e[32mloggere[0m=rendering e[32mrenderere[0m=http e[32mpathe[0m=“d-solo/<>/metric-2?orgId=1&panelId=40”
e[36mDBUGe[0m[12-19|16:36:30] calling remote rendering service e[36mloggere[0m=rendering e[36mrenderere[0m=http e[36murle[0m=“http://<>/render?deviceScaleFactor=1.000000&domain=<>&encoding=&height=500&renderKey=<>=15&timezone=&url=http%3A%2F%2F<>%3A3000%2Fd-solo%2F<>%2Fmetric-2%3ForgId%3D1%26panelId%3D40%26render%3D1&width=1000”
e[31mERORe[0m[12-19|16:36:30] Remote rendering request failed e[31mloggere[0m=rendering e[31mrenderere[0m=http e[31merrore[0m=“401 Unauthorized”
e[31mERORe[0m[12-19|16:36:30] Failed to render and upload alert panel image. e[31mloggere[0m=alerting.notifier e[31mruleIde[0m=213 e[31merrore[0m=“remote rendering request failed, status code: 401, status: 401 Unauthorized”
e[32mINFOe[0m[12-19|16:36:30] Sending alert notification to e[32mloggere[ e[32maddressese[0m=“[]” e[32msingleEmaile[0m=true

1 Like

Is there anyone who can help on this? Would really appreciate it!!!

Hi All and Happy New Year! Is it possible to help with the above issue?

Do you have any additional authentication between Grafana and the Grafana image renderer other than Grafana’s built in authentication?

No, not that I’m aware of. Essentially Grafana and Grafana image renderer are running in containers that are hosted within a third-party UI platform we use for data collection. There are only specific instances of this UI platform, from which the image issues are occurring. From other instances, Grafana alerts is able to email images. We use the same installation procedure / configuration to install Grafana / Grafana image renderer in each instance - the only parameter we change in each case is the IP address for that instance. So why images appear from some platform instances, and why we’re getting 401 Unauthorized error from others is not known.

check grafana.ini, remote rendering ip ensure config(remote mode,if you use plug-in mode,not to set),authorized ensure config(Refer to official documents)

Also, Google househead browse if installed