# 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 metric charts. You can manually refresh metrics using the refresh button on the right.

**Granularity**

The **Granularity** dropdown in the top-right corner of the Monitoring tab allows you to control the time interval at which 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 data for that duration on each graph. The default time interval is 1h. Each data point on the graph represents the average of all collected values within the selected granularity interval. The latest, maximum, and minimum values are displayed at the top of each graph for quick reference.

For a 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, you can choose the specific node for which you want to view metrics.

### Graphical Metrics

These graphs display the most recent metrics for your database service, logically grouped into OS Metrics, DB Metrics, and Performance Insights. Each graph supports the following capabilities:

* To view the graph in expanded full-screen mode, click the full-screen button in the top-right corner. A new window appears with metrics displayed at 5-minute intervals.
* To examine a specific section of the graph in detail, use the selection zoom button in the top-right corner and drag over an area in the graph.
* To select and drag a specific section of the graph, use the cross-hair cursor.
* To download the graph, use the top-right corner menu button. Supported formats are SVG, PNG, and CSV. SVG and PNG capture the graph as displayed, while CSV creates a file with the captured data values.

> **Note**: OS and DB metrics are retained for a period of 20 days.

#### OS Metrics

The OS Metrics section provides graphical representations of the most recently collected operating system metrics:

* **CPU Usage (%)** — Displays CPU utilization for the database service in percentages. Also provides the latest, maximum, and average values at the top of the graph.
* **System Load Average (Count)** — Displays the Linux system load average across three fixed OS-level rolling windows: 1-minute, 5-minute, and 15-minute. Each window is shown in a different color on the same graph. These windows are computed by the Linux kernel and are independent of the granularity setting.
* **Memory Usage (GiB)** — Displays used and available memory in GiB. Used and available memory are shown in two different colors on the same graph. Also provides the latest used and available values at the top of the graph.
* **Swap Usage (GiB)** — Displays used and free swap space in GiB. Used and free values are shown in two different colors on the same graph. Also provides the latest used and free values at the top of the graph.
* **Network Usage (KiB/s)** — Displays sent and received data across the network in KiB/s. Sent and received data are shown in two different colors on the same graph. Also provides the latest sent and received values at the top of the graph.
* **Filesystem: Root (GiB)** — Displays used and free disk space on the root filesystem in GiB. Used and free values are shown in two different colors on the same graph. Also provides the latest used and free values at the top of the graph.
* **Filesystem: Data (GiB)** — Displays used and free disk space on the volume where your database data files are stored, in GiB. Also provides the latest used and free values at the top of the graph.
* **Filesystem: Archive (GiB)** — Displays used and free disk space on the volume where archive files are stored, in GiB. Also provides the latest used and free values at the top of the graph.
* **Filesystem: DB Software (GiB)** — Displays used and free disk space on the volume where database software binaries are installed, in GiB. Also provides the latest used and free values at the top of the graph.
* **Throughput: Data disk (KiB)** — Displays the read and write throughput on the data disk in KiB. Read and write values are shown in two different colors on the same graph. Also provides the latest read and write values at the top of the graph.
* **Throughput: Archive disk (KiB)** — Displays the read and write throughput on the archive disk in KiB. Read and write values are shown in two different colors on the same graph. Also provides the latest read and write values at the top of the graph.
* **IOPS: Data disk (Per Second)** — Displays the read and write IOPS on the data disk per second. Read and write values are shown in two different colors on the same graph. Also provides the latest read and write values at the top of the graph.
* **IOPS: Archive disk (Per Second)** — Displays the read and write IOPS on the archive disk per second. Read and write values are shown in two different colors on the same graph. Also provides the latest read and write values at the top of the graph.
* **Top Processes by CPU** — Displays the processes using the most CPU time in a table with three columns: Process ID (PID), Process name, and average CPU usage percentage. These details reflect current data only and are independent of the selected time range.
* **Top Processes by Memory** — Displays the processes using the most memory in a table with three columns: Process ID (PID), Process name, and average memory usage percentage. These details reflect current data only and are independent of the selected time range.

#### DB Metrics

The DB Metrics section provides graphical representations of PostgreSQL-specific database metrics:

* **Connections (Count)** — Displays the count of active, idle, and idle-in-transaction client connections. Each connection state is shown in a different color on the same graph. Also provides the latest active, idle, and idle-in-transaction values at the top of the graph.
* **Memory Buffer Allocations (Count)** — Displays the count of buffer allocations in the PostgreSQL shared buffer pool. Also provides the latest, maximum, and minimum values at the top of the graph.
* **Vacuum: Max Used Transaction IDs (Count)** — Displays the average number of transaction IDs consumed, which is used to track vacuuming activity and prevent transaction ID wraparound. Also provides the latest, maximum, and minimum values at the top of the graph.
* **Connection Utilization (Count)** — Displays the average number of connections in use relative to the configured maximum connections limit. Also provides the latest, maximum, and minimum values at the top of the graph.
* **Tuples: DML (Per Second)** — Displays the average number of rows deleted, updated, and inserted per second. Each operation is shown in a different color on the same graph. Also provides the latest values for each operation at the top of the graph.
* **Tuples: Reads (Per Second)** — Displays the average number of rows fetched and returned per second. Fetched and returned values are shown in two different colors on the same graph. Also provides the latest values at the top of the graph.
* **Transactions (Per Second)** — Displays the average number of committed and rolled-back transactions per second. Commit and rollback values are shown in two different colors on the same graph. Also provides the latest values at the top of the graph.
* **Transactions in Progress (Per Second)** — Displays the count of blocked and active transactions per second. Blocked and active values are shown in two different colors on the same graph. Also provides the latest, maximum, and average values at the top of the graph.
* **Deadlocks (Per Minute)** — Displays the average number of deadlocks per minute. Also provides the latest, maximum, minimum, and average values at the top of the graph.
* **IO Cache vs Disk reads (Per Second)** — Displays the average number of blocks hit in the buffer cache versus blocks read from disk per second. Cache hit and disk read values are shown in two different colors on the same graph. Also provides the latest values at the top of the graph.
* **Transactions Utilization (%)** — Displays the total transaction utilization as a percentage of the maximum allowed transactions. Also provides the latest, maximum, and minimum values at the top of the graph.
* **Oldest Replication Slot Lag (Bytes)** — Displays the total lag in bytes for the oldest replication slot. This metric helps monitor replication health and detect slot accumulation. Also provides the latest, maximum, and minimum values at the top of the graph.
* **Transaction Logs Generation (Bytes per second)** — Displays the total rate of WAL (Write-Ahead Log) generation in bytes per second. Also provides the latest, maximum, minimum, and average values at the top of the graph.

#### Performance Insights

Tessell Performance Insights is a database performance monitoring tool that allows you to assess and analyze the load on the database within a specified timeframe. This tool helps identify bottlenecks and 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 from the Settings tab post-provisioning.

1. Click **View Detailed Insights** to view the graph at a 5-minute interval.
2. Select time intervals of 1h, 3h, 6h, 12h, or 24h to display data for that duration on the graph. The default time interval is 1h.
3. For a custom time duration, select the **Custom** option, 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 AAS (Average Active Sessions), which measures the average number of active connections in a specific timeframe.

**Active Sessions**

An active session is a connection that has submitted work to the database 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.

**Average Active Sessions**

Average Active Sessions measures how many sessions are concurrently active on the database on 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 AAS by dividing the total number of sessions by the number of samples for a specific time period.

**Top Dimensions**

Top dimensions represent the dimensions of data corresponding to the database load within a given timeframe:

* **Top Waits** — The top wait events by database load on which the database was waiting in a given timeframe.
* **Top SQLs** — The top SQL queries by database load running on the database in a given timeframe, masked and grouped by type.
* **Top Hosts** — The top hosts contributing the most to database load in a given timeframe.
* **Top Users** — The top users contributing the most to database load in a given timeframe.
* **Top Databases** — The top databases contributing the most to database load on the multi-database service in a given timeframe.

**Figure 1: Monitoring tab**

![](/files/wW8NZkRMbQIUdxBKDVXH)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tessell.com/tessell/tessell-for-postgresql/db-services/readme-postgresql/homepage-postgresql/monitoring-postgresql.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
