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

Monitor from different nodes #1315

Open
wants to merge 10 commits into
base: PMM3_Beta
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
Binary file added docs/_images/PG_Stat.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 docs/_images/PMM_Add_Instance_MongoDB.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 docs/_images/PMM_Add_Instance_MongoDB_TLS.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 added docs/_images/PMM_Add_Instance_MongoDB_TLS.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 docs/_images/PMM_Add_Instance_MySQL.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 docs/_images/PMM_Add_Instance_MySQL_TLS.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 docs/_images/PMM_Add_Instance_PostgreSQL.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 docs/_images/PMM_Add_Instance_PostgreSQL_TLS.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 docs/_images/PMM_Advanced_Data_Exploration_HAProxy.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 docs/_images/PMM_External_Serverless.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 docs/_images/PMM_External_Serverless_switcher.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 docs/_images/PMM_External_Serverless_switcher_manually.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 docs/_images/azure-add-mysql-1.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 added docs/_images/choose_node.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/install-pmm/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The choices are:

## Add services

On each PMM Client, you configure then add to PMM Server's inventory the node or service you want to monitor.
On each PMM Client, you configure then add to PMM Server's inventory the nodes or service you want to monitor.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if we write "nodes", shouldn't we write "services"?


??? info "Which services you can monitor?"

Expand Down
27 changes: 10 additions & 17 deletions docs/install-pmm/install-pmm-client/connect-database/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ First of all, ensure that there is the minimal latency between PMM Server and th

Network connectivity can become an issue for VictoriaMetrics to scrape metrics with 1 second resolution. We strongly suggest that you run PMM Server on AWS (Amazon Web Services) in the same availability zone as Amazon RDS instances.

It is crucial that *enhanced monitoring* be enabled for the Amazon RDS DB instances you intend to monitor.
It is crucial that **enhanced monitoring** be enabled for the Amazon RDS DB instances you intend to monitor.

Set the *Enable Enhanced Monitoring* option in the settings of your Amazon RDS DB instance.
Set the **Enable Enhanced Monitoring** option in the settings of your Amazon RDS DB instance.

![!image](../../../_images/amazon-rds.modify-db-instance.2.png)

Expand Down Expand Up @@ -160,22 +160,20 @@ This method supports Amazon RDS database instances that use Amazon Aurora, MySQL
The following steps are needed to add an Amazon RDS database instance to PMM:
{.power-number}

1. In the PMM web interface, go to <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **PMM Inventory** → {{icon.addinstance}} **Add Instance**.

2. Select **Amazon RDS -- Add a remote instance**.
1. In the PMM web interface, go to **PMM Configuration > PMM Inventory > Add Instance > Amazon RDS**.

![!image](../../../_images/PMM_Add_Instance_AWS_RDS.png)

3. Enter the access key ID and the secret access key of your IAM user or leave these fields empty if an IAM role was created.
2. Enter the access key ID and the secret access key of your IAM user or leave these fields empty if an IAM role was created.

4. Click the **Discover** button for PMM to retrieve the available Amazon RDS
3. Click the **Discover** button for PMM to retrieve the available Amazon RDS
instances.

![!image](../../../_images/PMM_Add_Instance_AWS_RDS_Discover.png)

5. For the instance that you would like to monitor, select the **Start monitoring** button.
4. For the instance that you would like to monitor, select the **Start monitoring** button.

6. You will see a new page with the number of fields. The list is divided into the following groups: **Main details**, **RDS database**, **Labels**, and **Additional options**. Some already known data, such as already entered **AWS access key**, are filled in automatically, and some fields are optional.
5. You will see a new page with the number of fields. The list is divided into the following groups: **Main details**, **RDS database**, **Labels**, and **Additional options**. Some already known data, such as already entered **AWS access key**, are filled in automatically, and some fields are optional.

![!](../../../_images/PMM_Add_Instance_AWS_RDS_Main_Details.png)

Expand All @@ -197,23 +195,18 @@ instances.

- when adding a MongoDB instance, you will be able to choose using Query Analytics MongoDB profiler.

7. Finally press the **Add service** button to start monitoring your instance.
6. Finally press the **Add service** button to start monitoring your instance.

## Adding an Amazon RDS PostgreSQL instance

For PostgreSQL, use the same method described above.
{.power-number}

1. In the PMM web interface, go to <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **PMM Inventory** → {{icon.addinstance}} **Add Instance**..

2. Select **Amazon RDS -- Add a remote instance**.

!!! note alert alert-primary ""
At the moment of writing this guide, the Add button doesn't mention PostgreSQL but the discovery function already supports it.
1. In the PMM web interface, go to **PMM Configuration > PMM Inventory > Add Instance > Amazon RDS**.

![!image](../../../_images/PMM_rds_postgre_02_discover.png)

3. Follow steps 4 to 6 as in the previous section. Fill the form and remember to select `PG Stat Statement` to enable Query Analytics.
2. Follow steps 4 to 6 as in the previous section. Fill the form and remember to select `PG Stat Statement` to enable Query Analytics.

To get queries for Query Analytics, you need to enable `pg_stat_statements` in `postgres` database of your instance by running:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
The Microsoft Azure feature is turned off by default. To turn it on:
{.power-number}

1. Go to <i class="uil uil-cog"></i> **Configuration** → <i class="uil uil-setting"></i> **Settings** → **Advanced Settings**.
1. Go to **PMM Configuration > Settings > Advanced Settings**.

2. Click the <i class="uil uil-toggle-off"></i> toggle in the **Technical preview features** section of the page.

Expand Down Expand Up @@ -142,11 +142,9 @@ You can find more details on how to create DB on Azure at:

![!](../../../_images/PMM_Add_Instance_Azure_3.png)

In the list of databases on the Discovery page click *Start Monitoring* to add the selected Azure Database to PMM.
In the list of databases on the Discovery page click **Start Monitoring** to add the selected Azure Database to PMM.

Fill in all required fields and click *Add service*.

![!](../../../_images/PMM_Add_Instance_Azure_4.png)
Fill in all required fields and click **Add service**.

PMM can use 3 exporters to collect metrics:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,16 @@ For more details see <https://prometheus.io/docs/instrumenting/writing_exporters
To add an external service via PMM UI:
{.power-number}

1. In the PMM web interface, go to <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **PMM Inventory** → {{icon.addinstance}} **Add Instance**.

2. Select **External Service -- Add a remote instance**.
1. In the PMM web interface, go to **PMM Configuration > PMM Inventory > Add Service > External Service**.

![!](../../../_images/PMM_External_Serverless.png)

3. Fill the form and set the external service endpoint.
2. Fill in the form and set the external service endpoint:

The endpoint can be set manually:
- manually OR:

![!](../../../_images/PMM_External_Serverless_switcher_manually.png)

or by parsing required data from a URL string, in which case you only need to pass a valid URL.
- by parsing required data from a URL string. In this case you only need to pass a valid URL:

![!](../../../_images/PMM_External_Serverless_switcher.png)
27 changes: 10 additions & 17 deletions docs/install-pmm/install-pmm-client/connect-database/google.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,12 @@ To add a MySQL instance on Google Cloud:

4. Log into the PMM user interface.

5. Select <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **PMM Inventory** → {{icon.addinstance}} **Add Instance**.
5. Select **PMM Configuration > PMM Inventory > Service > Add Service > MySQL**.

6. Click **MySQL Add a remote instance**.
6. Fill in the details for the remote MySQL instance and make sure to enable the **Use performance schema** option.
7. Click **Add service**.

7. Fill in the details for the remote MySQL instance.

- Ensure **Use performance schema** is selected.

8. Click **Add service**.

9. Check for values in the **MySQL Instance Overview** dashboard and in **Query Analytics**.
8. Go to **Dashboards** and check for values in the **MySQL Instance Summary** dashboard and in **Query Analytics**.

## PostgreSQL

Expand All @@ -50,17 +45,15 @@ To add a PostgreSQL instance on Google Cloud:

4. Log into the PMM user interface.

5. Select <i class="uil uil-cog"></i> *Configuration* → {{icon.inventory}} *PMM Inventory* → {{icon.addinstance}} *Add Instance*.

6. Select *PostgreSQL Add a remote instance*.
5. Select **PMM Configuration > PMM Inventory > Services > Add Service > PostgreSQL**.

7. Fill in the details for the remote PostgreSQL instance:
6. Fill in the details for the remote PostgreSQL instance and make sure to **PG Stat Statements** option under **Stat tracking options**.

- In *Stat tracking options*, select *PG Stat Statements*.
![!image](../../../_images/PG_stat.png)

8. Click *Add service*.
7. Click **Add service**.

9. Check for values in the *PostgreSQL Instance Overview* dashboard and *Query Analytics*.
8. Go to **Dashboards** and check for values in the **PostgreSQL Instances Overview** and **Query Analytics**.

## Cloud SQL Proxy

Expand All @@ -75,7 +68,7 @@ To add a MySQL instance:

3. [Enable Admin API][GOOGLE_CLOUD_ADMIN_API] and download the JSON credential file.

4. Enable *Performance Schema*.
4. Enable **Performance Schema**.

5. Run Cloud SQL Proxy (runs on PMM Client node).

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ pmm-admin add haproxy --listen-port=8404 --metrics-path=/prom-metrics --scheme=h

Here you can check list of all available flags: [pmm-admin](../../../use/commands/pmm-admin.md).

You can also add HAProxy by UI in Grafana: Select <i class="uil uil-cog"></i> *Configuration* → {{icon.inventory}} **PMM Inventory** → {{icon.addinstance}} **Add Instance**.
You can also add HAProxy by UI: Select **PMM Configuration > PMM Inventory > Add Instance**.

HAProxy data is visible in the **Advanced Data Exploration** dashboard:

![!](../../../../_images/PMM_Advanced_Data_Exploration_HAProxy.png)
![!](../../..//_images/PMM_Advanced_Data_Exploration_HAProxy.png)
25 changes: 10 additions & 15 deletions docs/install-pmm/install-pmm-client/connect-database/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ How to set up PMM to monitor a [MongoDB] or [Percona Server for MongoDB] databas
Check that:

- [PMM Server is installed](../../install-pmm-server/index.md) and running with a known IP address or hostname accessible from the client node.
- [PMM Client is installed](../../install-pmm-client/index.md) and the [node is registered with PMM Server](../../register-client-node/index.md).
- [PMM Client is installed](../../install-pmm-client/index.md) and the [nodes are registered with PMM Server](../../register-client-node/index.md).
- You have superuser (root) access on the client host.
- You have `adminUserAnyDatabase` or superuser role privilege to any database servers that you want to monitor.
- Your MongoDB server is version 4.0 or higher.
Expand Down Expand Up @@ -176,13 +176,11 @@ When you have configured your database server, you can add a MongoDB service wit
To add a service with the UI:
{.power-number}

1. Select <i class="uil uil-cog"></i> *Configuration* → {{icon.inventory}} *PMM Inventory* → {{icon.addinstance}} *Add Instance*.
1. Select **PMM Configuration > Add Service > MongoDB**.

2. Select *MongoDB -- Add a remote instance*.
2. Enter or select values for the fields.

3. Enter or select values for the fields.

4. Click *Add service*.
3. Click **Add service**.

![!](../../../_images/PMM_Add_Instance_MongoDB.jpg)

Expand Down Expand Up @@ -241,21 +239,18 @@ where:
- `AUTHENTICATION-MECHANISM`: Authentication mechanism. Default is empty. Use `MONGODB-X509` for SSL certificates.
- `AUTHENTICATION-DATABASE`: Authentication database. Default is empty. Use `$external` for SSL certificates.


## Check the service

### With the user interface
### From the user interface

To check the servie with the UI:
To check the servie from the UI:
{.power-number}

1. Select <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **Inventory**.

2. Select **MongoDB -- Add a remote instance**.
1. Select **PMM Configuration > Inventory > MongoDB**.

3. Enter or select values for the fields.
2. Enter or select values for the fields.

4. Click **Add service**.
3. Click **Add service**.

![!](../../../_images/PMM_Add_Instance_MongoDB_TLS.jpg)

Expand Down Expand Up @@ -292,7 +287,7 @@ To see the query analytics for the service:
To remove the service from the UI:
{.power-number}

1. Select <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **Inventory**.
1. Select **PMM Configuration > Inventory**.
2. In the **Services** tab, verify the **Service name**, **Addresses**, and any other relevant values used when adding the service.
3. In the **Options** column, expand the **Details** section and check that the Agents are using the desired data source.
4. If your MongoDB instance is configured to use TLS, click on the **Use TLS for database connection** check box and fill in TLS certificates and keys.
Expand Down
13 changes: 5 additions & 8 deletions docs/install-pmm/install-pmm-client/connect-database/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ PMM Client collects metrics from [MySQL][ORACLE_MYSQL], [Percona Server for MySQ
Check that:

- [PMM Server is installed](../../install-pmm-server/index.md) and running with a known IP address accessible from the client node.
- [PMM Client is installed](../../install-pmm-client/index.md) and the [node is registered with PMM Server](../../register-client-node/index.md).
- [PMM Client is installed](../../install-pmm-client/index.md) and the [nodes are registered with PMM Server](../../register-client-node/index.md).
- You have superuser (root) access on the client host.

## Create a database account for PMM
Expand Down Expand Up @@ -348,13 +348,11 @@ With the PMM user interface, you select **Use performance schema**, or deselect
To add a service using the UI:
{.power-number}

1. Select <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **Inventory** → {{icon.addinstance}} **Add Service**.
1. Select **PMM Configuration > PMM Inventory > Add Service > MySQL**.

2. Select **MySQL -- Add a remote instance**.
2. Enter or select values for the fields.

3. Enter or select values for the fields.

4. Click **Add service**.
3. Click **Add service**.

![!](../../../_images/PMM_Add_Instance_MySQL.jpg)

Expand Down Expand Up @@ -429,8 +427,7 @@ Add the database server as a service using one of these example commands. If suc
To check the service with the UI:
{.power-number}


1. Select <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **Inventory**.
1. Select **PMM Configuration > PMM Inventory**.
2. In the **Services** tab, verify the **Service name**, **Addresses**, and any other relevant information in the form.
3. In the **Options** column, expand the **Details** section and check that the Agents are using the desired data source.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ How to set up PMM to monitor a [PostgreSQL] or [Percona Distribution for Postgre
Check that:

- [PMM Server is installed](../../install-pmm-server/index.md) and running with a known IP address accessible from the client node.
- [PMM Client is installed](../../install-pmm-client/index.md)and the [node is registered with PMM Server](../../register-client-node/index.md).
- [PMM Client is installed](../../install-pmm-client/index.md) and the [nodes are registered with PMM Server](../../register-client-node/index.md).
- You have superuser (root) access on the client host.
- You have superuser access to any database servers that you want to monitor.

Expand Down Expand Up @@ -244,13 +244,11 @@ When you have configured your database server, you can add a PostgreSQL service
To add the service With the user interface:
{.power-number}

1. Select <i class="uil uil-cog"></i> **Configuration** → {{icon.inventory}} **Inventory** → {{icon.addinstance}} **Add Service**.
1. Go to **PMM Configuration > Add Service > PostgreSQL**.

2. Select **PostgreSQL -- Add a remote instance**.
2. Enter or select values for the fields.

3. Enter or select values for the fields.

4. Click **Add service**.
3. Click **Add service**.

![!](../../../_images/PMM_Add_Instance_PostgreSQL.jpg)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Connect Remote instance
# Connect a remote instance

## Recommended settings

When monitoring remote instances including RDS and Google instances, network latency might affect the scrape process and throw timeout errors.
For this reason, it is recommended to [lower the metrics resolution](../../../configure-pmm/metrics_res.md).

Starting with PMM 2.18, the scrape timeout has been updated according to the following rules:
The scrape timeout in PMM is dynamically set based on the resolution of data collection. The following rules determine the scrape timeout:
{.power-number}

- For resolutions <= 2 seconds, scrape timeout is 1 second.
Expand All @@ -24,7 +24,7 @@ The page will show only agents having issues while scrapping and the scrape resu

![!image](../../../_images/scrape_targets_02.png)

In the example here, there is a message that says: *context deadline exceeded* and the scrape duration column says the scrape took 10 seconds; this means that the exporter didn't respond in the 10 seconds the scrape process was allowed to run due to the configured metric resolutions and their timeouts.
In the example here, there is a message that says: **context deadline exceeded** and the scrape duration column says the scrape took 10 seconds; this means that the exporter didn't respond in the 10 seconds the scrape process was allowed to run due to the configured metric resolutions and their timeouts.

In this case, we can lower the metric resolutions increasing these values as shown in the image below.

Expand Down
4 changes: 2 additions & 2 deletions docs/install-pmm/register-client-node/index.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Register client node on PMM Server
# Register client nodes on PMM Server

Register your client node with PMM Server.
Register your client nodes with PMM Server.

```sh
pmm-admin config --server-insecure-tls --server-url=https://admin:[email protected]:443
Expand Down
12 changes: 12 additions & 0 deletions docs/release-notes/3.0.0_Beta.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@ By default, an encryption key is automatically generated and stored at `/srv/pmm

When upgrading to PMM 3, any existing unencrypted PMM 2 data will be encrypted automatically.

## Distribute monitoring across multiple nodes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add it to somewhere else, not only in release notes.


You can now run database exporters from any PMM Client node, which means you can distribute the monitoring load across multiple PMM Clients. This is especially useful for monitoring cloud-hosted databases like RDS.

When adding a new service through the PMM UI, you can now select the node that will run the exporter. By default, PMM Server is chosen, but you have the option to select any node with a PMM Client installed. If a node has multiple Clients installed, you can choose which one to use.

Currently, this feature is availabl only when adding new services. Support for editing existing services will be included in a future update.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Currently, this feature is availabl only when adding new services. Support for editing existing services will be included in a future update.
Currently, this feature is available only when adding new services. Support for editing existing services will be included in a future update.


For more details, see [Connect services](../install-pmm/install-pmm-client/index.md##connect-services).

![Choose node](../_images/choose_node.png)

### Grafana Angular support discontinuation

Grafana will discontinue support for Angular starting with version 12, expected in 2025. This affects numerous panels and plugins, including but not limited to Graph and Table panels.
Expand Down
Loading