
# database transaction log utilization

 template: mssql_database_log_percent_used
       on: mssql.database_log_percent_used
    class: Utilization
     type: Database
component: Microsoft SQL Server
   lookup: min -15m unaligned of used
    units: %
    every: 1m
     warn: $this > 90
    delay: down 5m multiplier 1.5 max 1h
  summary: SQL Server database ${label:database} transaction log utilization
     info: SQL Server transaction log percent used has been above 90% for the last 15 minutes
       to: dba

# SQL Server Agent job execution status

 template: mssql_sql_agent_job_last_execution_warning
       on: mssql.job_last_execution_status
    class: Errors
     type: Database
component: Microsoft SQL Server
   lookup: average -1m unaligned of warning
    units: status
    every: 1m
     warn: $this > 0
    delay: down 5m multiplier 1.5 max 1h
  summary: SQL Server Agent job ${label:job_name} completed with failed steps
     info: SQL Server Agent job succeeded, but at least one step failed in the last completed execution
       to: dba

 template: mssql_sql_agent_job_last_execution_failed
       on: mssql.job_last_execution_status
    class: Errors
     type: Database
component: Microsoft SQL Server
   lookup: average -1m unaligned of error
    units: status
    every: 1m
     crit: $this > 0
    delay: down 5m multiplier 1.5 max 1h
  summary: SQL Server Agent job ${label:job_name} failed
     info: SQL Server Agent job failed in the last completed execution
       to: dba
