mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-25 21:54:48 +00:00

* PT-2105 - Collect individual log files for PXC Combined log files are hard to read by humans. Since pt-k8-debug-collector is the tool that accesses data from the running pods, it can copy raw log files, necessary for troubleshooting PXC issues. So, in addition to collecting logs.txt, this adds method getIndividualFiles for the Dumper that reads individual files from PXC pods and stores them in the resulting archive. Additionally, this commit fixes invalid timestamps in the resulting archive. * PT-2105 - added support for non-default namespaces * PT-2105 Let pt-k8-debug-collector to collect individual logs in PXC pods Added test case for this new collection. * Update go.mod Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com> Co-authored-by: Viacheslav Sarzhan <slava.sarzhan@percona.com>
1.8 KiB
1.8 KiB
Debug collector tool
Collects debug data (logs, resource statuses etc.) from a k8s/OpenShift cluster. Data is packed into the cluster-dump.tar.gz
archive in the current working directory.
Data that will be collected
Data, collected for all resources
"pods",
"replicasets",
"deployments",
"statefulsets",
"replicationcontrollers",
"events",
"configmaps",
"cronjobs",
"jobs",
"podsecuritypolicies",
"poddisruptionbudgets",
"perconaxtradbbackups",
"perconaxtradbclusterbackups",
"perconaxtradbclusterrestores",
"perconaxtradbclusters",
"clusterrolebindings",
"clusterroles",
"rolebindings",
"roles",
"storageclasses",
"persistentvolumeclaims",
"persistentvolumes",
"modes",
"your-custom-resource" (depends on 'resource' flag)
Data, collected for PXC
"perconaxtradbbackups",
"perconaxtradbclusterbackups",
"perconaxtradbclusterrestores",
"perconaxtradbclusters"
Individual files, collected for PXC
"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
"perconaservermongodbbackups",
"perconaservermongodbrestores",
"perconaservermongodbs"
Usage
pt-k8s-debug-collector <flags>
Flags:
--resource
targeted custom resource name (default "pxc")
--namespace
targeted namespace. By default, data will be collected from all namespaces
--cluster
targeted pxc/psmdb cluster. By default, data from all available clusters to be collected
Requirements
- Installed and configured 'kubectl'
- Installed and configured 'pt-mysql-summary'
- Installed and configured 'pt-mongodb-summary'