How to take and display auto-updating screenshots in Grafana dashboards

Learn how you can take scheduled screenshots of web content and automatically display the latest image in your Grafana dashboard with PagePixels.

Introduction

PagePixels is a screenshot automation tool that you can use to automatically take screenshots and dynamically display the latest image in a website, app, or dashboard platform, including Grafana.

You can accomplish this by scheduling a screenshot in PagePixels and using an Embed URL in a Grafana Text visualization panel.

A PagePixels' Embed URL is a single web address that always displays the most up-to-date image for a scheduled screenshot configuration.

PagePixels is free to start and this tutorial demonstrates how you can take daily screenshots of a random XKCD comic and display the image in your Grafana dashboard.

Example

Prerequisites

Before you start, you'll need:

  • A PagePixels account
  • A link to a web page you want to screenshot
    • For this example, we're going to use XCKD's random comic page:

      https://c.xkcd.com/random/comic/

  • A Grafana account

How to capture and embed auto-updating screenshots in Grafana

To take daily screenshots of a web page and display the latest image in a Grafana dashboard:

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.

For a daily screenshot, change the default frequency values from every "5" "Minutes" to every "1" "Days" using the input field and drop-down menu.

3

Add URL

Copy and paste the web page URL you want to screenshot into the Website URL to Capture field.

For example: https://c.xkcd.com/random/comic/

4

Configure your screenshot

Get your screenshot to look just right with over 20 different setting options in PagePixels.

For example, using the CSS Selector field, you can capture just the comic element on the XKCD page with the following selector: #comic

5

Save Screenshot

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

6

Copy Embed URL

Click the clipboard icon to copy your configuration's Embed URL.

7

Add Text panel in Grafana

In your Grafana dashboard, click Add and select Visualization from the drop-down menu.

Select the Text panel option.

8

Configure Text panel

Under "Mode", select the HTML tab. Add an img HTML tag with the Embed URL as the src value. For example:

<img src="https://pagepixels.com/app/screenshots/screenshot-config-id/embed">

Click Save dashboard and add a message about your changes. Click Save again.

Your screenshot automation is set and the latest screenshot will automatically display in your Grafana dashboard.

What else can PagePixels do?

When you use PagePixels for automating screenshots, you can:

  • Leverage PagePixels' Screenshot API to programmatically take scheduled and instant screenshots.
  • Schedule screenshots by time interval, days of the week, time of day, and time zone using PagePixels' built-in scheduling system.
  • 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 feature.
  • Automatically take screenshots and have an AI analyze the resulting images with the AI Analysis Screenshot feature.
  • Have AI compare and contrast multiple screenshots and other images with the Multiple Image AI Analysis feature.
  • Send scheduled screenshots to a public or private Slack channel, a Custom Webhook address, or save your screenshot images to your Dropbox account.
  • Connect PagePixels to no-code integration platforms Zapier and Make (Integromat) to automatically send, save, and email screenshots to thousands of services, such as OneDrive, Microsoft Teams, and Microsoft Excel.
  • Capture screenshots from different locations around the world with PagePixels' Real Locations Screenshots feature.
  • Automate structured data extraction and AI-powered text analysis for your marketing, sales, and lead generation needs with PagePixels' Domain Research feature.

See even more possibilities of what you can do on our Features page →

Support

Questions? Contact us anytime by email:

support-tickets@pagepixels.com

Or send us a message through our Support page.