Sumo Logic annotations
Annotations overlay event markers on time-series panels, helping you correlate changes or incidents with metric behavior. You can use any Sumo Logic query as an annotation source – each result becomes a marker on the panel at its corresponding timestamp.
For general information about annotations in Grafana, refer to Annotate visualizations.
Before you begin
- Configure the Sumo Logic data source.
- Have a dashboard with at least one time-series panel.
Create an annotation query
The annotation query editor is the same as the standard Sumo Logic query editor, so you can use either Metrics or Logs queries. Logs queries are the most common choice for annotations because log events naturally represent discrete points in time.
To add a Sumo Logic annotation query to a dashboard:
- Open a dashboard and click Dashboard settings (gear icon).
- Select Annotations in the left-side menu.
- Click Add annotation query.
- Enter a name for the annotation.
- Select the Sumo Logic data source.
- Choose the query type (Metrics or Logs) and enter a query that returns the events you want to annotate.
- Configure the field mappings to control which fields are used for the annotation text, tags, and time.
- Set the annotation color and other display options as needed.
- Click Save dashboard.
Annotation queries run against the dashboard time range and display matching results as vertical lines on time-series panels.
Annotation query examples
The following examples use logs queries, which are the most common annotation use case.
Mark deployment events:
_sourceCategory=prod/deploymentsAnnotate error spikes from a specific service:
_sourceCategory=prod/app "ERROR" | count by _messageTimeMark configuration changes from audit logs:
_sourceCategory=audit/config action=updateAnnotate scaling events:
_sourceCategory=infrastructure "autoscaling" ("ScaleUp" OR "ScaleDown")Mark alert state changes from Sumo Logic monitors:
_sourceCategory=alerts eventName="AlertSystemInfo" | parse "currentState\":\"*\"" as state | where state != "Normal"Annotate user login failures for security monitoring:
_sourceCategory=auth action=login status=failure | count by _sourceHost


