Grafana Cloud Enterprise Open source

Amazon Athena annotations

Annotations let you overlay rich event information on top of graphs. You can add annotations by clicking on panels or by adding annotation queries through Dashboard settings > Annotations.

Create an annotation query

To create an annotation query:

  1. Open the dashboard where you want to add annotations.
  2. Click the dashboard settings gear icon.
  3. Select Annotations from the left-side menu.
  4. Click Add annotation query.
  5. Select the Amazon Athena data source.
  6. Enter a SQL query that returns the required annotation columns.

Annotation columns

The following table describes the columns that Amazon Athena annotation queries use to render annotations.

ColumnRequiredDescription
timeYesThe date/time field. Can be a column with a native SQL date/time data type or an epoch value.
timeendNoThe end date/time field for region annotations. Can be a column with a native SQL date/time data type or an epoch value.
textNoThe event description field displayed in the annotation tooltip.
tagsNoA comma-separated string used as event tags for filtering annotations.

Example annotation query

The following query creates annotations for humidity readings that exceed 95, tagged by environment.

SQL
SELECT
  time as time,
  environment as tags,
  humidity as text
FROM
  tableName
WHERE
  $__dateFilter(time) and humidity > 95

Next steps