mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-18 01:33:14 +00:00
PT-2307 include last inactive check mesages on pt-galera-log-explainer
This commit is contained in:
@@ -117,6 +117,15 @@ var ViewsMap = types.RegexMap{
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"RegexLastInactiveCheck": &types.LogRegex{
|
||||||
|
Regex: regexp.MustCompile("last inactive check more than"),
|
||||||
|
InternalRegex: regexp.MustCompile("last inactive check more than PT(?P<configuredValue>.*)S (\\(3\\*evs.inactive_check_period\\) )?ago \\(PT(?P<inactiveTime>.*)S\\),"),
|
||||||
|
Handler: func(submatches map[string]string, logCtx types.LogCtx, log string, date time.Time) (types.LogCtx, types.LogDisplayer) {
|
||||||
|
|
||||||
|
return logCtx, types.SimpleDisplayer(utils.Paint(utils.YellowText, "inactive check more than "+submatches["configuredValue"]+"s ("+submatches["inactiveTime"]+"s)"))
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
"RegexWsrepUnsafeBootstrap": &types.LogRegex{
|
"RegexWsrepUnsafeBootstrap": &types.LogRegex{
|
||||||
Regex: regexp.MustCompile("ERROR.*not be safe to bootstrap"),
|
Regex: regexp.MustCompile("ERROR.*not be safe to bootstrap"),
|
||||||
Handler: func(submatches map[string]string, logCtx types.LogCtx, log string, date time.Time) (types.LogCtx, types.LogDisplayer) {
|
Handler: func(submatches map[string]string, logCtx types.LogCtx, log string, date time.Time) (types.LogCtx, types.LogDisplayer) {
|
||||||
|
@@ -191,6 +191,18 @@ func TestViewsRegex(t *testing.T) {
|
|||||||
key: "RegexWsrepConsistenctyCompromised",
|
key: "RegexWsrepConsistenctyCompromised",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
log: "2001-01-01T01:01:01.000000Z [Warning] WSREP: last inactive check more than PT1.5S (3*evs.inactive_check_period) ago (PT4.51947S), skipping check",
|
||||||
|
expectedOut: "inactive check more than 1.5s (4.51947s)",
|
||||||
|
key: "RegexLastInactiveCheck",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "mariadb variation",
|
||||||
|
log: "2001-01-01T01:01:01.000000Z [Warning] WSREP: last inactive check more than PT1.5S ago (PT4.51947S), skipping check",
|
||||||
|
expectedOut: "inactive check more than 1.5s (4.51947s)",
|
||||||
|
key: "RegexLastInactiveCheck",
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
log: "2001-01-01 5:06:12 47285568576576 [Note] WSREP: gcomm: bootstrapping new group 'cluster'",
|
log: "2001-01-01 5:06:12 47285568576576 [Note] WSREP: gcomm: bootstrapping new group 'cluster'",
|
||||||
expectedOut: "bootstrapping",
|
expectedOut: "bootstrapping",
|
||||||
|
@@ -504,6 +504,7 @@ mysql version 8.0.31 8.0.
|
|||||||
2023-05-16T07:51:58.379294Z | recovering gcache |
|
2023-05-16T07:51:58.379294Z | recovering gcache |
|
||||||
2023-05-16T07:52:26.431252Z | CLOSED -> OPEN |
|
2023-05-16T07:52:26.431252Z | CLOSED -> OPEN |
|
||||||
2023-05-16T07:52:26.431427Z | NON-PRIMARY(n=1) |
|
2023-05-16T07:52:26.431427Z | NON-PRIMARY(n=1) |
|
||||||
|
2023-05-16T07:52:26.931116Z | inactive check more than 1.5s (3.50171s) |
|
||||||
2023-05-16T10:03:18.655740Z starting(8.0.31) | |
|
2023-05-16T10:03:18.655740Z starting(8.0.31) | |
|
||||||
2023-05-16T10:03:18.658268Z started(cluster) | |
|
2023-05-16T10:03:18.658268Z started(cluster) | |
|
||||||
2023-05-16T10:03:18.659239Z no grastate.dat file | |
|
2023-05-16T10:03:18.659239Z no grastate.dat file | |
|
||||||
|
Reference in New Issue
Block a user