SQL Monitor 13

Annotations

The annotations API can be used to add annotations to the top graph (timeline) for SQL Server instances, for example to record the time of a deployment.

Add-Annotation

You can add an annotation with a command similar to this:

Add-SqlMonitorAnnotation -Target $instance -Description "Deployment" -UtcDate Get-Date

Parameters:

NameTypeMandatoryDescription
TargetMonitoredObjectYesThe SQL Server instance to target the annotation at.
Since SQL Monitor ver. 12.1.20 cloud servers are also supported.
DescriptionstringNoA textual description; will form the title of the annotation unless Source is specified, where it will form an additional line of information
UtcDateDateTimeYesThe time in UTC to attach the annotation
UrlstringNoA URL to navigate the user to if the annotation is clicked
SourcestringNoThe source of the annotation, such as Error or SQL Update
DatabaseNamestringNoUnused for now
SpecificInfostringNoCustomises different types of annotations

Valid Sources:

NameDescription

Deployment

For annotating deployments to the SQL Server. Use SpecificInfo to specify what was deployed. 

ErrorFor annotating errors. Use SpecificInfo to specify error.

Permissions ChangeFor annotating permissions changing on a SQL Server.

Configuration ChangeFor annotating configuration changes. Use SpecificInfo to indicate what configuration was configured.

SQL UpdateFor annotating SQL Updates. Use SpecificInfo to provide the version number updated.

Get-Annotation

Get details about an annotation on a SQL Server instance at a given time.

$annotation = Get-SqlMonitorAnnotation -Target $instance -UtcDate $date

Remove-Annotation

Removes an annotation from a SQL Server instance at a given time.

Remove-SqlMonitorAnnotation -Target $instance -UtcDate $date

Update-Annotation

Updates an annotation on a SQL Server instance at a given time by overwriting the annotation with the newly provided details.

Takes the same arguments as Add-Annotation.


Do you have any feedback on this documentation?

Let us know at sqlmonitorfeedback@red-gate.com


Didn't find what you were looking for?