5.0
2020-12-17T15:29:59Z
Templates
Template_App_MySQL
Template_App_MySQL
Templates
mysql
-
MySQL: Aborted client connections
DEPENDENT
db.mysql[Aborted_clients]
0
30d
1825d
!connections
mysql
JSONPATH
$.Aborted_clients
SIMPLE_CHANGE
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Aborted connections
DEPENDENT
db.mysql[Aborted_connects]
0
30d
1825d
!conn
mysql
JSONPATH
$.Aborted_connects
SIMPLE_CHANGE
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Denied access
DEPENDENT
db.mysql[Access_denied_errors]
0
30d
1825d
!connections
mysql
JAVASCRIPT
json = JSON.parse(value);
return json.Access_denied_errors || 0;
SIMPLE_CHANGE
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Number of users
DEPENDENT
db.mysql[Acl_users]
0
30d
1825d
!users
mysql
JAVASCRIPT
json = JSON.parse(value);
return json.Acl_users || 0;
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Received bytes
DEPENDENT
db.mysql[Bytes_received]
0
30d
1825d
B/s
mysql
JSONPATH
$.Bytes_received
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Sent bytes
DEPENDENT
db.mysql[Bytes_sent]
0
30d
1825d
B/s
mysql
JSONPATH
$.Bytes_sent
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Admin commands
DEPENDENT
db.mysql[Com_admin_commands]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_admin_commands
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: ALTER USER commands
DEPENDENT
db.mysql[Com_alter_user]
0
30d
1825d
!qps
mysql
JAVASCRIPT
json = JSON.parse(value);
return json.Com_alter_user || 0;
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: BEGIN commands
DEPENDENT
db.mysql[Com_begin]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_begin
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: COMMIT commands
DEPENDENT
db.mysql[Com_commit]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_commit
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: CREATE USER commands
DEPENDENT
db.mysql[Com_create_user]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_create_user
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: DELETE commands
DEPENDENT
db.mysql[Com_delete]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_delete
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: INSERT commands
DEPENDENT
db.mysql[Com_insert]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_insert
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: PREPARE statements
DEPENDENT
db.mysql[Com_prepare_sql]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_prepare_sql
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: ROLLBACK commands
DEPENDENT
db.mysql[Com_rollback]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_rollback
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: SELECT commands
DEPENDENT
db.mysql[Com_select]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_select
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: UPDATE commands
DEPENDENT
db.mysql[Com_update]
0
30d
1825d
!qps
mysql
JSONPATH
$.Com_update
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Number of connection attempts
DEPENDENT
db.mysql[Connections]
0
30d
1825d
!conn
mysql
JSONPATH
$.Connections
SIMPLE_CHANGE
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: InnoDB buffer pool size
DEPENDENT
db.mysql[Innodb_buffer_pool_bytes_data]
0
30d
1825d
B
mysql
JSONPATH
$.Innodb_buffer_pool_bytes_data
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: InnoDB dirty buffer pool size
DEPENDENT
db.mysql[Innodb_buffer_pool_bytes_dirty]
0
30d
1825d
B
mysql
JSONPATH
$.Innodb_buffer_pool_bytes_dirty
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: InnoDB buffer pool status
DEPENDENT
db.mysql[Innodb_buffer_pool_load_status]
0
30d
0
CHAR
mysql
JAVASCRIPT
json = JSON.parse(value);
return json.Innodb_buffer_pool_load_status || 'Buffer pool(s) load completed at';
DISCARD_UNCHANGED_HEARTBEAT
6h
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
{str("Buffer pool(s) load completed at")}=0 and {str("not started")}=0
MySQL InnoDB buffer pool is not ready
WARNING
-
MySQL: InnoDB reads not served by the buffer pool
DEPENDENT
db.mysql[Innodb_buffer_pool_reads]
0
30d
1825d
!reads
mysql
JSONPATH
$.Innodb_buffer_pool_reads
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: InnoDB data fsync
DEPENDENT
db.mysql[Innodb_data_fsyncs]
0
30d
1825d
!fsync/s
mysql
JSONPATH
$.Innodb_data_fsyncs
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: InnoDB log fsync
DEPENDENT
db.mysql[Innodb_os_log_fsyncs]
0
30d
1825d
!fsync/s
mysql
JSONPATH
$.Innodb_os_log_fsyncs
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Queries that exceeded the execution time
DEPENDENT
db.mysql[Max_statement_time_exceeded]
0
30d
1825d
!qps
mysql
JAVASCRIPT
json = JSON.parse(value);
return json.Max_statement_time_exceeded || 0;
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Global memory usage
DEPENDENT
db.mysql[Memory_used]
0
30d
1825d
B
mysql
JAVASCRIPT
json = JSON.parse(value);
return json.Memory_used || 0;
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Opened files
DEPENDENT
db.mysql[Open_files]
0
30d
1825d
!files
mysql
JSONPATH
$.Open_files
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Opened tables
DEPENDENT
db.mysql[Open_tables]
0
30d
1825d
!tables
mysql
JSONPATH
$.Open_tables
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Requests served from the cache
DEPENDENT
db.mysql[Qcache_hits]
0
30d
1825d
!qps
mysql
JSONPATH
$.Qcache_hits
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: Total queries
DEPENDENT
db.mysql[Queries]
0
30d
1825d
!qps
mysql
JSONPATH
$.Queries
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
{avg(1h)}>10*{avg(24h)}
More MySQL queries than usual
INFO
-
MySQL: Slow queries
DEPENDENT
db.mysql[Slow_queries]
0
30d
1825d
!qps
mysql
JSONPATH
$.Slow_queries
CHANGE_PER_SECOND
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
{last()}>{$MYSQL_SLOW_QUERIES_THRES}
Too many slow queries
WARNING
-
MySQL: Active connections
DEPENDENT
db.mysql[Threads_running]
0
30d
1825d
!conn
mysql
JSONPATH
$.Threads_running
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
-
MySQL: $1
DEPENDENT
db.mysql[Uptime]
0
30d
1825d
s
mysql
JSONPATH
$.Uptime
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
{last()}<1800
MySQL service just restarted
INFO
-
MySQL: Monitoring error
DEPENDENT
db.mysql[zbx_error]
0
30d
0
CHAR
mysql
JSONPATH
$.zbx_error
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
{last()}<>"none"
Error occured while monitoring MySQL service
WARNING
YES
-
MySQL info
db.mysql[{$MYSQL_HOST},{$MYSQL_PORT},{$MYSQL_USER},{$MYSQL_PASSWORD},{$MYSQL_DEFAULTS},all]
5m
0
0
TEXT
mysql
{$MYSQL_DEFAULTS}
/root/.my.cnf
File where defaults will be read
{$MYSQL_HOST}
localhost
Host to connect to
{$MYSQL_PASSWORD}
SECRET_TEXT
Password
{$MYSQL_PORT}
3306
Port of the MySQL server
{$MYSQL_SLOW_QUERIES_THRES}
10
Number of slow queries (in qps) before alerting
{$MYSQL_USER}
root
User to authenticate as
{Template_App_MySQL:db.mysql[Acl_users].change()}=1 or {Template_App_MySQL:db.mysql[Com_alter_user].last()}>0 or {Template_App_MySQL:db.mysql[Com_create_user].last()}>0
NONE
MySQL users modified
WARNING
YES
MySQL : InnoDB buffer pool
1
GRADIENT_LINE
EF5350
-
Template_App_MySQL
db.mysql[Innodb_buffer_pool_bytes_dirty]
2
GRADIENT_LINE
FFCDD2
-
Template_App_MySQL
db.mysql[Innodb_buffer_pool_bytes_data]
MySQL : InnoDB fsyncs
STACKED
1
7E57C2
-
Template_App_MySQL
db.mysql[Innodb_data_fsyncs]
2
81D4FA
-
Template_App_MySQL
db.mysql[Innodb_os_log_fsyncs]
MySQL : Network
1
GRADIENT_LINE
1A7C11
-
Template_App_MySQL
db.mysql[Bytes_sent]
2
GRADIENT_LINE
F63100
-
Template_App_MySQL
db.mysql[Bytes_received]
MySQL : Queries
STACKED
1
C5E1A5
-
Template_App_MySQL
db.mysql[Com_select]
2
BBDEFB
-
Template_App_MySQL
db.mysql[Com_insert]
3
FFE082
-
Template_App_MySQL
db.mysql[Com_update]
4
0097A7
-
Template_App_MySQL
db.mysql[Com_begin]
5
B0BEC5
-
Template_App_MySQL
db.mysql[Com_commit]
6
F230E0
-
Template_App_MySQL
db.mysql[Com_rollback]
7
F63100
-
Template_App_MySQL
db.mysql[Com_prepare_sql]
8
1A7C11
-
Template_App_MySQL
db.mysql[Com_delete]
9
6C59DC
-
Template_App_MySQL
db.mysql[Com_admin_commands]
MySQL : Slow and total queries
1
BOLD_LINE
1A7C11
-
Template_App_MySQL
db.mysql[Queries]
2
BOLD_LINE
F63100
-
Template_App_MySQL
db.mysql[Slow_queries]