Splunk Mysql add-on 通过SQL采集数据库性能查询到的表

Splunk

Splunk Mysql add-on 通过SQL采集数据库性能查询的表

information_schema库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
information_schema.GLOBAL_STATUS
information_schema.session_variables
information_schema.tables
information_schema.tables
information_schema.routines
information_schema.triggers
information_schema.events
information_schema.innodb_buffer_page
information_schema.innodb_buffer_page
information_schema.innodb_buffer_page
information_schema.innodb_trx
information_schema.innodb_locks
information_schema.innodb_lock_waits
information_schema.TABLES
information_schema.global_status
information_schema.innodb_metrics
information_schema.global_status
information_schema.global_status
information_schema.global_status
information_schema.innodb_metrics
information_schema.global_status
information_schema.global_variables
information_schema.global_status

performance_schema库

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
performance_schema.events_waits_summary_by_thread_by_event_name
performance_schema.threads
performance_schema.file_summary_by_instance
performance_schema.file_summary_by_event_name
performance_schema.table_io_waits_summary_by_index_usage
performance_schema.table_io_waits_summary_by_table
performance_schema.file_summary_by_instance
performance_schema.table_io_waits_summary_by_index_usage
performance_schema.table_io_waits_summary_by_table
performance_schema.file_summary_by_instance
performance_schema.table_io_waits_summary_by_index_usage
performance_schema.events_statements_summary_by_digest
performance_schema.events_statements_summary_by_digest stmts
performance_schema.events_waits_summary_by_user_by_event_name
performance_schema.events_statements_summary_by_user_by_event_name
performance_schema.events_waits_summary_by_host_by_event_name
performance_schema.events_statements_summary_by_host_by_event_name
performance_schema.accounts
performance_schema.events_waits_summary_global_by_event_name
performance_schema.table_io_waits_summary_by_table
performance_schema.file_summary_by_instance
performance_schema.accounts
performance_schema.events_statements_summary_by_user_by_event_name
performance_schema.events_stages_summary_by_host_by_event_name
performance_schema.threads
performance_schema.events_waits_current
performance_schema.events_statements_current

Mysql库

1
2
mysql.general_log
mysql.user

其他表

1
slow_log

相关命令

1
2
3
4
5
6
7
SHOW databases
SHOW SLAVE STATUS
SHOW ENGINE INNODB STATUS
SHOW FULL PROCESSLIST
SHOW GRANTS
SHOW ERRORS
SHOW WARNINGS

授权SQL

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//information_schema库
grant select on information_schema.GLOBAL_STATUS to 'username'@'%';
grant select on information_schema.session_variablesto 'username'@'%';
grant select on information_schema.tables to 'username'@'%';
grant select on information_schema.tables to 'username'@'%';
grant select on information_schema.routines to 'username'@'%';
grant select on information_schema.triggers to 'username'@'%';
grant select on information_schema.events to 'username'@'%';
grant select on information_schema.innodb_buffer_page to 'username'@'%';
grant select on information_schema.innodb_buffer_page to 'username'@'%';
grant select on information_schema.innodb_buffer_page to 'username'@'%';
grant select on information_schema.innodb_trx to 'username'@'%';
grant select on information_schema.innodb_locks to 'username'@'%';
grant select on information_schema.innodb_lock_waitsto 'username'@'%';
grant select on information_schema.TABLES to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.innodb_metrics to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.innodb_metrics to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';
grant select on information_schema.global_variables to 'username'@'%';
grant select on information_schema.global_statusto 'username'@'%';

//performance_schema库
grant select on performance_schema.events_waits_summary_by_thread_by_event_name to 'username'@'%';
grant select on performance_schema.threads to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.file_summary_by_event_nameto 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_index_usage to 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_table to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_index_usage to 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_table to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_index_usage to 'username'@'%';
grant select on performance_schema.events_statements_summary_by_digest to 'username'@'%';
grant select on performance_schema.events_statements_summary_by_digest stmts to 'username'@'%';
grant select on performance_schema.events_waits_summary_by_user_by_event_nameto 'username'@'%';
grant select on performance_schema.events_statements_summary_by_user_by_event_name to 'username'@'%';
grant select on performance_schema.events_waits_summary_by_host_by_event_nameto 'username'@'%';
grant select on performance_schema.events_statements_summary_by_host_by_event_name to 'username'@'%';
grant select on performance_schema.accountsto 'username'@'%';
grant select on performance_schema.events_waits_summary_global_by_event_name to 'username'@'%';
grant select on performance_schema.table_io_waits_summary_by_table to 'username'@'%';
grant select on performance_schema.file_summary_by_instanceto 'username'@'%';
grant select on performance_schema.accountsto 'username'@'%';
grant select on performance_schema.events_statements_summary_by_user_by_event_name to 'username'@'%';
grant select on performance_schema.events_stages_summary_by_host_by_event_name to 'username'@'%';
grant select on performance_schema.threads to 'username'@'%';
grant select on performance_schema.events_waits_currentto 'username'@'%';
grant select on performance_schema.events_statements_current to 'username'@'%';
grant select on slow_log to 'username'@'%';

//mysql库
grant select on mysql.general_log to 'username'@'%';
grant select on mysql.user to 'username'@'%';

//相关查询命令
SHOW databases;
SHOW SLAVE STATUS;
SHOW ENGINE INNODB STATUS;
SHOW FULL PROCESSLIST;
SHOW GRANTS;
SHOW ERRORS;
SHOW WARNINGS;


Splunk Mysql add-on 通过SQL采集数据库性能查询到的表
https://hesc.info/8f41ee4bab0b/
作者
需要哈气的纸飞机
发布于
2021年3月31日
许可协议