Skip to main content
Version: NG-2.16

Azure SQL Database

Introduction

Azure SQL Database O11ySource provides visibility into the health, performance, and usage of your SQL databases hosted on Microsoft Azure. It enables proactive detection of performance bottlenecks, resource contention, and anomalies by tracking critical metrics such as CPU usage, DTU consumption, deadlocks, lock waits, query performance, active sessions, and storage utilization.

Getting Started

Compatibility

This AzureSQL O11ySource is compatible with AzureSQL Version 2012 and above.

Data Collection Method

AzureSQL Performance metrics are collected using an internal data collector. It uses a JDBC connection to fetch all the required metrics periodically.

Prerequisites

Dependent Configuration

To configure this O11ySource, create a 'credential' of type 'user' under the 'Definition' tab.

Inputs for Configuring Data Source

  • Instance Name: Please enter the name of the AzureSQL instance. This should be a unique identifier for the specific AzureSQL deployment you want to monitor.
  • DB Details: Please provide the details of DB
  • Hostname: Host name needs to be a valid FQDN
  • Port: Enter a valid port
  • Database: Enter the Database Name
  • Credential: This field is required
  • Metrics Collection Queries: These queries are utilized for AzureSQL server's metrics.
  • Query: Choose the Queries
  • Polling Interval [seconds]: How frequently data is gathered. interval should be between 180 -.86400 seconds

Firewall Requirement

To collect data from this O11ySource, ensure the following ports are opened:

Source IPDestination IPDestination PortProtocolDirection
vuSmartMaps IPAzure SQL Server FQDN1443*TCPOutbound

*Before providing the firewall requirements, please update the port based on the customer environment.

Configuring the Target

  • Create a login on every SQL Server instance you want to monitor and create a read-only vunet user with proper access to your AzureSQL server.
  • Start AzureSQL, login to AzureSQL database and run:
USE master;
GO
CREATE LOGIN vunet WITH PASSWORD = '[password]';
GO
CREATE USER vunet FOR LOGIN vunet;
GO
GRANT SELECT on sys.master_files to vunet;
GO
GRANT SELECT on sys.dm_os_performance_counters to vunet;
GO
GRANT VIEW SERVER STATE to vunet;
GO
GRANT VIEW ANY DEFINITION to vunet;
GO
GRANT CONNECT ANY DATABASE to vunet;
GO
USE msdb;
GO
CREATE USER vunet FOR LOGIN vunet;
GO
GRANT SELECT on msdb.dbo.sysjobhistory to vunet;
GO
GRANT SELECT on msdb.dbo.sysjobschedules to vunet;
GO
GRANT SELECT on msdb.dbo.sysjobs to vunet;
GO

Configuration Steps

  • Enable the AzureSQL O11ySource.
  • Select the Sources tab and press the + button to add AzureSQL instance that has to be monitored.
  • Set up metrics collection configurations. The O11ySource already provides predefined metric collection queries. Users have the flexibility to adjust query intervals, modify existing queries, and introduce new queries as needed.
  • Once all the required details are filled, click on Save and Continue

Metrics Collected

NameDescriptionData Type
average_cpu_utilization_in_percentAverage CPU utilization percentage.Float32
average_data_io_utilization_in_percentAverage Data IO utilization percentage.Float32
average_log_write_io_utilization_in_percentAverage Log Write IO utilization percentage.Float32
average_memory_usage_utilization_in_percentAverage memory usage utilization percentage.Float32
avg_cpu_time_msecAverage CPU time in milliseconds for a query.Float64
avg_dtu_percentAverage DTU usage percentage.Float32
avg_elapsed_time_msecAverage elapsed time for a query in milliseconds.Float64
blocking_session_idSession ID of the blocker in blocking scenario.Nullable(UInt32)
bs_statement_textStatement text of the blocking session.String
clerk_typeType of memory clerk.String
client_host_nameName of the client host initiating the session.String
commandCommand being executed (e.g., SELECT, INSERT).String
connection_start_timeStart time of the database connection.String
counterMetric or performance counter name.String
counter_typeType of the counter.String
cpu_time_msCPU time consumed in milliseconds.UInt64
cpu_time_pctCPU time as a percentage.Float32
database_nameName of the Azure SQL database.String
db_buffer_bytesBuffer cache usage in bytes.Float64
db_buffer_MBBuffer cache usage in megabytes.Float64
db_buffer_pagesNumber of database pages in the buffer.UInt64
db_buffer_percentPercentage of buffer usage.Float32
dbnameName of the database context.String
equality_columnsColumns used in equality conditions.String
exectimeExecution time of the statement.String
execution_countNumber of times the query was executed.UInt64
execution_timeTotal query execution duration.String
file_idID of the file.String
file_nameLogical file name.String
file_physical_namePhysical path of the file on disk.String
file_stateState of the file (e.g., online, offline).String
file_typeType of file (e.g., data, log).String
granted_query_memory_pagesMemory pages granted to the query.UInt32
host_nameName of the host machine.String
included_columnsNon-key columns included in an index.String
inequality_columnsColumns used in inequality predicates.String
instanceSQL Server instance name.String
instance_typeType of SQL instance (e.g., primary, replica).String
io_stallTotal I/O stall in milliseconds.UInt64
io_stall_queued_read_msTime read I/O spent waiting in queue.UInt64
io_stall_queued_write_msTime write I/O spent waiting in queue.UInt64
io_stall_read_msTotal stall time on read operations.UInt64
io_stall_write_msTotal stall time on write operations.UInt64
is_hadr_enabledIndicates if HADR is enabled.String
is_read_onlyIndicates if the DB is read-only (1 = Yes).Int8
last_elapsed_time_msecLast execution elapsed time in ms.Float64
last_request_end_timeTime when the last request ended.String
last_request_start_timeTime when the last request started.String
last_worker_time_msecLast worker thread time in milliseconds.Float64
logical_filenameLogical name of the file in SQL Server.String
logical_readsNumber of logical reads.UInt64
login_nameLogin name used for the session.String
login_timeTime when the user logged in.String
maximum_cpu_utilization_in_percentMaximum CPU usage.Float32
maximum_data_io_utilization_in_percentMaximum Data IO usage.Float32
maximum_log_write_io_utilization_in_percentMaximum Log Write IO usage.Float32
maximum_memory_usage_utilization_in_percentMaximum memory usage percentage.Float32
max_size_mbMaximum allowed size of the database in MB.Nullable(Float64)
max_wait_time_msMaximum wait time in milliseconds.UInt64
measurementMetric name or measurement type.String
memory_usage_kbMemory usage in KB.UInt64
metrics_groupGrouping or categorization of metrics.String
nameGeneric name or identifier.String
nt_user_nameWindows NT user name.String
num_of_bytes_readNumber of bytes read.Float64
num_of_bytes_writtenNumber of bytes written.Float64
num_of_readsTotal number of read operations.UInt64
num_of_writesTotal number of write operations.UInt64
objectidID of the object referenced.UInt64
open_transactionNumber of open transactions.UInt32
other_process_cpuCPU used by other processes.Float64
percent_completeCompletion percentage of a task.Float32
physical_filenamePhysical file name.String
program_nameApplication name that initiated the request.String
query_hashHash of the query text.UInt64
query_plan_hashHash of the query execution plan.UInt64
query_typeType of query (e.g., adhoc, proc).String
readsTotal number of reads.UInt64
read_bytesBytes read from disk.Float64
read_latency_msLatency of read operations in ms.Float64
recovery_model_descRecovery model (e.g., FULL, SIMPLE).String
request_idRequest ID within the session.UInt32
resource_wait_msTime spent waiting for a resource.UInt64
sample_msDuration of the sample in milliseconds.Float64
server_nameSQL Server name.String
session_db_nameName of the database for the session.String
session_idSession identifier.UInt32
session_statusStatus of the session (e.g., running).String
signal_wait_time_msTime waiting for a signal (thread to run).UInt64
size_kbFile or object size in KB.Float64
size_on_disk_bytesActual size on disk in bytes.Float64
source_idID for the source of the metric.String
sqlserver_process_cpuCPU consumed by SQL Server process.Float64
sqlserver_start_timeTime when SQL Server started.String
sql_instanceSQL instance name.String
statement_textQuery or statement being executed.String
state_descDescription of the object state.String
statusStatus of the object/session.String
stmt_object_nameName of the object referenced by statement.String
system_idle_cpuCPU percentage in idle state.Float64
table_nameName of the table involved.String
targetTarget of the performance counter.String
task_stateState of the task.String
timestampTimestamp of the metric record.DateTime
total_bufferTotal memory buffer in use.UInt32
total_costEstimated cost of query execution.UInt64
total_elapsed_time_msTotal elapsed time of the query.Float64
total_elapsed_time_msecSame as above (duplicate representation).Float64
total_logical_readsTotal number of logical reads.UInt64
total_logical_writesTotal number of logical writes.UInt64
total_physical_readsTotal number of physical reads.UInt64
total_space_mbTotal space used in MB.Float64
total_worker_time_msecTotal worker time for execution.Float64
transaction_isolation_levelIsolation level of the transaction.String
uptime_secSQL Server uptime in seconds.UInt64
user_access_descAccess level of the user.String
valueValue of the performance counter.Float64
waiting_tasks_countNumber of tasks waiting on this wait type.UInt64
wait_categoryCategory of the wait (e.g., CPU, IO).String
wait_resourceResource on which the session is waiting.String
wait_time_msTime spent waiting in milliseconds.UInt64
wait_typeType of wait (e.g., LCK_M_SCH_M).String
writesNumber of write operations.UInt64
write_bytesBytes written to disk.Float64
write_latency_msWrite latency in milliseconds.Float64
sql_versionSQL Server version.String
last_execution_timeTimestamp of last execution.String
last_elapsed_timeElapsed time of the last execution.String
last_worker_timeWorker thread time of last execution.String