# Monitoring

The Monitoring tab offers a filter to view performance insights, OS metrics, DB metrics, or a combination of all. It also includes a search bar to locate specific monitoring metrics charts. You can manually refresh metrics using the refresh button on the right.

**Granularity**\
The Granularity dropdown at the top right of the Monitoring tab allows you to control the time interval at which the metrics are displayed. You can select from the following options:

* **1 Min** - Displays metrics at 1-minute intervals.
* **5 Mins** - Displays metrics at 5-minute intervals.
* **15 Mins** - Displays metrics at 15-minute intervals.
* **30 Mins** - Displays metrics at 30-minute intervals.
* **1 Hour** - Displays metrics aggregated over 1-hour intervals.

Select time intervals of 1h, 3h, 6h, 12h, or 24h to display the data for that duration on each graph. The default time interval is 1h. Graphs display the averaged values over the selected period.

For custom time duration:

* Select the **Custom** option, choose your desired date and time, and click **Apply**.

The Service Availability graph displays database service uptime, with green indicating availability and gray representing unavailability. Data is updated every five minutes.

> Note: This graph represents the availability of the current primary node. For HA services, users can choose the specific node for which they wish to view metrics.

## Graphical Metrics

These graphs display the most recent metrics for your database services, logically grouped into OS Metrics, DB Metrics, and performance insights.. Each graph has the following capabilities:

* To view the entire graph in an expanded, full-screen mode, click the full-screen button located in the top right corner. A new window will appear, presenting the graph with metrics displayed at 5-minute intervals.
* To examine a specific section of the graph in detail, use the selection zoom button located in the top right corner and drag on an area in the graph. This feature expands the chosen area, providing a more detailed view of the metrics.
* To select and drag a specific section of the graph, use the cross-hair cursor.
* To download the graph in three different formats, use the top right corner menu button. It supports svg, png, and csv formats. The svg and png format captures the graph and saves as it is, while in the csv format it creates an excel file with the captured data values of the metrics in the fields.

#### **OS Metrics**

The OS Metrics offers the graphical representation of the most recent collected operating system metrics:

* **CPU Usage** - This graph displays CPU resource usage for the database service in percentages at 10-minute intervals by default. For a 5-minute interval view, zoom in using the full-screen button located at the top right corner. It also provides ‘Used (latest) N’ where N is the latest CPU percentage used in a numeric value at the top left-side of the graph.
* **Memory Usage** - This graph displays the details of used and available memory in GiB for your database service at a 10-minutes interval by default. Displays the used and available memory charts using two different colors in the same graph. For a 5-minute interval view, zoom in using the full-screen button located at the top right corner. It also provides ‘Used (latest) N’ and ‘Available (latest) N1’ where N and N1 are the amount of used and available memory in GiB at the top of the graph.
* **Disk IO** - This graph displays the amount of read operations and write operations per second for your database service at 10-minutes of interval by default. Displays the read and write operations per second using two different colors on the same graph. It also provides the latest count of read operations and write operations per second at the top of the graph.
* **Filesystem: Data** - This graph displays the used and available disk space on the volume where your database service files are stored, measured in GiB, at 10-minute intervals by default. Used and available disk space are represented using two different colors on the same graph. It also provides the latest used and available disk space values in GiB at the top of the graph.
* **Filesystem: TempDB -** This graph displays the used and available disk space on the volume where TempDB files are stored, measured in GiB, at 10-minute intervals by default. Used and available disk space are represented using two different colors on the same graph. It also provides the latest used and available disk space values in GiB at the top of the graph.
* **Network Usage** - This graph displays the details of sent and received data across the network in MiB/s for your database service at a 10-minutes interval by default. Displays the sent and received data charts using two different colors in the same graph. For a 5-minute interval view, zoom in the graph using the full-screen button located at the top right corner. It also provides ‘Sent (latest) N’ and ‘Received (latest) N1’ where N and N1 are the amount of sent and received data in MiB/s at the top of the graph.
* **Top Processes by CPU** - This table displays the processes that are using the most CPU time. Displays three columns, Process ID (PID), Processes, and the average value in percentage of the CPU used. These process details are independent of the time range. This graph displays only the current data and not the older data.
* **Top Processes by Memory** - This table displays the processes that are using the most amount of the memory. Displays three columns, Process ID (PID), Processes, and the average value in percentage of the memory used. These process details are independent of the time range. This graph displays only the current data and not the older data.

#### **DB Metrics**

The graphs under DB Metrics are:

* **Connections** - This graph displays the count of user connections for your database service at 10-minute intervals by default. It also provides the latest count, maximum, and minimum values of user connections at the top of the graph.
* **Batch Requests** - This graph displays the number of batch requests per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of batch requests at the top of the graph.
* **Stored Procedure Compilations** - This graph displays the count of compilations and recompilations per second for your database service at 10-minute intervals by default. Displays compilations and recompilations using two different colors on the same graph. It also provides the latest count of compilations and recompilations at the top of the graph.
* **Active Transactions** - This graph displays the total count of active transactions for your database service at 10-minute intervals by default. It also provides the latest count, maximum, and minimum values of active transactions at the top of the graph.
* **Processes Blocked** - This graph displays the count of blocked processes for your database service at 10-minute intervals by default. It also provides the latest count, maximum, and minimum values of blocked processes at the top of the graph.
* **Deadlocks** - This graph displays the number of deadlocks per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of deadlocks at the top of the graph.
* **Page File** - This graph displays the total and available page file size in GiB for your database service at 10-minute intervals by default. Displays total and available page file sizes using two different colors on the same graph. It also provides the latest total and available page file values at the top of the graph.
* **Buffer Pool** - This graph displays the committed target and committed buffer pool memory in GiB for your database service at 10-minute intervals by default. Displays committed target and committed values using two different colors on the same graph. It also provides the latest values of committed target and committed buffer pool memory at the top of the graph.
* **Buffer Database Pages** - This graph displays the target and current page count of buffer database pages for your database service at 10-minute intervals by default. Displays target and current page counts using two different colors on the same graph. It also provides the latest count, maximum, and average values of buffer database pages at the top of the graph.
* **Buffer Cache Hit Ratio** - This graph displays the buffer cache hit ratio as a count for your database service at 10-minute intervals by default. It also provides the latest count, maximum, and minimum values of the buffer cache hit ratio at the top of the graph.
* **Locked Page Allocation** - This graph displays the count of locked page allocations for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of locked page allocations at the top of the graph.
* **Transaction Delay** - This graph displays the count of transaction delays for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of transaction delays at the top of the graph.
* **Page Stats** - This graph displays the number of reads, lookups, and writes per second for your database service at 10-minute intervals by default. Displays reads, lookups, and writes using three different colors on the same graph. It also provides the latest count, maximum, and average values of reads, lookups, and writes at the top of the graph.
* **Write Transactions** - This graph displays the number of write transactions per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of write transactions at the top of the graph.
* **TempDB Log/Data File Size** - This graph displays the size of log files used, log files, and data files in MiB for your database service at 10-minute intervals by default. Displays log files used, log files, and data files using three different colors on the same graph. It also provides the latest size values for each category at the top of the graph.
* **Wait Times** - This graph displays the Page IO latch waits and Network IO waits in milliseconds for your database service at 10-minute intervals by default. Displays Page IO latch waits and Network IO waits using two different colors on the same graph. It also provides the latest values for each wait category at the top of the graph.
* **Log Flushes** - This graph displays the number of log flushes per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of log flushes at the top of the graph\*\*.\*\*
* **Log Flush Waits** - This graph displays the number of log flush waits per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of log flush waits at the top of the graph.
* **Average Latch Wait Time** - This graph displays the average latch wait time in milliseconds for your database service at 10-minute intervals by default. It also provides the latest count, maximum, and average values of latch wait time at the top of the graph.
* **Memory Grants Pending** - This graph displays the count of memory grants pending for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of memory grants pending at the top of the graph.
* **Page Life Expectancy** - This graph displays the page life expectancy count for your database service at 10-minute intervals by default. It also provides the latest count, maximum, and average values of page life expectancy at the top of the graph.
* **Connection Resets** - This graph displays the number of connection resets per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of connection resets at the top of the graph.
* **Logins/Logouts** - This graph displays the number of logins and logouts per second for your database service at 10-minute intervals by default. Displays logins and logouts using two different colors on the same graph. It also provides the latest count, maximum, average, and minimum values of logins and logouts at the top of the graph.
* **Active Temp Tables** - This graph displays the count of active temporary tables for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of active temporary tables at the top of the graph.
* **Checkpoint Pages** - This graph displays the number of checkpoint pages per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of checkpoint pages at the top of the graph.
* **Log Send Queue** - This graph displays the count of the log send queue for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of the log send queue at the top of the graph.
* **TempDB Version Store** - This graph displays the size of the TempDB version store in MB for your database service at 10-minute intervals by default. It also provides the latest size, maximum, average, and minimum values of the TempDB version stored at the top of the graph.
* **Mirrored Write Transactions** - This graph displays the number of mirrored write transactions per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of mirrored write transactions at the top of the graph.
* **Bytes Sent to Replica** - This graph displays the number of bytes sent to the replica per second for your database service at 10-minute intervals by default. It also provides the latest count, maximum, average, and minimum values of bytes sent to replica at the top of the graph.

#### **Performance Insights**

Tessell Performance Insights is a database performance monitoring tool that allows to assess and analyze the load on the database within a specified timeframe. This tool enables users to identify bottlenecks and pinpoint areas where performance improvements are needed.

To enable performance insights, ensure that you create a Monitoring Infra in the **Monitoring Performance Insights Infrastructure** application under the **DB Services** app family.

After the monitoring infrastructure is deployed, this feature can be enabled optionally on each database service either during provisioning or using settings tab post provisioning.

1. Select **View Detailed Insights** to view the graph in a 5-minute interval.
2. Select time intervals of 1h, 3h, 6h, 12h, or 24h to display the data for that duration on the graph. The default time interval is 1h.
3. For custom time duration, select the **Custom** option and then choose your desired date and time, and click **Apply**.

**Features**

**Database Load**: Database load measures the level of session activity in the database. The key metric in Performance Insights is DBLoad, which is collected every second. The unit for database load is the AAS (Average Active Sessions) which is the measure of the average active connections in a specific timeframe.

**Active Sessions**

* An active session is a connection that has submitted work to the DB engine and is waiting for a response.
* A session is active when it is either running on CPU or waiting for a resource to become available so that it can proceed. For example, an active session might wait for a page (or block) to be read into memory, and then consume CPU while it reads data from the page.

**Average Active Sessions**

* It measures how many sessions are concurrently active on the database on an average within a given timeframe.
* Every second, Performance Insights samples the number of sessions concurrently running a query. For each active session, Performance Insights collects the following data:
  * Wait - Session state (running on CPU or waiting)
  * SQL statement
  * Host
  * User running the SQL
  * Database on which the SQL is running
* Performance Insights calculates the AAS by dividing the total number of sessions by the number of samples for a specific time period.

**Top Dimensions**

Top dimensions are the dimensions of the data corresponding to the DB Load within a given timeframe. These include:

* Top Waits: These are the top waits by db load on which database was waiting in a given timeframe.
* Top SQLs: These are the top sql queries by db load running on the database in a given timeframe masked and grouped by their type.
* Top Hosts: These are the top hosts that were contributing to most of the db load on the database in a given timeframe.
* Top Users: These are the top users that were contributing to most of the db load on the database in a given timeframe.
* Top Databases: These are the top databases that were contributing to most of the db load on the multi-database service in a given timeframe.
