github.com/netdata/go.d.plugin@v0.58.1/modules/mysql/metadata.yaml (about) 1 plugin_name: go.d.plugin 2 modules: 3 - &module 4 meta: &meta 5 id: collector-go.d.plugin-mysql 6 plugin_name: go.d.plugin 7 module_name: mysql 8 monitored_instance: 9 name: MySQL 10 link: https://www.mysql.com/ 11 categories: 12 - data-collection.database-servers 13 icon_filename: mysql.svg 14 related_resources: 15 integrations: 16 list: 17 - plugin_name: apps.plugin 18 module_name: apps 19 - plugin_name: cgroups.plugin 20 module_name: cgroups 21 info_provided_to_referring_integrations: 22 description: "" 23 keywords: 24 - "db" 25 - "database" 26 - "mysql" 27 - "maria" 28 - "mariadb" 29 - "sql" 30 most_popular: true 31 overview: 32 multi_instance: true 33 data_collection: 34 metrics_description: | 35 This collector monitors the health and performance of MySQL servers and collects general statistics, replication and user metrics. 36 method_description: | 37 It connects to the MySQL instance via a TCP or UNIX socket and executes the following commands: 38 39 Executed queries: 40 41 - `SELECT VERSION();` 42 - `SHOW GLOBAL STATUS;` 43 - `SHOW GLOBAL VARIABLES;` 44 - `SHOW SLAVE STATUS;` or `SHOW ALL SLAVES STATUS;` (MariaDBv10.2+) or `SHOW REPLICA STATUS;` (MySQL 8.0.22+) 45 - `SHOW USER_STATISTICS;` (MariaDBv10.1.1+) 46 - `SELECT TIME,USER FROM INFORMATION_SCHEMA.PROCESSLIST;` 47 default_behavior: 48 auto_detection: 49 description: | 50 By default, it detects instances running on localhost by trying to connect as root and netdata using known MySQL TCP and UNIX sockets: 51 52 - /var/run/mysqld/mysqld.sock 53 - /var/run/mysqld/mysql.sock 54 - /var/lib/mysql/mysql.sock 55 - /tmp/mysql.sock 56 - 127.0.0.1:3306 57 - "[::1]:3306" 58 limits: 59 description: "" 60 performance_impact: 61 description: "" 62 additional_permissions: 63 description: "" 64 supported_platforms: 65 include: [] 66 exclude: [] 67 setup: 68 prerequisites: 69 list: 70 - title: Create netdata user 71 description: | 72 A user account should have the 73 following [permissions](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html): 74 75 - [`USAGE`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_usage) 76 - [`REPLICATION CLIENT`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_replication-client) 77 - [`PROCESS`](https://dev.mysql.com/doc/refman/8.0/en/privileges-provided.html#priv_process) 78 79 To create the `netdata` user with these permissions, execute the following in the MySQL shell: 80 81 ```mysql 82 CREATE USER 'netdata'@'localhost'; 83 GRANT USAGE, REPLICATION CLIENT, PROCESS ON *.* TO 'netdata'@'localhost'; 84 FLUSH PRIVILEGES; 85 ``` 86 87 The `netdata` user will have the ability to connect to the MySQL server on localhost without a password. It will only 88 be able to gather statistics without being able to alter or affect operations in any way. 89 configuration: 90 file: 91 name: go.d/mysql.conf 92 options: 93 description: | 94 The following options can be defined globally: update_every, autodetection_retry. 95 folding: 96 title: Config options 97 enabled: true 98 list: 99 - name: update_every 100 description: Data collection frequency. 101 default_value: 5 102 required: false 103 - name: autodetection_retry 104 description: Recheck interval in seconds. Zero means no recheck will be scheduled. 105 default_value: 0 106 required: false 107 - name: dsn 108 description: MySQL server DSN (Data Source Name). See [DSN syntax](https://github.com/go-sql-driver/mysql#dsn-data-source-name). 109 default_value: root@tcp(localhost:3306)/ 110 required: true 111 - name: my.cnf 112 description: Specifies the my.cnf file to read the connection settings from the [client] section. 113 default_value: "" 114 required: false 115 - name: timeout 116 description: Query timeout in seconds. 117 default_value: 1 118 required: false 119 examples: 120 folding: 121 title: Config 122 enabled: true 123 list: 124 - name: TCP socket 125 description: An example configuration. 126 config: | 127 jobs: 128 - name: local 129 dsn: netdata@tcp(127.0.0.1:3306)/ 130 - name: Unix socket 131 description: An example configuration. 132 config: | 133 jobs: 134 - name: local 135 dsn: netdata@unix(/var/lib/mysql/mysql.sock)/ 136 - name: Connection with password 137 description: An example configuration. 138 config: | 139 jobs: 140 - name: local 141 dsn: netconfig:password@tcp(127.0.0.1:3306)/ 142 - name: my.cnf 143 description: An example configuration. 144 config: | 145 jobs: 146 - name: local 147 my.cnf: '/etc/my.cnf' 148 - name: Multi-instance 149 description: | 150 > **Note**: When you define multiple jobs, their names must be unique. 151 152 Local and remote instances. 153 config: | 154 jobs: 155 - name: local 156 dsn: netdata@tcp(127.0.0.1:3306)/ 157 158 - name: remote 159 dsn: netconfig:password@tcp(203.0.113.0:3306)/ 160 troubleshooting: 161 problems: 162 list: [] 163 alerts: 164 - name: mysql_10s_slow_queries 165 metric: mysql.queries 166 info: number of slow queries in the last 10 seconds 167 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 168 - name: mysql_10s_table_locks_immediate 169 metric: mysql.table_locks 170 info: number of table immediate locks in the last 10 seconds 171 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 172 - name: mysql_10s_table_locks_waited 173 metric: mysql.table_locks 174 info: number of table waited locks in the last 10 seconds 175 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 176 - name: mysql_10s_waited_locks_ratio 177 metric: mysql.table_locks 178 info: ratio of waited table locks over the last 10 seconds 179 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 180 - name: mysql_connections 181 metric: mysql.connections_active 182 info: client connections utilization 183 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 184 - name: mysql_replication 185 metric: mysql.slave_status 186 info: "replication status (0: stopped, 1: working)" 187 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 188 - name: mysql_replication_lag 189 metric: mysql.slave_behind 190 info: difference between the timestamp of the latest transaction processed by the SQL thread and the timestamp of the same transaction when it was processed on the master 191 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 192 - name: mysql_galera_cluster_size_max_2m 193 metric: mysql.galera_cluster_size 194 info: maximum galera cluster size in the last 2 minutes starting one minute ago 195 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 196 - name: mysql_galera_cluster_size 197 metric: mysql.galera_cluster_size 198 info: current galera cluster size, compared to the maximum size in the last 2 minutes 199 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 200 - name: mysql_galera_cluster_state_warn 201 metric: mysql.galera_cluster_state 202 info: galera node state is either Donor/Desynced or Joined 203 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 204 - name: mysql_galera_cluster_state_crit 205 metric: mysql.galera_cluster_state 206 info: galera node state is either Undefined or Joining or Error 207 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 208 - name: mysql_galera_cluster_status 209 metric: mysql.galera_cluster_status 210 info: galera node is part of a nonoperational component. This occurs in cases of multiple membership changes that result in a loss of Quorum or in cases of split-brain situations. 211 link: https://github.com/netdata/netdata/blob/master/src/health/health.d/mysql.conf 212 metrics: 213 folding: 214 title: Metrics 215 enabled: false 216 description: "" 217 availability: 218 - MySQL 219 - MariaDB 220 - Percona 221 scopes: 222 - name: global 223 description: These metrics refer to the entire monitored application. 224 labels: [] 225 metrics: 226 - name: mysql.net 227 description: Bandwidth 228 unit: kilobits/s 229 chart_type: area 230 dimensions: 231 - name: in 232 - name: out 233 - name: mysql.queries 234 description: Queries 235 unit: queries/s 236 chart_type: line 237 dimensions: 238 - name: queries 239 - name: questions 240 - name: slow_queries 241 - name: mysql.queries_type 242 description: Queries By Type 243 unit: queries/s 244 chart_type: stacked 245 dimensions: 246 - name: select 247 - name: delete 248 - name: update 249 - name: insert 250 - name: replace 251 - name: mysql.handlers 252 description: Handlers 253 unit: handlers/s 254 chart_type: line 255 dimensions: 256 - name: commit 257 - name: delete 258 - name: prepare 259 - name: read_first 260 - name: read_key 261 - name: read_next 262 - name: read_prev 263 - name: read_rnd 264 - name: read_rnd_next 265 - name: rollback 266 - name: savepoint 267 - name: savepointrollback 268 - name: update 269 - name: write 270 - name: mysql.table_open_cache_overflows 271 description: Table open cache overflows 272 unit: overflows/s 273 chart_type: line 274 dimensions: 275 - name: open_cache 276 - name: mysql.table_locks 277 description: Table Locks 278 unit: locks/s 279 chart_type: line 280 dimensions: 281 - name: immediate 282 - name: waited 283 - name: mysql.join_issues 284 description: Table Select Join Issues 285 unit: joins/s 286 chart_type: line 287 dimensions: 288 - name: full_join 289 - name: full_range_join 290 - name: range 291 - name: range_check 292 - name: scan 293 - name: mysql.sort_issues 294 description: Table Sort Issues 295 unit: issues/s 296 chart_type: line 297 dimensions: 298 - name: merge_passes 299 - name: range 300 - name: scan 301 - name: mysql.tmp 302 description: Tmp Operations 303 unit: events/s 304 chart_type: line 305 dimensions: 306 - name: disk_tables 307 - name: files 308 - name: tables 309 - name: mysql.connections 310 description: Connections 311 unit: connections/s 312 chart_type: line 313 dimensions: 314 - name: all 315 - name: aborted 316 - name: mysql.connections_active 317 description: Active Connections 318 unit: connections 319 chart_type: line 320 dimensions: 321 - name: active 322 - name: limit 323 - name: max_active 324 - name: mysql.threads 325 description: Threads 326 unit: threads 327 chart_type: line 328 dimensions: 329 - name: connected 330 - name: cached 331 - name: running 332 - name: mysql.threads_created 333 description: Threads Creation Rate 334 unit: threads/s 335 chart_type: line 336 dimensions: 337 - name: created 338 - name: mysql.thread_cache_misses 339 description: Threads Cache Misses 340 unit: misses 341 chart_type: line 342 dimensions: 343 - name: misses 344 - name: mysql.innodb_io 345 description: InnoDB I/O Bandwidth 346 unit: KiB/s 347 chart_type: line 348 dimensions: 349 - name: read 350 - name: write 351 - name: mysql.innodb_io_ops 352 description: InnoDB I/O Operations 353 unit: operations/s 354 chart_type: line 355 dimensions: 356 - name: reads 357 - name: writes 358 - name: fsyncs 359 - name: mysql.innodb_io_pending_ops 360 description: InnoDB Pending I/O Operations 361 unit: operations 362 chart_type: line 363 dimensions: 364 - name: reads 365 - name: writes 366 - name: fsyncs 367 - name: mysql.innodb_log 368 description: InnoDB Log Operations 369 unit: operations/s 370 chart_type: line 371 dimensions: 372 - name: waits 373 - name: write_requests 374 - name: writes 375 - name: mysql.innodb_cur_row_lock 376 description: InnoDB Current Row Locks 377 unit: operations 378 chart_type: line 379 dimensions: 380 - name: current waits 381 - name: mysql.innodb_rows 382 description: InnoDB Row Operations 383 unit: operations/s 384 chart_type: area 385 dimensions: 386 - name: inserted 387 - name: read 388 - name: updated 389 - name: deleted 390 - name: mysql.innodb_buffer_pool_pages 391 description: InnoDB Buffer Pool Pages 392 unit: pages 393 chart_type: line 394 dimensions: 395 - name: data 396 - name: dirty 397 - name: free 398 - name: misc 399 - name: total 400 - name: mysql.innodb_buffer_pool_pages_flushed 401 description: InnoDB Buffer Pool Flush Pages Requests 402 unit: requests/s 403 chart_type: line 404 dimensions: 405 - name: flush_pages 406 - name: mysql.innodb_buffer_pool_bytes 407 description: InnoDB Buffer Pool Bytes 408 unit: MiB 409 chart_type: line 410 dimensions: 411 - name: data 412 - name: dirty 413 - name: mysql.innodb_buffer_pool_read_ahead 414 description: InnoDB Buffer Pool Read Pages 415 unit: pages/s 416 chart_type: line 417 dimensions: 418 - name: all 419 - name: evicted 420 - name: mysql.innodb_buffer_pool_read_ahead_rnd 421 description: InnoDB Buffer Pool Random Read-Aheads 422 unit: operations/s 423 chart_type: line 424 dimensions: 425 - name: read-ahead 426 - name: mysql.innodb_buffer_pool_ops 427 description: InnoDB Buffer Pool Operations 428 unit: operations/s 429 chart_type: area 430 dimensions: 431 - name: disk_reads 432 - name: wait_free 433 - name: mysql.innodb_os_log 434 description: InnoDB OS Log Pending Operations 435 unit: operations 436 chart_type: line 437 dimensions: 438 - name: fsyncs 439 - name: writes 440 - name: mysql.innodb_os_log_fsync_writes 441 description: InnoDB OS Log Operations 442 unit: operations/s 443 chart_type: line 444 dimensions: 445 - name: fsyncs 446 - name: mysql.innodb_os_log_io 447 description: InnoDB OS Log Bandwidth 448 unit: KiB/s 449 chart_type: area 450 dimensions: 451 - name: write 452 - name: mysql.innodb_deadlocks 453 description: InnoDB Deadlocks 454 unit: operations/s 455 chart_type: area 456 dimensions: 457 - name: deadlocks 458 - name: mysql.files 459 description: Open Files 460 unit: files 461 chart_type: line 462 dimensions: 463 - name: files 464 - name: mysql.files_rate 465 description: Opened Files Rate 466 unit: files/s 467 chart_type: line 468 dimensions: 469 - name: files 470 - name: mysql.connection_errors 471 description: Connection Errors 472 unit: errors/s 473 chart_type: line 474 dimensions: 475 - name: accept 476 - name: internal 477 - name: max 478 - name: peer_addr 479 - name: select 480 - name: tcpwrap 481 - name: mysql.opened_tables 482 description: Opened Tables 483 unit: tables/s 484 chart_type: line 485 dimensions: 486 - name: tables 487 - name: mysql.open_tables 488 description: Open Tables 489 unit: tables 490 chart_type: area 491 dimensions: 492 - name: cache 493 - name: tables 494 - name: mysql.process_list_fetch_query_duration 495 description: Process List Fetch Duration 496 unit: milliseconds 497 chart_type: line 498 dimensions: 499 - name: duration 500 - name: mysql.process_list_queries_count 501 description: Queries Count 502 unit: queries 503 chart_type: stacked 504 dimensions: 505 - name: system 506 - name: user 507 - name: mysql.process_list_longest_query_duration 508 description: Longest Query Duration 509 unit: seconds 510 chart_type: line 511 dimensions: 512 - name: duration 513 - name: mysql.qcache_ops 514 description: QCache Operations 515 unit: queries/s 516 chart_type: line 517 dimensions: 518 - name: hits 519 - name: lowmem_prunes 520 - name: inserts 521 - name: not_cached 522 - name: mysql.qcache 523 description: QCache Queries in Cache 524 unit: queries 525 chart_type: line 526 dimensions: 527 - name: queries 528 - name: mysql.qcache_freemem 529 description: QCache Free Memory 530 unit: MiB 531 chart_type: area 532 dimensions: 533 - name: free 534 - name: mysql.qcache_memblocks 535 description: QCache Memory Blocks 536 unit: blocks 537 chart_type: line 538 dimensions: 539 - name: free 540 - name: total 541 - name: mysql.galera_writesets 542 description: Replicated Writesets 543 unit: writesets/s 544 chart_type: line 545 dimensions: 546 - name: rx 547 - name: tx 548 - name: mysql.galera_bytes 549 description: Replicated Bytes 550 unit: KiB/s 551 chart_type: area 552 dimensions: 553 - name: rx 554 - name: tx 555 - name: mysql.galera_queue 556 description: Galera Queue 557 unit: writesets 558 chart_type: line 559 dimensions: 560 - name: rx 561 - name: tx 562 - name: mysql.galera_conflicts 563 description: Replication Conflicts 564 unit: transactions 565 chart_type: area 566 dimensions: 567 - name: bf_aborts 568 - name: cert_fails 569 - name: mysql.galera_flow_control 570 description: Flow Control 571 unit: ms 572 chart_type: area 573 dimensions: 574 - name: paused 575 - name: mysql.galera_cluster_status 576 description: Cluster Component Status 577 unit: status 578 chart_type: line 579 dimensions: 580 - name: primary 581 - name: non_primary 582 - name: disconnected 583 - name: mysql.galera_cluster_state 584 description: Cluster Component State 585 unit: state 586 chart_type: line 587 dimensions: 588 - name: undefined 589 - name: joining 590 - name: donor 591 - name: joined 592 - name: synced 593 - name: error 594 - name: mysql.galera_cluster_size 595 description: Number of Nodes in the Cluster 596 unit: nodes 597 chart_type: line 598 dimensions: 599 - name: nodes 600 - name: mysql.galera_cluster_weight 601 description: The Total Weight of the Current Members in the Cluster 602 unit: weight 603 chart_type: line 604 dimensions: 605 - name: weight 606 - name: mysql.galera_connected 607 description: Cluster Connection Status 608 unit: boolean 609 chart_type: line 610 dimensions: 611 - name: connected 612 - name: mysql.galera_ready 613 description: Accept Queries Readiness Status 614 unit: boolean 615 chart_type: line 616 dimensions: 617 - name: ready 618 - name: mysql.galera_open_transactions 619 description: Open Transactions 620 unit: transactions 621 chart_type: line 622 dimensions: 623 - name: open 624 - name: mysql.galera_thread_count 625 description: Total Number of WSRep (applier/rollbacker) Threads 626 unit: threads 627 chart_type: line 628 dimensions: 629 - name: threads 630 - name: mysql.key_blocks 631 description: MyISAM Key Cache Blocks 632 unit: blocks 633 chart_type: line 634 dimensions: 635 - name: unused 636 - name: used 637 - name: not_flushed 638 - name: mysql.key_requests 639 description: MyISAM Key Cache Requests 640 unit: requests/s 641 chart_type: area 642 dimensions: 643 - name: reads 644 - name: writes 645 - name: mysql.key_disk_ops 646 description: MyISAM Key Cache Disk Operations 647 unit: operations/s 648 chart_type: area 649 dimensions: 650 - name: reads 651 - name: writes 652 - name: mysql.binlog_cache 653 description: Binlog Cache 654 unit: transactions/s 655 chart_type: line 656 dimensions: 657 - name: disk 658 - name: all 659 - name: mysql.binlog_stmt_cache 660 description: Binlog Statement Cache 661 unit: statements/s 662 chart_type: line 663 dimensions: 664 - name: disk 665 - name: all 666 - name: connection 667 description: These metrics refer to the replication connection. 668 labels: [] 669 metrics: 670 - name: mysql.slave_behind 671 description: Slave Behind Seconds 672 unit: seconds 673 chart_type: line 674 dimensions: 675 - name: seconds 676 - name: mysql.slave_status 677 description: I/O / SQL Thread Running State 678 unit: boolean 679 chart_type: line 680 dimensions: 681 - name: sql_running 682 - name: io_running 683 - name: user 684 description: These metrics refer to the MySQL user. 685 labels: 686 - name: user 687 description: username 688 metrics: 689 - name: mysql.userstats_cpu 690 description: User CPU Time 691 unit: percentage 692 chart_type: line 693 availability: 694 - MariaDB 695 - Percona 696 dimensions: 697 - name: used 698 - name: mysql.userstats_rows 699 description: User Rows Operations 700 unit: operations/s 701 chart_type: stacked 702 availability: 703 - MariaDB 704 - Percona 705 dimensions: 706 - name: read 707 - name: sent 708 - name: updated 709 - name: inserted 710 - name: deleted 711 - name: mysql.userstats_commands 712 description: User Commands 713 unit: commands/s 714 chart_type: stacked 715 availability: 716 - MariaDB 717 - Percona 718 dimensions: 719 - name: select 720 - name: update 721 - name: other 722 - name: mysql.userstats_denied_commands 723 description: User Denied Commands 724 unit: commands/s 725 chart_type: stacked 726 availability: 727 - MariaDB 728 - Percona 729 dimensions: 730 - name: denied 731 - name: mysql.userstats_created_transactions 732 description: User Transactions 733 unit: transactions/s 734 chart_type: area 735 availability: 736 - MariaDB 737 - Percona 738 dimensions: 739 - name: commit 740 - name: rollback 741 - name: mysql.userstats_binlog_written 742 description: User Binlog Written 743 unit: B/s 744 chart_type: line 745 availability: 746 - MariaDB 747 - Percona 748 dimensions: 749 - name: written 750 - name: mysql.userstats_empty_queries 751 description: User Empty Queries 752 unit: queries/s 753 chart_type: line 754 availability: 755 - MariaDB 756 - Percona 757 dimensions: 758 - name: empty 759 - name: mysql.userstats_connections 760 description: User Created Connections 761 unit: connections/s 762 chart_type: line 763 availability: 764 - MariaDB 765 - Percona 766 dimensions: 767 - name: created 768 - name: mysql.userstats_lost_connections 769 description: User Lost Connections 770 unit: connections/s 771 chart_type: line 772 availability: 773 - MariaDB 774 - Percona 775 dimensions: 776 - name: lost 777 - name: mysql.userstats_denied_connections 778 description: User Denied Connections 779 unit: connections/s 780 chart_type: line 781 availability: 782 - MariaDB 783 - Percona 784 dimensions: 785 - name: denied 786 - <<: *module 787 meta: 788 <<: *meta 789 id: collector-go.d.plugin-mariadb 790 monitored_instance: 791 name: MariaDB 792 link: https://mariadb.org/ 793 icon_filename: mariadb.svg 794 categories: 795 - data-collection.database-servers 796 - <<: *module 797 meta: 798 <<: *meta 799 id: collector-go.d.plugin-percona_mysql 800 most_popular: false 801 monitored_instance: 802 name: Percona MySQL 803 link: https://www.percona.com/software/mysql-database/percona-server 804 icon_filename: percona.svg 805 categories: 806 - data-collection.database-servers