ScreenshotNeo

BlogHow-to

How to Fix Blank Screenshots in Loki

A blank Loki screenshot can mean an unsupported Grafana alert image, an empty panel, or a failed capture. Identify which case you have, then follow the right checks.

By the ScreenshotNeo team4 October 20269 min read

A “blank screenshot in Loki” can describe three different problems: a Grafana alert notification without an image, a Grafana panel or Explore view with no log results, or a separate screenshot tool saving a blank image. Start by identifying which one you have. The fixes are different, and a screenshot setting cannot make an unsupported alert-image feature work.

If the missing image is in a Grafana alert notification for Loki, Grafana documents alert notification images as unsupported for Loki. If the live panel is blank, investigate the Loki query, time range, labels, retention, and data-source connection. If the Grafana view is populated but a separately captured file is blank, troubleshoot that capture path independently; the available Loki documentation does not establish a Loki-specific screenshot bug.

1. Identify what is actually blank

Symptom Likely path First check
An alert message arrives without a panel image Grafana alert notification support Check whether the alert uses Loki; Grafana lists Loki as unsupported for notification images.
A panel says “No data,” or Explore shows no logs Query results or Loki connectivity Run a simple selector over a wider time range and check the data-source connection.
The panel has data, but a PNG/JPEG/PDF file is white or empty Browser, renderer, or screenshot service Compare the saved file with the live panel and record the exact capture route and errors.

Keep these cases separate while debugging. A missing alert attachment does not prove the query is empty, and a working panel does not prove a browser capture succeeded.

2. If a Loki alert notification has no screenshot

Grafana’s Use images in notifications documentation says the feature is not supported in Mimir or Loki, or when Grafana sends alerts to other Alertmanagers such as the Prometheus Alertmanager. Treat this as a documented support limitation, not as evidence of a broken image renderer or a missing configuration toggle.

There are still useful checks if you need to understand what your alert is doing:

  1. Confirm that the missing artifact is the image attached to an alert notification, rather than a panel that is blank when opened directly.
  2. Open the associated Grafana panel and inspect its query and time range. This establishes whether there is a separate empty-data issue.
  3. Check the alert rule’s data source and the notification route. If the alert is associated with Loki, the documented notification-image limitation applies.
  4. If the alert uses a supported source but still lacks an image, follow Grafana’s notification image requirements for your Grafana version and deployment. Do not apply those requirements as a claimed Loki workaround.

Grafana’s documentation also notes that screenshots are associated with alerts through dashboard UID and panel ID annotations, and that alerts not associated with a panel cannot be screenshotted. That is a useful check for other supported alert paths, but it does not override the Loki limitation.

3. If the Grafana panel or Explore view is empty

A panel that loads without logs is a query or data problem until proven otherwise. Grafana’s Loki data-source troubleshooting guide recommends checking the query time range, stream selector, and retention when a query returns no data without an error.

Check time range, selector, and retention

  1. Expand the time range. Choose a period that includes known log activity. Verify the dashboard or Explore time picker rather than relying on the panel’s previous selection.
  2. Start with a known stream. Use Grafana’s label browser in the query editor to find labels and values that actually exist. A selector must match a stream; a typo or stale label value can return an empty result.
  3. Check retention. Confirm that the expected logs have not aged out under the Loki retention configuration.
  4. Check ingestion if no streams appear. If the selector and time range look right but there is still no data, determine whether logs are being written to Loki. An empty query alone does not tell you whether ingestion or retention is responsible.

Use a simple selector based on labels known to exist, then add filters incrementally. This helps distinguish a selector mismatch from an issue introduced by a filter or parser stage. For examples of query-side diagnostics, see Grafana’s Loki query troubleshooting documentation.

Check the data-source connection

If “Save & test” fails, or queries return network errors, check connectivity from Grafana’s server to Loki. Loki commonly listens on port 3100, but use the address and port configured in your deployment.

  • Base URL and port: configure the Loki base URL. Do not append an API path such as /loki/api/v1/push to the data-source URL.
  • Network and firewall: ensure the Grafana server can reach the Loki endpoint and the required traffic is allowed.
  • Grafana Cloud and private Loki: localhost or a private address refers to Grafana’s servers, not your private network. Grafana documents Private Data Source Connect (PDC) for reaching a self-hosted Loki from Grafana Cloud.
  • Multi-tenancy: when Loki has authentication enabled, verify that the request includes the required X-Scope-OrgID tenant header.
  • Authentication and TLS: verify credentials, tokens, permissions, and certificates. For a self-signed certificate, configure the CA certificate; skipping TLS verification is described as a testing option, not a routine production fix.

4. If queries fail, time out, or return errors

An error is useful evidence: follow its category instead of changing screenshot settings. Loki’s query troubleshooting documentation identifies syntax errors, query limits, timeouts, and storage access as possible causes of failed requests.

Observed error or behavior What to inspect Practical next step
HTTP 400 or a LogQL parse error Braces, parentheses, brackets, quotes, operators, and duration units Reduce the query to a simple selector, then add filters and expressions one at a time.
Query timeout or too many outstanding requests Time range, data volume, filters, line limit, and deployment query limits Narrow the time range, add selective label or line filters, lower the maximum lines, and review configured limits.
“Maximum of series reached” Metric query cardinality and high-cardinality labels Add label matchers and aggregate to fewer series; avoid high-cardinality labels in aggregations.
Connection refused, unauthorized, or TLS error Endpoint reachability, port, tenant header, credentials, and certificate configuration Use the data-source connection checks above and read the actual response status.
Storage-related query failure Loki’s own logs and metrics and the exact error response Investigate the storage path and deployment health; there is no single screenshot setting that fixes storage access.

Grafana’s data-source guide suggests narrowing the time range and reducing the queried data volume for slow queries, and reviewing query and rate limits. Loki’s query troubleshooting guide lists metrics such as loki_request_duration_seconds and loki_frontend_query_range_duration_seconds_bucket for operators investigating query errors and latency.

5. If the live panel works but the screenshot file is blank

This is a separate browser or capture failure unless evidence points elsewhere. The cited Grafana and Loki documentation covers alert-image support, data-source problems, and query troubleshooting; it does not establish a reproducible defect specifically called “blank screenshots in Loki.” Avoid applying Loki configuration changes before isolating the capture path.

  1. Compare the source and artifact. Open the same panel or URL in the same environment and confirm it visibly has content at capture time.
  2. Check timing. If the page loads asynchronously, verify the capture waits for the panel or a known selector to appear. A screenshot taken before rendering completes can be empty even when the page eventually works.
  3. Check the capture context. Record the browser, renderer or capture tool, URL, viewport, authentication state, and whether the capture runs inside a container or remote service.
  4. Inspect the response and logs. Save the capture tool’s status, error text, response headers, and any browser console or renderer errors. Distinguish an empty image from a failed request or a page that returned an error.
  5. Reproduce minimally. Capture a simple page and then the Grafana view. If only the Grafana view fails, check its login, permissions, redirects, and asynchronous rendering in that capture environment.
  6. Share a redacted reproduction. Include Grafana and Loki versions, alerting versus manual capture path, capture tool and browser, panel or URL, exact error, and relevant redacted configuration. Do not include credentials or sensitive log contents.

Or skip the browser setup

If your goal is to capture a page or Grafana view as an image or PDF, ScreenshotNeo provides a screenshot API and MCP server. One GET request returns an image or PDF. See the ScreenshotNeo API documentation for parameters and options.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
import requests

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`Screenshot request failed: ${res.status}`);
await Bun.write('shot.webp', res);

Replace the example URL with a page your capture environment can access. For authenticated Grafana pages, configure the access and capture options described in the docs. ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers say the page verdict and whether it was billed. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.

The free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 screenshots; every feature is available on every plan. Sign up for ScreenshotNeo and get 1,000 free screenshots a month with no card.

Performance, reliability, and cost notes

  • Keep Loki queries selective. Narrow time windows and match labels early to reduce scanned data and avoid unnecessary timeouts or limits. Review deployment limits before increasing them.
  • Do not treat retries as a universal fix. A parse error needs a query correction; an unsupported alert image needs a different reporting path; connection and storage failures need their own diagnosis.
  • Keep evidence redacted. Debug logs and request details can contain sensitive URLs, headers, or log data. Share only the fields needed to reproduce the issue.
  • Account for capture costs. Browser rendering and external screenshot APIs have different operational and billing models. ScreenshotNeo’s stated plans range from 1,000 free monthly shots to paid tiers starting at $5 for 3,000; its billing rules exclude bot checks, blank pages, failed loads, timeouts, and cache hits.

Troubleshooting checklist

  • Is the missing item an alert attachment, an empty live Grafana view, or a separately generated image file?
  • If it is an alert image for Loki, have you accounted for Grafana’s documented unsupported status?
  • Does a simple selector return logs over a known-good time range?
  • Do the selector labels and values exist, and are the logs within retention?
  • Can Grafana reach the correct Loki base URL with the right network route, tenant header, credentials, and TLS configuration?
  • For query failures, did you capture the exact error and inspect syntax, limits, timeout, and storage evidence?
  • If only the image is blank, did you confirm the live page is populated and record the capture tool, timing, browser, and response?

FAQ

Can I enable Grafana alert screenshots for a Loki alert with a setting?

Grafana documents notification images as unsupported for Loki. The cited documentation does not provide a setting that enables them.

Does an empty Loki panel mean my screenshot tool failed?

No. First determine whether the live query has results. An empty panel and an empty image are different symptoms and can have different causes.

What information should I include in a bug report?

Include Grafana and Loki versions, the exact workflow, a redacted error, steps to reproduce, and relevant redacted configuration. For a blank file, also include the browser or capture tool and whether the live page displayed data.

Can ScreenshotNeo make an unsupported Grafana alert image supported?

No such integration or behavior is established here. ScreenshotNeo captures accessible pages through its API or MCP tools; it does not change Grafana’s documented alert-image support.