SolarWinds annotations
Annotations let you overlay event markers on your graphs. The SolarWinds data source supports annotations, so you can display SolarWinds events, such as triggered alerts or status changes, alongside your time series panels.
Before you begin
Ensure you have configured the SolarWinds data source.
Write SWQL queries for annotations
The SolarWinds data source drives annotations from a SWQL query rather than a dedicated annotation query type. To use a query for annotations, return a column that Grafana can map to the annotation time and a column it can map to the annotation text.
Follow these guidelines when you write a SWQL query for annotations:
- Return a timestamp column for the annotation time, for example
EventTimeorTriggeredDateTime. - Return a text column for the annotation description, for example
Messageor an alert name. - Filter the query so it returns only the events you want to display.
Add an annotation query
To add a SolarWinds annotation query to your dashboard:
- Click the dashboard settings icon (gear) in the top navigation.
- Select Annotations from the left-side menu.
- Click Add annotation query.
- In the Data source field, select your SolarWinds data source.
- Enter a SWQL query that returns a timestamp column and a text column.
- Map the returned columns to the annotation time and text fields.
- Click Save dashboard.
Map query results to annotation fields
Grafana maps the columns returned by your SWQL query to annotation fields:
Examples
The following examples show SWQL queries you can use for annotations. Adjust the entity and column names to match your SolarWinds environment.
Annotate with active alerts
To mark when alerts triggered, join the active alerts to their configuration and return the trigger time and alert name:
SELECT ac.Name, aa.TriggeredDateTime
FROM Orion.AlertActive aa
JOIN Orion.AlertObjects o ON aa.AlertObjectID = o.AlertObjectID
JOIN Orion.AlertConfigurations ac ON ac.AlertID = o.AlertID
ORDER BY aa.TriggeredDateTime DESCMap TriggeredDateTime to the annotation time and Name to the annotation text.
Annotate with SolarWinds events
To display recent SolarWinds events, query Orion.Events for the event time and message:
SELECT EventTime, Message FROM Orion.EventsMap EventTime to the annotation time and Message to the annotation text. The dashboard displays a marker for each event, with the event message shown when you hover over the marker.


