mirror of
https://github.com/percona/percona-toolkit.git
synced 2026-01-29 03:07:54 +08:00
PT-2125 Documentation outdated or missed for tools, written in Go (#559)
Added docs/pt-mongodb-index-check.rst, updated docs/pt-k8s-debug-collector.rst
This commit is contained in:
@@ -18,7 +18,6 @@ Data that will be collected
|
||||
"replicationcontrollers",
|
||||
"events",
|
||||
"configmaps",
|
||||
"secrets",
|
||||
"cronjobs",
|
||||
"jobs",
|
||||
"podsecuritypolicies",
|
||||
@@ -37,6 +36,38 @@ Data that will be collected
|
||||
"modes",
|
||||
"your-custom-resource" (depends on 'resource' flag)
|
||||
|
||||
Data, collected for PXC
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"perconaxtradbbackups",
|
||||
"perconaxtradbclusterbackups",
|
||||
"perconaxtradbclusterrestores",
|
||||
"perconaxtradbclusters"
|
||||
|
||||
Individual files, collected for PXC
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"var/lib/mysql/mysqld-error.log",
|
||||
"var/lib/mysql/innobackup.backup.log",
|
||||
"var/lib/mysql/innobackup.move.log",
|
||||
"var/lib/mysql/innobackup.prepare.log",
|
||||
"var/lib/mysql/grastate.dat",
|
||||
"var/lib/mysql/gvwstate.dat",
|
||||
"var/lib/mysql/mysqld.post.processing.log",
|
||||
"var/lib/mysql/auto.cnf"
|
||||
|
||||
Data, collected for MongoDB
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
.. code-block:: bash
|
||||
|
||||
"perconaservermongodbbackups",
|
||||
"perconaservermongodbrestores",
|
||||
"perconaservermongodbs"
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
68
docs/pt-mongodb-index-check.rst
Normal file
68
docs/pt-mongodb-index-check.rst
Normal file
@@ -0,0 +1,68 @@
|
||||
.. _pt-mongodb-index-check:
|
||||
|
||||
=================================
|
||||
:program:`pt-mongodb-index-check`
|
||||
=================================
|
||||
|
||||
Performs checks on MongoDB indexes.
|
||||
|
||||
Checks available
|
||||
================
|
||||
|
||||
Duplicated indexes
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Check for indexes that are the prefix of other indexes. For example if we have these 2 indexes
|
||||
|
||||
.. code-block:: javascript
|
||||
|
||||
db.getSiblingDB("testdb").test_col.createIndex({"f1": 1, "f2": -1, "f3": 1, "f4": 1}, {"name": "idx_01"});
|
||||
db.getSiblingDB("testdb").test_col.createIndex({"f1": 1, "f2": -1, "f3": 1}, {"name": "idx_02"});
|
||||
|
||||
The index ``idx_02`` is the prefix of ``idx_01`` because it has the same
|
||||
keys in the same order so, ``idx_02`` can be dropped.
|
||||
|
||||
Unused indexes.
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
This check gets the ``$indexstats`` for all indexes and reports those
|
||||
having ``accesses.ops`` = 0.
|
||||
|
||||
Usage
|
||||
=====
|
||||
|
||||
Run the program as ``pt-mongodb-index-check <command> [flags]``
|
||||
|
||||
Available commands
|
||||
~~~~~~~~~~~~~~~~~~
|
||||
|
||||
================ ==================================
|
||||
Command Description
|
||||
================ ==================================
|
||||
check-duplicated Run checks for duplicated indexes.
|
||||
check-unused Run check for unused indexes.
|
||||
check-all Run all checks
|
||||
================ ==================================
|
||||
|
||||
Available flags
|
||||
~~~~~~~~~~~~~~~
|
||||
|
||||
+----------------------------+----------------------------------------+
|
||||
| Flag | Description |
|
||||
+============================+========================================+
|
||||
| –all-databases | Check in all databases excluding |
|
||||
| | system dbs. |
|
||||
+----------------------------+----------------------------------------+
|
||||
| –databases=DATABASES,… | Comma separated list of databases to |
|
||||
| | check. |
|
||||
+----------------------------+----------------------------------------+
|
||||
| –all-collections | Check in all collections in the |
|
||||
| | selected databases. |
|
||||
+----------------------------+----------------------------------------+
|
||||
| –collections=COLLECTIONS,… | Comma separated list of collections to |
|
||||
| | check. |
|
||||
+----------------------------+----------------------------------------+
|
||||
| –mongodb.uri= | Connection URI |
|
||||
+----------------------------+----------------------------------------+
|
||||
| –json | Show output as JSON |
|
||||
+----------------------------+----------------------------------------+
|
||||
Reference in New Issue
Block a user