How to take automated screenshots of a Grafana dashboard

Learn how to automate scheduled screenshots of your Grafana dashboard with PagePixels.

Introduction

PagePixels is a screenshot automation tool that you can use to take recurring screenshots of web pages, including screenshots of your Grafana dashboards.

PagePixels is free to start, and this tutorial demonstrates how to capture recurring screenshots of a Grafana dashboard every 30 minutes.

Example

Prerequisites

Before you start, you'll need:

How to take automatic screenshots of a Grafana dashboard

To take automatic screenshots of your Grafana dashboard every 30 minutes:

1

Create a screenshot

Log in to your PagePixels account, and click the "+Create Screenshot" button.

2

Set your schedule

By default, recurring screenshots are set to every 5 minutes.

To take a screenshot every 30 minutes, change the default frequency value "5" to "30" by clicking into the input box and updating the number.

3

Add URL

Copy and paste the public link for your Grafana dashboard into the "Website URL to Capture" field.

4

Add CSS Selector

To screenshot only the Grafana dashboard, you can use the CSS Selector:

.grafana-app
5

Add Wait and Incremental Scroll

To help load your dashboard's data visualizations, increase the "Time to Wait" value to 12000 and check the "Incremental Scroll" option.

You can increase the "Time to Wait" value further if needed. The max is 20000 ms unless you've purchased the 5-minute Time Out Add-on.

6

Add custom CSS

To improve the look of your Grafana dashboard screenshot, you can use following CSS in the CSS Injection field:

.grafana-app {
max-width: 1920px !important;
height: fit-content !important;
}
[data-testid="public-dashboard-footer"],
[data-testid="public-dashboard-scene-page"] > div:first-child {
position:static !important;
}
7

Save Screenshot

Click the green Save Screenshot button (top-right).

Your Grafana screenshot automation is officially set, and your first screenshot will be taken shortly.

What else can PagePixels do?

When you automate screenshots of your Grafana dashboards with PagePixels, you can also:

  • Use PagePixels' Screenshot API to programmatically take scheduled and instant screenshots of your Grafana dashboards.
  • Automate clicking buttons, filling out forms, performing a search and more with Multi-Step Screenshot functionality.
  • Convert data from third-party APIs, HTML emails, and other HTML content into screenshots using the Custom HTML Screenshots endpoint.
  • Embed the latest information from around the web in your Grafana dashboard using PagePixels Embed URL technology and Grafana's Text panel. See an example here of how to embed a random XKCD comic in your Grafana dashboard.
  • Send recurring screenshots of your Grafana dashboard to a public or private Slack channel, a Custom Webhook address, or save your screenshot images to your Dropbox account.
  • Leverage no-code integration platforms Zapier and Make to take, upload, and email your Grafana dashboard screenshots to thousands of services, such as Gmail, Amazon S3, and OneDrive.
  • Automatically capture and AI analyze your Grafana dashboard screenshot image with the AI Analysis Screenshot feature.
  • Have AI compare and contrast multiple Grafana dashboard screenshots and other images with the Multiple Image AI Analysis endpoint of our Screenshot API.
  • Use proxies to capture screenshots from different locations around the world with the Screenshot API's Real Locations feature.
  • Record and automatically replay browser actions before capturing screenshots in your Chrome browser using the PagePixels Screenshots Chrome Extension.
  • Automate structured data extraction and AI-powered text analysis across multiple domains with PagePixels' Domain Research endpoints.

To see even more things you can do with PagePixels, check out our Features page.

Support

Questions? Contact us anytime by email:

support-tickets@pagepixels.com

Or send us a message through our Support page.