3

PMM Dump: A New Tool to Support Percona Customers

 9 months ago
source link: https://www.percona.com/blog/percona-monitoring-and-management-dump-a-new-tool-to-support-percona-customers/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

PMM Dump: A New Tool to Support Percona Customers

December 6, 2023

Sveta Smirnova

In this post, I will present a new Percona tool: PMM Dump. The PMM Dump performs a logical backup of the performance metrics collected by the Percona Monitoring and Management (PMM) Server and imports them into a different PMM Server instance. PMM Dump allows you to share monitoring data collected by your PMM server securely with the Percona Support team. First General Availability version of PMM Dump was released on November 22, 2023.

In Percona Support, we help our customers to resolve performance issues. In order to do it, we need to see performance metrics collected at the time when the issue happens. PMM collects the metrics we need, and if a customer can provide us access to their PMM instance, we can start resolving the issue right away.

Unfortunately, not everyone who uses PMM can provide us access due to their companies’ security restrictions. We also cannot effectively use  PMM snapshots because they require individual sharing of dashboards or panels. This requires a lot of manual work on both the customer’s and our sides.

To resolve this problem, we created a tool that allows customers to export performance and query analytics metrics into a dump file that we can later restore on our own secure, private, and temporary PMM instances and access the data as if it were collected by our own servers.

Once the issue is resolved and the corresponding ticket closed, we remove all data provided by customers. You can read more about Percona security and data privacy practices at https://www.percona.com/legal/percona-security-and-data-privacy-practices.

PMM Dump supports rich filtering options and native VictoriaMetrics or ClickHouse queries so users can decide which data they want to share with us.

PMM Dump is a command line tool that can be downloaded from https://www.percona.com/get/pmm-dump. Starting from PMM version 2.27.0, it is also shipped together with PMM. Unofficial ARM packages are available at https://github.com/Percona-Lab/percona-on-arm/releases.

By default, PMM Dump dumps all performance metrics collected in the last 4 hours:

Shell
$ pmm-dump export --pmm-url='https://admin:[email protected]'
> --allow-insecure-certs
2023-01-05T20:01:33+03:00 INF Credential user was obtained from pmm-url
2023-01-05T20:01:33+03:00 INF Credential password was obtained from pmm-url
2023-01-05T20:01:33+03:00 INF Exporting metrics...
2023-01-05T20:01:33+03:00 INF Processing 1/49 chunk...
2023-01-05T20:01:33+03:00 INF Processing 2/49 chunk...
2023-01-05T20:01:33+03:00 INF Processing 3/49 chunk...
2023-01-05T20:01:39+03:00 INF Processing 49/49 chunk...
2023-01-05T20:01:39+03:00 INF Writing chunk to the dump... filename=1672934793-1672935093.bin source=vm
2023-01-05T20:01:39+03:00 INF Successfully exported!
$ls *tar.gz
pmm-dump-1672938093.tar.gz

It will not collect query analytics data by default. To do it, specify the option --dump-qan.

To specify a different time range, use options --start-ts  and --end-ts:

$ pmm-dump export --start-ts="2021-01-02T15:04:05Z" --end-ts="2021-01-02T20:04:05+03:00"

To dump only specific instances, use option --instance:

$ pmm-dump export --pmm-url='http://admin:[email protected]'  --instance='my_mysql_8025'

You can specify this option as many times as you need:

$ pmm-dump export --pmm-url= 'http://admin:[email protected]'
> --instance='supp-mongo_23599'
> --instance='supp-mongo_23600'
> --instance='supp-mongo_23601'

You can also filter by a dashboard:

$ pmm-dump export --pmm-url= 'http://admin:[email protected]'
> --dashboard='MySQL InnoDB Details'
> --dashboard='Node Summary' --dashboard='MySQL Instance Summary'

On the Support side, we import the resulting dump using either the import command or load-pmm-dump helper script.

$ ./pmm-dump import --pmm-url='https://admin:[email protected]'
> --allow-insecure-certs --dump-path=pmm-dump-1672938093.tar.gz
2023-01-05T20:09:46+03:00 INF Credential user was obtained from pmm-url
2023-01-05T20:09:46+03:00 INF Credential password was obtained from pmm-url
2023-01-05T20:09:46+03:00 INF Importing metrics...
2023-01-05T20:09:46+03:00 INF Opening dump file... path=pmm-dump-1672938093.tar.gz
2023-01-05T20:09:46+03:00 INF Processing chunk 'vm/1672923693-1672923993.bin'...
2023-01-05T20:09:46+03:00 INF Successfully processed 'vm/1672923693-1672923993.bin'
2023-01-05T20:09:55+03:00 INF Processing chunk 'vm/1672937793-1672938093.bin'...
2023-01-05T20:09:55+03:00 INF Successfully processed 'vm/1672937793-1672938093.bin'
2023-01-05T20:09:55+03:00 INF Successfully imported!

Once imported successfully, we can access the local PMM instance and start resolving performance issues for our customers.

For more information about PMM Dump and its rich filtering options, consult the user reference manual at https://docs.percona.com/pmm-dump-documentation/index.html.

Percona Monitoring and Management is a best-of-breed open source database monitoring solution. It helps you reduce complexity, optimize performance, and improve the security of your business-critical database environments, no matter where they are located or deployed.

Download Percona Monitoring and Management Today

Share This Post!

Subscribe

Connect with
guest

Label

0 Comments

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK