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

Merged
merged 11 commits into from
Mar 12, 2025
Merged
Binary file added documentation/docs/images/MongoFiltersQAN.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/docs/images/PMM_MongoDB_Cluster_Summary.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified documentation/docs/images/PMM_Query_Analytics.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions documentation/docs/release-notes/3.1.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,36 @@ We've improved the filtering experience on the [MongoDB Instances Compare](../re

These additional filters make it easier to navigate and compare MongoDB instances in larger environments, allowing you to quickly narrow down the specific instances you want to monitor without relying solely on service names.

### 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, user or even plan summary:

#### 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 executed them
- **User**: filters queries by the database user who executed the query
- **Database**: filters queries by specific database

![New Mongo filters](../images/MongoFiltersQAN.png)
#### Enhanced MongoDB dashboard visualizations
Based on community feedback, we've improved the monitoring experience in both the [MongoDB ReplicaSet Summary](../reference/dashboards/dashboard-mongodb-replset-summary.md) and the [MongoDB Sharded Cluster Summary](../reference/dashboards/dashboard-mongodb-cluster-summary.md) dashboards. These improvements deliver more accurate and actionable insights:

Expand Down
45 changes: 41 additions & 4 deletions documentation/docs/use/qan/panels/filters.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,52 @@
# 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**

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

### 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

### PostgreSQL-specific filter groups
- **Application**
- **Command Type**
- **Tables**
- **Client Application Name**


## Custom filter groups

Expand Down Expand Up @@ -51,15 +88,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