Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] PMM-9288 - Extended metrics and labels for MongoDB QAN #3752

Open
wants to merge 2 commits into
base: doc-release-3.1.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions documentation/docs/release-notes/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,35 @@ This enhancement provides a more accurate and intuitive visualization of your Mo
![Topology section](Topology.png)


### Extended metrics and labels for MongoDB Query Analytics (QAN)

We've added new metrics and filters to the [QAN dashboard](../use/qan/index.md) that expose important query execution details to highlight inefficient execution paths and provide detailed lock and storage metrics. With the new filters, you can easily identify problematic queries by application, client, or user:

#### Additional MongoDB QAN metrics
The **Query Details** section of the QAN dashboard now includes these additional metrics:

- **Docs Examined**: number of examined documents during query execution
- **Keys Examined**: number of index keys scanned during query execution
- **Docs Returned**: number of returned documents by the query
- **Response Length**: size of the response in bytes
- **Locks Global Acquire Count Read Shared**: number of times a global read lock was acquired during query execution
- **Locks Global Acquire Count Write Shared**: number of times a global write lock was acquired during query execution
- **Locks Database Acquire Count Read Shared**: number of times a read lock was acquired at the database level during query execution
- **Locks Database Acquire Wait Count Read Shared**: number of times a read lock at the database level was requested but had to wait before being granted
- **Locks Database Time Acquiring Micros Read Shared**: indicates the time spent acquiring a read lock at the database level during an operation
- **Locks Collection Acquire Count Read Shared**: number of times a read lock was acquired on a specific collection during operations
- **Storage Bytes Read**: total number of bytes read from storage during a specific operation
- **Storage Time Reading Micros**: indicates the time spent reading data from storage during an operation

#### New MongoDB QAN filter categories

The QAN dashboard now includes several additional MongoDB-specific filter options:

- **Plan Summary**: filters queries by execution plan type (COLLSCAN, IXSCAN, etc.) to easily identify inefficient full collection scans
- **Application Name**: filters queries by the application name that generated them
- **User**: filters queries by the database user who executed the query
- **Database**: filters queries by specific database



## Improvements
Expand Down
49 changes: 45 additions & 4 deletions documentation/docs/use/qan/panels/filters.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,56 @@
# Filters Panel
# QAN Filters panel

The Filters panel on the left hand side of the [QAN dashboard](../../qan/index.md) helps you narrow down query data to focus on specific metrics, database instances, or performance issues.


![!image](../../../images/PMM_Query_Analytics_Panels_Filters.jpg)

- The **Filter** panel on the left hand side of the dashboard lists the filters grouped by category. It also shows the percentage of the main metrics (explained below). If you select a different metric, the percentages on the left panel will change as per this metric. When you select a metric, it reduces the overview list as per the matching filter.
## Understanding filters

- The **Filter** panel lists the filters grouped by category. It also shows the percentage of the main metrics (explained below). If you select a different metric, the percentages on the left panel will change as per this metric. When you select a metric, it reduces the overview list as per the matching filter.
- The first five of each category are shown. If there are more, the list is expanded by clicking **Show all** beside the category name, and collapsed again with **Show top 5**.
- Applying a filter may make other filters inapplicable. These become grayed out and inactive.
- Click the chart symbol <i class="uil uil-graph-bar"></i> to navigate directly to an item's associated dashboard.
- Separately, the global **Time range** setting filters results by time, either your choice of **Absolute time range**, or one of the predefined **Relative time ranges**.

![!image](../../../images/PMM_Query_Analytics_Time_Range.jpg)

## Available filter groups
The available filter groups depend on the database type you're monitoring.

### Common filter groups
These filter groups are available for all database types:

- **Environment**
- **Cluster**
- **Replication Set**
- **Database**
- **Schema**
- **Node Name**
- **Service Name**
- **Client Host**
- **Username**
- **Service Type**
- **Node Type**
- **City**
- **AZ**

### MySQL-specific filter groups



- **Command Class**: filters by SQL command class (SELECT, INSERT, UPDATE, etc.)
- **Fingerprint**: Filters by normalized query pattern

### PostgreSQL-specific filter groups

- **Application**
- **Command Type**
- **Tables**

### MongoDB-specific filter groups
- **Plan Summary**: filters queries by execution plan type (COLLSCAN, IXSCAN, etc.) to easily identify inefficient full collection scans
- **Client Application Name**: filters queries by the application name that generated them

## Custom filter groups

Expand Down Expand Up @@ -51,15 +92,15 @@ In the output, you can see another custom group in the `OperationSystem` filter.

### Enabling custom filter groups

- **CLI**: While adding a service through CLI use the flag `comments-parsing`. Possible values are `on/off`.
- **via CLI**: While adding a service through CLI use the flag `comments-parsing`. Possible values are `on/off`.

Example for adding MySQL with comments parsing on:

```sh
pmm-admin add mysql --username=root --password=root-password --comments-parsing="on"
```

- **UI**: While adding a service through the UI you will see new checkbox to `enable/disable` comments parsing for current service.
- **via UI**: While adding a service through the UI you will see new checkbox to `enable/disable` comments parsing for current service.

![!image](../../../images/PMM_QAN_Parsing.png)

Expand Down
Loading