mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-24 21:35:00 +00:00
PT-2134 - support for PostgreSQL and MySQL operators (#567)
* PT-2134 - Support for PostgreSQL and PS MySQL operators For PS MySQL operator: added support of pt-mysql-summary For PostgreSQL operator: added support for pg_gather Options added: - kubeconfig - path to kubeconfig - forwardport - port to use when calling pt-*-summary tools ad pt_gather Options changed: - resource - now default value is (was pxc). New values added: psql - for PostgreSQL operator ps - for PS MySQL operator if default value () is used: only K8 information is collected Otherwise resource-specific summary is collected * PT-2134_support_for_PostgreSQL_and_MySQL_operators Fixed summary collection when connecting to PostgreSQL opertor and no resource specified * PT-2134 - support for PostgreSQL and MySQL operators Added test case for full supported set of values for option --resource, added --kubeconfig and --forwardport options for test cases, added support for environment variables KUBECONFIG_PXC, KUBECONFIG_PS, KUBECONFIG_PSMDB, KUBECONFIG_PSQL, FORWARDPORT for test cases * PT-2134 - support for PostgreSQL and MySQL operators updated docs/pt-k8s-debug-collector.rst, replaced README.md in src/go/pt-k8s-debug-collector wih symbolic link to docs/pt-k8s-debug-collector.rst to avoid having inconsistent documentation * PT-2134 - support for PostgreSQL and MySQL operators Removed curl STDERR from the command output * PT-2134 - support for PostgreSQL and MySQL operators typo in pt-k8s-debug-collector.rst * PT-2134 - support for PostgreSQL and MySQL operators Renamed --resource=psql to --resource=pg after review suggestion by Ege and collecting feedback from potential users Co-authored-by: EvgeniyPatlan <evgeniy.patlan@percona.com> Co-authored-by: Carlos Salguero <carlos.salguero@percona.com>
This commit is contained in:
@@ -46,6 +46,13 @@ Data, collected for PXC
|
||||
"perconaxtradbclusterrestores",
|
||||
"perconaxtradbclusters"
|
||||
|
||||
Summary, collected for PXC (available in file summary.txt)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"pt-mysql-summary"
|
||||
|
||||
Individual files, collected for PXC
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -60,6 +67,22 @@ Individual files, collected for PXC
|
||||
"var/lib/mysql/mysqld.post.processing.log",
|
||||
"var/lib/mysql/auto.cnf"
|
||||
|
||||
Data, collected for MySQL
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"perconaservermysqlbackups",
|
||||
"perconaservermysqlrestores",
|
||||
"perconaservermysqls"
|
||||
|
||||
Summary, collected for MySQL (available in file summary.txt)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"pt-mysql-summary"
|
||||
|
||||
Data, collected for MongoDB
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
@@ -69,22 +92,90 @@ Data, collected for MongoDB
|
||||
"perconaservermongodbrestores",
|
||||
"perconaservermongodbs"
|
||||
|
||||
Summary, collected for MongoDB (available in file summary.txt)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"pt-mongodb-summary"
|
||||
|
||||
Data, collected for PostgreSQL
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"perconapgclusters",
|
||||
"pgclusters",
|
||||
"pgpolicies",
|
||||
"pgreplicas",
|
||||
"pgtasks"
|
||||
|
||||
Summary, collected for PostgreSQL (available in file summary.txt)
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"pg_gather"
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
``pt-k8s-debug-collector <flags>``
|
||||
|
||||
Flags:
|
||||
Supported Flags:
|
||||
================
|
||||
|
||||
``--resource` targeted custom resource name (default "pxc")``
|
||||
``--resource``
|
||||
|
||||
``--namespace` targeted namespace. By default data will be collected from all namespaces``
|
||||
Targeted custom resource name. Supported values:
|
||||
|
||||
``--cluster` targeted pxc/psmdb cluster. By default data from all available clusters to be collected``
|
||||
* ``pxc`` - PXC
|
||||
|
||||
* ``psmdb`` - MongoDB
|
||||
|
||||
* ``pg`` - PostgreSQL
|
||||
|
||||
* ``ps`` - MySQL
|
||||
|
||||
* ``none`` - Collect only general Kubernetes data, do not collect anything specific to the particular operator).
|
||||
|
||||
Default: ``none``
|
||||
|
||||
``--namespace``
|
||||
|
||||
Targeted namespace. By default data will be collected from all namespaces
|
||||
|
||||
``--cluster``
|
||||
|
||||
Targeted cluster. By default data from all available clusters to be collected
|
||||
|
||||
``--kubeconfig``
|
||||
|
||||
Path to kubeconfig. Default configuration be used if none specified
|
||||
|
||||
``--forwardport``
|
||||
|
||||
Port to use when collecting database-specific summaries. By default, 3306 will be used for PXC and MySQL, 27017 for MongoDB, and 5432 for PostgreSQL
|
||||
|
||||
Requirements
|
||||
============
|
||||
|
||||
- Installed and configured ``kubectl``
|
||||
- Installed and configured ``pt-mysql-summary``
|
||||
- Installed and configured ``pt-mongodb-summary``
|
||||
- Installed, configured, and available in PATH ``kubectl``
|
||||
- Installed, configured, and available in PATH ``pt-mysql-summary`` for PXC and MySQL
|
||||
- Installed, configured, and available in PATH ``pt-mongodb-summary`` for MongoDB
|
||||
|
||||
Known Issues
|
||||
============
|
||||
|
||||
On Kubernetes 1.21 - 1.24 warning is printed:
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
2022/12/15 17:43:16 Error: get resource podsecuritypolicies in namespace default: error: <nil>, stderr: Warning: policy/v1beta1 PodSecurityPolicy is deprecated in v1.21+, unavailable in v1.25+
|
||||
, stdout: apiVersion: v1
|
||||
items: []
|
||||
kind: List
|
||||
metadata:
|
||||
resourceVersion: ""
|
||||
|
||||
This warning is harmless and does not affect data collection. We will remove podsecuritypolicies once everyone upgrade to Kubernetes 1.25 or newer. Before that we advise to ignore this warning.
|
Reference in New Issue
Block a user