statics that lack on MySQL 5.5 is turned off by default
This commit is contained in:
parent
cc0ee684eb
commit
5064d83a41
|
@ -25,6 +25,8 @@ type Mysql struct {
|
||||||
GatherTableIOWaits bool
|
GatherTableIOWaits bool
|
||||||
GatherIndexIOWaits bool
|
GatherIndexIOWaits bool
|
||||||
GatherTableSchema bool
|
GatherTableSchema bool
|
||||||
|
GatherFileEventsStats bool
|
||||||
|
GatherPerfEventsStatements bool
|
||||||
}
|
}
|
||||||
|
|
||||||
var sampleConfig = `
|
var sampleConfig = `
|
||||||
|
@ -46,6 +48,8 @@ var sampleConfig = `
|
||||||
GatherTableIOWaits = false
|
GatherTableIOWaits = false
|
||||||
GatherIndexIOWaits = false
|
GatherIndexIOWaits = false
|
||||||
GatherTableSchema = false
|
GatherTableSchema = false
|
||||||
|
GatherFileEventsStats = false
|
||||||
|
GatherPerfEventsStatements = false
|
||||||
`
|
`
|
||||||
|
|
||||||
var defaultTimeout = time.Second * time.Duration(5)
|
var defaultTimeout = time.Second * time.Duration(5)
|
||||||
|
@ -372,6 +376,7 @@ const (
|
||||||
table_name
|
table_name
|
||||||
FROM information_schema.tables
|
FROM information_schema.tables
|
||||||
WHERE table_schema = 'performance_schema' AND table_name = ?
|
WHERE table_schema = 'performance_schema' AND table_name = ?
|
||||||
|
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -446,15 +451,19 @@ func (m *Mysql) gatherServer(serv string, acc telegraf.Accumulator) error {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if m.GatherFileEventsStats {
|
||||||
err = m.gatherPerfFileEventsStatuses(db, serv, acc)
|
err = m.gatherPerfFileEventsStatuses(db, serv, acc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if m.GatherPerfEventsStatements {
|
||||||
err = m.gatherPerfEventsStatements(db, serv, acc)
|
err = m.gatherPerfEventsStatements(db, serv, acc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if m.GatherTableSchema {
|
if m.GatherTableSchema {
|
||||||
err = m.gatherTableSchema(db, serv, acc)
|
err = m.gatherTableSchema(db, serv, acc)
|
||||||
|
|
Loading…
Reference in New Issue