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

Email Notification Images Not Working Grafana v7.0.1 #25160

Closed
timlharrison opened this issue May 27, 2020 · 8 comments
Closed

Email Notification Images Not Working Grafana v7.0.1 #25160

timlharrison opened this issue May 27, 2020 · 8 comments
Labels
area/image-rendering needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc

Comments

@timlharrison
Copy link

timlharrison commented May 27, 2020

What happened: After upgrading to Grafana v7.0.1, embedded graph images in email notifications stopped displaying and started showing this message:

email-no-image

So I installed the Grafana Image Renderer plugin and now I no longer see this, but I don't see anything at all in the email but text:

email-no-anything

What you expected to happen: I expected images to continue working after the 7.0.1 upgrade, but was okay with installing the image renderer plugin. I expected the images to work after installing that plugin.

How to reproduce it (as minimally and precisely as possible): Install Grafana 6.7.3 on Windows Server 2016 Standard. Set up email notification alerts. Upgrade to Grafana 7.0.1. Install the Image Renderer Plugin. Note that the plugin appears to be installed correctly under Settings -> Plugins.

Anything else we need to know?: After the upgrade, I started seeing these errors in the log:

lvl=eror msg="Could not build alert model for rule" logger=alerting.ruleReader ruleId=147 error="Alert validation error: Unable to translate notification id to uid, Alert notification [ Id: 5, OrgId: 1 ] not found AlertId: 147 PanelId: 31 DashboardId: 25"

Also, my alert dashboards look fine and seem to work fine and are sending out alert notification emails as expected.

Environment:

  • Grafana version: 7.0.1
  • Data source type & version: Prometheus 2.18.1
  • OS Grafana is installed on: Windows Server 2016 Standard
  • User OS & Browser: Windows 10 Professional, Chrome
  • Grafana plugins: Grafana Image Renderer 2.0.0
  • Others:
@torkelo
Copy link
Member

torkelo commented May 28, 2020

Please test that the image renderer plugin is working (panel menu -> share -> direct rendered image), then if no image, inspect server logs

@torkelo torkelo added the needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc label May 28, 2020
@cbiot
Copy link

cbiot commented May 28, 2020

image
I am seeing the same results as described above. I followed torkelo's advice to show the "Direct link rendered image" and got the result shown above.

Log only shows old entries... recent alarm entries from yesterday afternoon.
to see the log entries, I typed:

` sudo systemctl status grafana-server -l

● grafana-server.service - Grafana instance
Loaded: loaded (/usr/lib/systemd/system/grafana-server.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2020-05-27 18:42:20 UTC; 20h ago
Docs: http://docs.grafana.org
Main PID: 25706 (grafana-server)
CGroup: /system.slice/grafana-server.service
├─25706 /usr/sbin/grafana-server --config=/etc/grafana/grafana.ini --pidfile=/var/run/grafana/grafana-server.pid --packaging=rpm cfg:default.paths.logs=/var/log/grafana cfg:default.paths.data=/var/lib/grafana cfg:default.paths.plugins=/var/lib/grafana/plugins cfg:default.paths.provisioning=/etc/grafana/provisioning
└─25713 /var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_amd64
`

My experience is minimal for looking deeper. Any other ideas or suggestions?

@cbiot
Copy link

cbiot commented May 28, 2020

Again, my experience is limited.

Typing "uname -m" shows: x86_64
From what I understand that means "Intel" hardware.
The above paste from my log shows: "/var/lib/grafana/plugins/grafana-image-renderer/plugin_start_linux_amd64"
Is it possible that I have the wrong plugin installed?
When I installed it, I typed: grafana-cli plugins install grafana-image-renderer
and then restarted the service.

@timlharrison
Copy link
Author

timlharrison commented May 28, 2020

Here's what I'm seeing in the log - the image render doesn't work:

Rendering failed: Error: net::ERR_CERT_COMMON_NAME_INVALID at https://localhost:8080

I'm assuming this is because I'm using a cert that is not for https://localhost. Is there a way to tell the plugin to use a specific host name and/or ignore cert errors? It seems to be ignoring the root_url setting in the grafana config ini.

@timlharrison
Copy link
Author

timlharrison commented May 28, 2020

Was able to fix it by adding this to my config.ini file:

[plugin.grafana-image-renderer]
# Instruct headless browser instance whether to ignore HTTPS errors during navigation. Per default HTTPS errors are not ignored. Due to
# the security risk it's not recommended to ignore HTTPS errors.
rendering_ignore_https_errors = true

@jchavezb-37
Copy link

it is almost sure that you dont have the library libx11-xcb.so.1, so, please install it with:
apt-get install libx11-xcb-dev.

To test it, please go to any charts, click in the down arrow -> Share, then click in Direct Link Rendered Image. A Google Chrome windows must appearing with the chart.

@mikegyver99
Copy link

Google lead me here....I had same Rendering failed: Error: net::ERR_CERT_COMMON_NAME_INVALID error and this corrected it in my case.... YMMV.
grafana.ini
http_addr = <fdqn that matches the cert CN or SAN>

@aktentasche
Copy link

aktentasche commented Aug 17, 2021

Hi,
I needed to install following packages on Debian 10 bullseye headless installation:

sudo apt install libxcursor1 libxss1 libpangocairo-1.0-0 libgtk-3-0

Maybe that helps someone.

(checked with trying to share a panel as image and sudo tail /var/log/grafana/grafana.log)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/image-rendering needs more info Issue needs more information, like query results, dashboard or panel json, grafana version etc
Projects
None yet
Development

No branches or pull requests

7 participants