.\" This file is part of Mysqlstat -*- nroff -*- .\" Copyright (C) 2016-2020 Sergey Poznyakoff .\" .\" Mysqlstat is free software; you can redistribute it and/or modify .\" it under the terms of the GNU General Public License as published by .\" the Free Software Foundation; either version 3, or (at your option) .\" any later version. .\" .\" Mysqlstat is distributed in the hope that it will be useful, .\" but WITHOUT ANY WARRANTY; without even the implied warranty of .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the .\" GNU General Public License for more details. .\" .\" You should have received a copy of the GNU General Public License .\" along with Mysqlstat. If not, see . .TH MYSQLSTAT 8 "January 23, 2020" "mysqlstat" .SH NAME mysqlstat \- net-snmp module for collecting MySQL statistics .SH SYNOPSIS In \fBsnmpd.conf\fR(5): .PP .B dlmod mysqlstat_mib /usr/lib/snmp/mysqlstat.so .SH DESCRIPTION Dynamically loadable object module for .B net-snmp that provides access to .BR mysqld (8) statistics. The module is loaded into .BR snmpd (8) as shown in .BR SYNOPSIS . .PP The module provides access to the MySQL process list (as returned by .B SHOW PROCESSLIST command) and to replication status. The module connects to the MySQL server using credentials obtained from file .BR /etc/snmp/mysqlstat.cnf , section .B [mysqlstat] (the file has the same format as the traditional .B /etc/my.cnf file). The MySQL user must be granted the .BR PROCESS , and .B REPLICATION CLIENT privileges. .PP To configure the module, it is recommended to use the .BR mysqlstat\-setup (1) utility. .SS Caching In order to minimize its impact on MySQL server, the .B mysqlstat module caches the data obtained from the server. Default caching interval is 10 seconds for tabular information. Additionally, results of each .B SHOW PROCESSLIST are cached for 10 seconds. This means that updates of .B processListTable entries may delay for up to 20 seconds. .PP As of version 1.0, these delays are not configurable. .SH CONFIGURATION MySQL credentials are read from file .BR /etc/snmp/mysqlstat.cnf . The file has the standard MySQL ini file format. The section .B [mysqlstat] is read. .PP An example of \fBmysqlstat.cnf\fR follows: .PP .EX [mysqlstat] user=snmp password=guessme .EE .PP The file must be readable by the user .B snmpd runs as. .SH DEBUGGING The module defines the following debugging tokens: .TP .B mysqlstat_mib Enables general debugging information. .TP .B mysqlstat:sql Detailed information about SQL transactions. .SH OIDS See the file .BR MYSQL-STAT-MIB.txt , for a detailed list of provided OIDs. .SH SEE ALSO .BR snmpd.conf (5), .BR snmpd (8), .BR mysqlstat\-setup (1), .BR mysqld (8). .SH AUTHORS Sergey Poznyakoff .SH "BUG REPORTS" Report bugs to . .SH COPYRIGHT Copyright \(co 2016-2020 Sergey Poznyakoff .br .na License GPLv3+: GNU GPL version 3 or later .br .ad This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. .\" Local variables: .\" eval: (add-hook 'write-file-hooks 'time-stamp) .\" time-stamp-start: ".TH [A-Z_][A-Z0-9_.-]* [0-9] \"" .\" time-stamp-format: "%:B %:d, %:y" .\" time-stamp-end: "\"" .\" time-stamp-line-limit: 20 .\" end: