Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/testdata/annotations.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana-cloud/observe-and-act/connect-externally-hosted/data-sources/testdata/annotations/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
TestData annotations
The TestData data source can generate simulated annotation events. Use it to test how dashboards and panels render annotation markers and overlays without connecting to an external source. The generated events are created in the browser and aren’t persisted.
Before you begin
- Configure the TestData data source.
- Familiarize yourself with annotations in Grafana.
Add an annotation query
To add a dashboard annotation query that uses TestData:
- Navigate to the dashboard you want to update and click Edit.
- Click Settings.
- Select the Annotations tab.
- Click Add annotation query.
- Enter a name for the annotation.
- From the Data source drop-down, select TestData. The drop-down only lists data sources that support annotations.
- Set the Count field to the number of events you want to generate. Default:
10. - Click Save dashboard.
TestData distributes the generated events evenly across the current dashboard time range. Each event includes sample text with a link and the tags text and server.
Use the Annotations scenario in a panel
You can also generate annotation data as a panel query using the Annotations scenario. This scenario returns data on the annotations data topic, so Grafana renders the events as markers overlaid on the panel rather than plotting them as a series.
Because the Annotations scenario doesn’t return a visible series on its own, add a second query that returns data to give the markers something to overlay:
- Add or edit a panel and select the TestData data source.
- On the first query, choose a scenario that returns a series, such as Random Walk, from the Scenario drop-down.
- Add a second query, then choose the Annotations scenario from its Scenario drop-down.
- Set the Count field on the Annotations query to the number of events you want to generate. Default:
10. - Click Run queries.
Grafana plots the series from the first query and overlays the annotation markers on top. If you run the Annotations scenario by itself, the query returns annotation events but the panel doesn’t display a visible series.
For a reference of all TestData scenarios, refer to the TestData query editor.
Example: Overlay annotations on a time series panel
This example creates a time series panel with simulated data, then adds a TestData annotation query so you can verify how the panel renders annotation markers.
- Navigate to the dashboard you want to update and click Edit.
- Click the Add icon and select Visualization.
- Select the TestData data source.
- Choose the Random Walk scenario from the Scenario drop-down.
- Click Run queries to render the time series.
- Click Back to dashboard, then click Settings.
- Select the Annotations tab.
- Click Add annotation query.
- Enter a name for the annotation, for example
Test events. - From the Data source drop-down, select TestData.
- Set the Count field to
5. - Click Save dashboard.
Grafana draws five vertical annotation markers evenly across the time range on the time series panel. Hover over a marker to see the sample text and tags. Adjust the Count field to change how many markers appear.
Tip
To test how a panel handles crowded overlays, increase the Count field to a high value, such as
100. This produces many closely spaced markers, which is useful for checking marker rendering and tooltip behavior at high density.
Limitations
- Events are synthetic. TestData generates fixed sample text and tags. You can’t customize the event content.
- Events aren’t persisted. The data source builds events in the browser each time the query runs. TestData doesn’t store annotations or query an external source.
- Not evaluated by the alerting engine. The Annotations scenario runs in the browser, so it can’t be used with Grafana Alerting or in any context that requires server-side evaluation.
Was this page helpful?
Related resources from Grafana Labs


