Compare commits

..

2 Commits

Author SHA1 Message Date
Jiří Čtvrtka
824ba7e80a PMM-12548 Response length json tag. 2025-04-15 14:43:58 +02:00
Jiří Čtvrtka
c9bb7a260d PMM-12548 Add json tags for PMM purposes. 2025-04-15 14:15:35 +02:00
7 changed files with 87 additions and 100 deletions

View File

@@ -1,11 +1,5 @@
Changelog for Percona Toolkit
v3.7.0-1 released 2025-05-14
This release addresses multiple security vulnerabilities reported in Percona Toolkit version 3.7.0, including issues related to the `libxml2` component (CVE-2024-56171, CVE-2025-24928), `openssl` (CVE-2024-12797), and `krb5` (CVE-2022-37967).
* Fixed bug PT-2442: percona-toolkit:latest Vulnerability [CVE-2024-56171 CVE-2024-12797 CVE-2022-37967 CVE-2025-24928]
v3.7.0 released 2024-12-23
* Feature PT-2340: Support MySQL 8.4

View File

@@ -11,7 +11,7 @@ MAKE_GOTOOLS
WriteMakefile(
NAME => 'Percona::Toolkit',
VERSION => '3.7.0-1',
VERSION => '3.7.0',
EXE_FILES => [
map {
(my $name = $_) =~ s/^bin.//;

View File

@@ -582,8 +582,8 @@ OS_NAME=
ARCH=
OS=
INSTALL=0
RPM_RELEASE=2
DEB_RELEASE=2
RPM_RELEASE=1
DEB_RELEASE=1
REVISION=0
GIT_BRANCH=${GIT_BRANCH}
GIT_REPO=https://github.com/percona/percona-toolkit.git

View File

@@ -50,7 +50,7 @@ copyright = u'2024, Percona LLC and/or its affiliates'
# The short X.Y version.
version = '3.7'
# The full version, including alpha/beta/rc tags.
release = '3.7.0-1'
release = '3.7.0'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@@ -1,16 +1,6 @@
Release Notes
***************
v3.7.0-1 released 2025-05-14
==============================
This release addresses multiple security vulnerabilities reported in Percona Toolkit version 3.7.0, including issues related to the `libxml2` component (CVE-2024-56171, CVE-2025-24928), `openssl` (CVE-2024-12797), and `krb5` (CVE-2022-37967).
Bug Fixed
------------
* :jirabug:`PT-2442`: percona-toolkit:latest Vulnerability [CVE-2024-56171 CVE-2024-12797 CVE-2022-37967 CVE-2025-24928]
v3.7.0 released 2024-12-23
==============================

View File

@@ -8,103 +8,104 @@ import (
)
// docsExamined is renamed from nscannedObjects in 3.2.0
// json tags are used for PMM purposes
// https://docs.mongodb.com/manual/reference/database-profiler/#system.profile.docsExamined
type SystemProfile struct {
AllUsers []interface{} `bson:"allUsers"`
Client string `bson:"client"`
CursorExhausted bool `bson:"cursorExhausted"`
AllUsers []interface{} `bson:"allUsers" json:"allUsers"`
Client string `bson:"client" json:"client"`
CursorExhausted bool `bson:"cursorExhausted" json:"cursorExhausted"`
ExecStats struct {
Advanced int `bson:"advanced"`
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate"`
Advanced int `bson:"advanced" json:"advanced"`
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate" json:"executionTimeMillisEstimate"`
InputStage struct {
Advanced int `bson:"advanced"`
Direction string `bson:"direction"`
DocsExamined int `bson:"docsExamined"`
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate"`
Advanced int `bson:"advanced" json:"advanced"`
Direction string `bson:"direction" json:"direction"`
DocsExamined int `bson:"docsExamined" json:"docsExamined"`
ExecutionTimeMillisEstimate int `bson:"executionTimeMillisEstimate" json:"executionTimeMillisEstimate"`
Filter struct {
Date struct {
Eq string `bson:"$eq"`
} `bson:"date"`
} `bson:"filter"`
Invalidates int `bson:"invalidates"`
IsEOF int `bson:"isEOF"`
NReturned int `bson:"nReturned"`
NeedTime int `bson:"needTime"`
NeedYield int `bson:"needYield"`
RestoreState int `bson:"restoreState"`
SaveState int `bson:"saveState"`
Stage string `bson:"stage"`
Works int `bson:"works"`
} `bson:"inputStage"`
Invalidates int `bson:"invalidates"`
IsEOF int `bson:"isEOF"`
LimitAmount int `bson:"limitAmount"`
NReturned int `bson:"nReturned"`
NeedTime int `bson:"needTime"`
NeedYield int `bson:"needYield"`
RestoreState int `bson:"restoreState"`
SaveState int `bson:"saveState"`
Stage string `bson:"stage"`
Works int `bson:"works"`
DocsExamined int `bson:"docsExamined"`
} `bson:"execStats"`
KeyUpdates int `bson:"keyUpdates"`
KeysExamined int `bson:"keysExamined"`
Eq string `bson:"$eq" json:"$eq"`
} `bson:"date" json:"date"`
} `bson:"filter" json:"filter"`
Invalidates int `bson:"invalidates" json:"invalidates"`
IsEOF int `bson:"isEOF" json:"isEOF"`
NReturned int `bson:"nReturned" json:"nReturned"`
NeedTime int `bson:"needTime" json:"needTime"`
NeedYield int `bson:"needYield" json:"needYield"`
RestoreState int `bson:"restoreState" json:"restoreState"`
SaveState int `bson:"saveState" json:"saveState"`
Stage string `bson:"stage" json:"stage"`
Works int `bson:"works" json:"works"`
} `bson:"inputStage" json:"inputStage"`
Invalidates int `bson:"invalidates" json:"invalidates"`
IsEOF int `bson:"isEOF" json:"isEOF"`
LimitAmount int `bson:"limitAmount" json:"limitAmount"`
NReturned int `bson:"nReturned" json:"nReturned"`
NeedTime int `bson:"needTime" json:"needTime"`
NeedYield int `bson:"needYield" json:"needYield"`
RestoreState int `bson:"restoreState" json:"restoreState"`
SaveState int `bson:"saveState" json:"saveState"`
Stage string `bson:"stage" json:"stage"`
Works int `bson:"works" json:"works"`
DocsExamined int `bson:"docsExamined" json:"docsExamined"`
} `bson:"execStats" json:"execStats"`
KeyUpdates int `bson:"keyUpdates" json:"keyUpdates"`
KeysExamined int `bson:"keysExamined" json:"keysExamined"`
Locks struct {
Collection struct {
AcquireCount struct {
Read int `bson:"R"`
ReadShared int `bson:"r"`
} `bson:"acquireCount"`
} `bson:"Collection"`
Read int `bson:"R" json:"R"`
ReadShared int `bson:"r" json:"r"`
} `bson:"acquireCount" json:"acquireCount"`
} `bson:"Collection" json:"Collection"`
Database struct {
AcquireCount struct {
ReadShared int `bson:"r"`
} `bson:"acquireCount"`
ReadShared int `bson:"r" json:"r"`
} `bson:"acquireCount" json:"acquireCount"`
AcquireWaitCount struct {
ReadShared int `bson:"r"`
} `bson:"acquireWaitCount"`
ReadShared int `bson:"r" json:"r"`
} `bson:"acquireWaitCount" json:"acquireWaitCount"`
TimeAcquiringMicros struct {
ReadShared int64 `bson:"r"`
} `bson:"timeAcquiringMicros"`
} `bson:"Database"`
ReadShared int64 `bson:"r" json:"r"`
} `bson:"timeAcquiringMicros" json:"timeAcquiringMicros"`
} `bson:"Database" json:"Database"`
Global struct {
AcquireCount struct {
ReadShared int `bson:"r"`
WriteShared int `bson:"w"`
} `bson:"acquireCount"`
} `bson:"Global"`
ReadShared int `bson:"r" json:"r"`
WriteShared int `bson:"w" json:"w"`
} `bson:"acquireCount" json:"acquireCount"`
} `bson:"Global" json:"Global"`
MMAPV1Journal struct {
AcquireCount struct {
ReadShared int `bson:"r"`
} `bson:"acquireCount"`
} `bson:"MMAPV1Journal"`
} `bson:"locks"`
Millis int `bson:"millis"`
Nreturned int `bson:"nreturned"`
Ns string `bson:"ns"`
NumYield int `bson:"numYield"`
Op string `bson:"op"`
PlanSummary string `bson:"planSummary"`
Protocol string `bson:"protocol"`
Query bson.D `bson:"query"`
UpdateObj bson.D `bson:"updateobj"`
Command bson.D `bson:"command"`
OriginatingCommand bson.D `bson:"originatingCommand"`
ResponseLength int `bson:"responseLength"`
Ts time.Time `bson:"ts"`
User string `bson:"user"`
WriteConflicts int `bson:"writeConflicts"`
DocsExamined int `bson:"docsExamined"`
QueryHash string `bson:"queryHash"`
ReadShared int `bson:"r" json:"r"`
} `bson:"acquireCount" json:"acquireCount"`
} `bson:"MMAPV1Journal" json:"MMAPV1Journal"`
} `bson:"locks" json:"locks"`
Millis int `bson:"millis" json:"durationMillis"`
Nreturned int `bson:"nreturned" json:"nreturned"`
Ns string `bson:"ns" json:"ns"`
NumYield int `bson:"numYield" json:"numYield"`
Op string `bson:"op" json:"op"`
PlanSummary string `bson:"planSummary" json:"planSummary"`
Protocol string `bson:"protocol" json:"protocol"`
Query bson.D `bson:"query" json:"query"`
UpdateObj bson.D `bson:"updateobj" json:"updateobj"`
Command bson.D `bson:"command" json:"command"`
OriginatingCommand bson.D `bson:"originatingCommand" json:"originatingCommand"`
ResponseLength int `bson:"responseLength" json:"reslen"`
Ts time.Time `bson:"ts" json:"ts"`
User string `bson:"user" json:"user"`
WriteConflicts int `bson:"writeConflicts" json:"writeConflicts"`
DocsExamined int `bson:"docsExamined" json:"docsExamined"`
QueryHash string `bson:"queryHash" json:"queryHash"`
Storage struct {
Data struct {
BytesRead int64 `bson:"bytesRead"`
TimeReadingMicros int64 `bson:"timeReadingMicros"`
} `bson:"data"`
} `bson:"storage"`
AppName string `bson:"appName"`
Comments string `bson:"comments"`
BytesRead int64 `bson:"bytesRead" json:"bytesRead"`
TimeReadingMicros int64 `bson:"timeReadingMicros" json:"timeReadingMicros"`
} `bson:"data" json:"data"`
} `bson:"storage" json:"storage"`
AppName string `bson:"appName" json:"appName"`
Comments string `bson:"comments" json:"comments"`
}
func NewExampleQuery(doc SystemProfile) ExampleQuery {

View File

@@ -16,6 +16,7 @@ import (
const (
planSummaryCollScan = "COLLSCAN"
planSummaryIXScan = "IXSCAN"
)
type StatsError struct {
@@ -105,8 +106,9 @@ func (s *Stats) Add(doc proto.SystemProfile) error {
if qiac.PlanSummary == planSummaryCollScan {
qiac.CollScanCount++
}
qiac.PlanSummary = strings.Split(qiac.PlanSummary, " ")[0]
if strings.HasPrefix(qiac.PlanSummary, planSummaryIXScan) {
qiac.PlanSummary = planSummaryIXScan
}
qiac.NReturned = append(qiac.NReturned, float64(doc.Nreturned))
qiac.QueryTime = append(qiac.QueryTime, float64(doc.Millis))