mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-13 14:39:28 +00:00
pt-galera-log-explainer: add --skip-operator-detection
This commit is contained in:
@@ -32,7 +32,8 @@ var CLI struct {
|
|||||||
Since *time.Time `help:"Only list events after this date, format: 2023-01-23T03:53:40Z (RFC3339)"`
|
Since *time.Time `help:"Only list events after this date, format: 2023-01-23T03:53:40Z (RFC3339)"`
|
||||||
Until *time.Time `help:"Only list events before this date"`
|
Until *time.Time `help:"Only list events before this date"`
|
||||||
Verbosity types.Verbosity `type:"counter" short:"v" default:"0" help:"-v: DebugMySQL (add every mysql info the tool used), -vv: Debug (internal tool debug)"`
|
Verbosity types.Verbosity `type:"counter" short:"v" default:"0" help:"-v: DebugMySQL (add every mysql info the tool used), -vv: Debug (internal tool debug)"`
|
||||||
PxcOperator bool `default:"false" help:"Analyze logs from Percona PXC operator. Off by default because it negatively impacts performance for non-k8s setups"`
|
PxcOperator bool `default:"false" help:"Analyze logs from Percona PXC operator. Will cause slow performance on non-k8s setups"`
|
||||||
|
SkipOperatorDetection bool `default:"false" help:"Skip auto detection of Percona PXC operator logs"`
|
||||||
ExcludeRegexes []string `help:"Remove regexes from analysis. List regexes using 'pt-galera-log-explainer regex-list'"`
|
ExcludeRegexes []string `help:"Remove regexes from analysis. List regexes using 'pt-galera-log-explainer regex-list'"`
|
||||||
MergeByDirectory bool `help:"Instead of relying on identification, merge contexts and columns by base directory. Very useful when dealing with many small logs organized per directories."`
|
MergeByDirectory bool `help:"Instead of relying on identification, merge contexts and columns by base directory. Very useful when dealing with many small logs organized per directories."`
|
||||||
SkipMerge bool `help:"Disable the ability to merge log files together. Can be used when every nodes have the same wsrep_node_name"`
|
SkipMerge bool `help:"Disable the ability to merge log files together. Can be used when every nodes have the same wsrep_node_name"`
|
||||||
@@ -79,9 +80,10 @@ func main() {
|
|||||||
paths = CLI.Conflicts.Paths
|
paths = CLI.Conflicts.Paths
|
||||||
}
|
}
|
||||||
|
|
||||||
if !CLI.PxcOperator && areOperatorFiles(paths) {
|
if !CLI.PxcOperator && !CLI.SkipOperatorDetection && areOperatorFiles(paths) {
|
||||||
CLI.PxcOperator = true
|
CLI.PxcOperator = true
|
||||||
log.Info().Msg("Detected logs coming from Percona XtraDB Cluster Operator, enabling --pxc-operator")
|
log.Info().Msg("Detected logs coming from Percona XtraDB Cluster Operator, enabling --pxc-operator")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
translate.AssumeIPStable = !CLI.PxcOperator
|
translate.AssumeIPStable = !CLI.PxcOperator
|
||||||
|
Reference in New Issue
Block a user