OID Assignments in 1.3.6.1.4.1.9163:           Chapter:FastBack: SESSION-STATS.txt   Up: Top   FastForward: TALLYMAN-MIB.txt   Contents: Table of Contents

Appendix E MYSQL-STAT-MIB.txt

This MIB is used by the mysqlstat project - a loadable module for snmpd which provides access to the process list statistics and replication status of mysqld servers. The module is available at https://puszcza.gnu.org.ua/projects/mysqlstat.

The most recent version of this MIB is available from http://git.gnu.org.ua/cgit/mysqlstat.git/tree/src/MYSQL-STAT-MIB.txt

Base OID: 1.3.6.1.4.1.9163.102

MYSQL-STAT-MIB DEFINITIONS ::= BEGIN

-- *************************************************************
--
-- MySQL statistics MIB
--
-- *************************************************************

IMPORTS
	MODULE-IDENTITY, OBJECT-TYPE, enterprises, Counter64,
  	Counter32, Integer32, Gauge32
		FROM SNMPv2-SMI
	TEXTUAL-CONVENTION, DisplayString, TruthValue, TimeStamp
		FROM SNMPv2-TC
	OBJECT-GROUP, MODULE-COMPLIANCE
	        FROM SNMPv2-CONF
	InetAddress, InetAddressType, InetPortNumber
		FROM INET-ADDRESS-MIB;

mysql MODULE-IDENTITY
        LAST-UPDATED "201606090926Z"
	ORGANIZATION "Gray Software"
	CONTACT-INFO "Sergey Poznyakoff <gray@gnu.org>"
	DESCRIPTION
	        "This MIB module defines objects for MySQL statistics."
	REVISION "201606090926Z"
	DESCRIPTION
	        "First revision."
	::= { enterprises 9163 102 }

replication     OBJECT IDENTIFIER       ::= { mysql 1 }
processList	OBJECT IDENTIFIER	::= { mysql 2 }

--
-- Replication Slave Status
--

replSlaveStatusTable	OBJECT-TYPE
	SYNTAX	SEQUENCE OF ReplSlaveStatusEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
		"A table of replication status.  On replication slave,
	         it contains a single row, describing the current
	         status."
	::= { replication 1 }

replSlaveStatusEntry	OBJECT-TYPE
	SYNTAX	ReplSlaveStatusEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
		"An entry describing slave status."
	INDEX { replSlaveIndex }
	::= { replSlaveStatusTable 1 }

ReplSlaveStatusEntry	::= SEQUENCE {
	replSlaveIndex		Integer32,
	replSlaveIOState	ThreadStatusString,
	replMasterLogFile	DisplayString,
	replReadMasterLogPos	Counter32,
	replRelayLogFile	DisplayString,
	replRelayLogPos		Counter32,
	replRelayMasterLogFile	DisplayString,
	replSlaveIORunning	SlaveRunningState,
	replSlaveSQLRunning	TruthValue,
	replLastSQLErrno	Integer32,
	replLastSQLError	SQLErrorString,
	replLastIOErrno		Integer32,
	replLastIOError		SQLErrorString,
	replExecMasterLogPos	Counter32,
	replRelayLogSpace	Gauge32,
	replSecondsBehindMaster	TimeStamp,
	replMasterHost		DisplayString,
	replMasterUser		DisplayString,
	replMasterPort		Integer32,
	replConnectRetry	TimeStamp,
	replReplicateDoDB	DisplayString,
	replReplicateIgnoreDB	DisplayString,
	replReplicateDoTable	DisplayString,
	replReplicateIgnoreTable	DisplayString,
	replReplicateWildDoTable	DisplayString,
	replReplicateWildIgnoreTable	DisplayString,
	replSkipCounter		Gauge32,
	replUntilCondition	DisplayString,
	replUntilLogFile	DisplayString,
	replUntilLogPos		DisplayString,
	replMasterServerId	Integer32,
	replMasterSSLAllowed	DisplayString,
	replMasterSSLCAFile	DisplayString,
	replMasterSSLCAPath	DisplayString,
	replMasterSSLCert	DisplayString,
	replMasterSSLCipher	DisplayString,
	replMasterSSLKey	DisplayString,
	replMasterSSLVerifyServerCert	TruthValue
}

replSlaveIndex	OBJECT-TYPE
	SYNTAX  Integer32 (0..65535)
	MAX-ACCESS not-accessible
	STATUS  current
	DESCRIPTION
		"A number uniquely identifying slave status row."
	::= { replSlaveStatusEntry 1 }

ThreadStatusString ::= TEXTUAL-CONVENTION
	DISPLAY-HINT "128t"
	STATUS current
	DESCRIPTION "A string representing thread status."
        SYNTAX OCTET STRING (SIZE (0..128))

replSlaveIOState	OBJECT-TYPE
	SYNTAX	ThreadStatusString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"Describes what the thread is doing: trying to connect
		 to the master, waiting for events from the master,
		 reconnecting to the master, etc."
	::= { replSlaveStatusEntry 2 }

replMasterLogFile	OBJECT-TYPE
	SYNTAX DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The name of the master binary log file from which the
		 I/O thread is currently reading."
	::= { replSlaveStatusEntry 3 }
	
replReadMasterLogPos	OBJECT-TYPE
	SYNTAX Counter32
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The position in the current master binary log file up
		 to which the I/O thread has read."
	::= { replSlaveStatusEntry 4 }

replRelayLogFile	OBJECT-TYPE
	SYNTAX DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The name of the relay log file from which the SQL
		 thread is currently reading and executing."
	::= { replSlaveStatusEntry 5 }
	
replRelayLogPos		OBJECT-TYPE
	SYNTAX Counter32
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The position in the current relay log file up to
		 which the SQL thread has read and executed."
	::= { replSlaveStatusEntry 6 }
	
replRelayMasterLogFile	OBJECT-TYPE
	SYNTAX DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The name of the master binary log file containing the
		 most recent event executed by the SQL thread."
	::= { replSlaveStatusEntry 7 }
	
SlaveRunningState ::= TEXTUAL-CONVENTION
    STATUS       current
    DESCRIPTION
            "Represents slave I/O thread state."
    SYNTAX       INTEGER { yes(1), no(2), connecting(3) }


replSlaveIORunning	OBJECT-TYPE
	SYNTAX SlaveRunningState
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"Whether the I/O thread is started and has connected
		 successfully to the master."
	::= { replSlaveStatusEntry 8 }
	
replSlaveSQLRunning	OBJECT-TYPE
	SYNTAX TruthValue
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"Whether the SQL thread is started."
	::= { replSlaveStatusEntry 9 }

replLastSQLErrno		OBJECT-TYPE
	SYNTAX	Integer32
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The error code of the last error that caused the SQL
		 thread to stop."
	::= { replSlaveStatusEntry 10 }
	
SQLErrorString ::= TEXTUAL-CONVENTION
	DISPLAY-HINT "1024t"
	STATUS current
	DESCRIPTION "A string representing SQL error."
        SYNTAX OCTET STRING (SIZE (0..1024))

replLastSQLError		OBJECT-TYPE
	SYNTAX	SQLErrorString
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The error message describing the last error that
		 caused the SQL thread to stop."
	::= { replSlaveStatusEntry 11 }

replLastIOErrno		OBJECT-TYPE
	SYNTAX	Integer32
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The error code of the last error that caused the IO
		 thread to stop."
	::= { replSlaveStatusEntry 12 }

replLastIOError		OBJECT-TYPE
	SYNTAX	SQLErrorString
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The error message describing the last error that
		 caused the IO thread to stop."
	::= { replSlaveStatusEntry 13 }

replExecMasterLogPos	OBJECT-TYPE
	SYNTAX	Counter32
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The position in the current master binary log file to
	         which the SQL thread has read and executed, marking
	         the start of the next transaction or event to be
	         processed."
	::= { replSlaveStatusEntry 14 }
	
replRelayLogSpace	OBJECT-TYPE
	SYNTAX	Gauge32
 	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The total combined size of all existing relay log
		 files."
	::= { replSlaveStatusEntry 15 }
	
replSecondsBehindMaster	OBJECT-TYPE
	SYNTAX	TimeStamp
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"This field is an indication of how `late' the slave
		 is.  Basically, it reflects the time difference in
		 seconds between the slave SQL thread and the slave
		 I/O thread."
	::= { replSlaveStatusEntry 16 }

replMasterHost	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The master host that the slave is connected to."
	::= { replSlaveStatusEntry 17 }
	
replMasterUser	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The user name of the account used to connect to the
		 master."
	::= { replSlaveStatusEntry 18 }
	
replMasterPort	OBJECT-TYPE
	SYNTAX	Integer32
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The port used to connect to the master."
	::= { replSlaveStatusEntry 19 }	
	
replConnectRetry	OBJECT-TYPE
	SYNTAX	TimeStamp
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The number of seconds between connect retries."
	::= { replSlaveStatusEntry 20 }
	
replReplicateDoDB	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The list of databases to replicate."
	::= { replSlaveStatusEntry 21 }
	
replReplicateIgnoreDB	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The list of databases to exclude from replication."
	::= { replSlaveStatusEntry 22 }

replReplicateDoTable	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The list of tables to replicate."
	::= { replSlaveStatusEntry 23 }

replReplicateIgnoreTable	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The list of tables to exclude from replication."
	::= { replSlaveStatusEntry 24 }
	
replReplicateWildDoTable	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The lists of table name patterns to replicate."
	::= { replSlaveStatusEntry 25 }
	
replReplicateWildIgnoreTable	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The lists of table name patterns to exclude from replication."
	::= { replSlaveStatusEntry 26 }
	
replSkipCounter	OBJECT-TYPE
	SYNTAX	Gauge32
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The current value of the `sql_slave_skip_counter'
	         system variable."
	::= { replSlaveStatusEntry 27 }

replUntilCondition	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The values specified in the `UNTIL' clause of the  `START
                 SLAVE' statement.

		 Possible values:

	         * `None' if no `UNTIL' clause was specified

		 * `Master' if the slave is reading until a given
                   position in the master's binary log

	         * `Relay' if the slave is reading until a given
                   position in its relay log."
	::= { replSlaveStatusEntry 28 }

replUntilLogFile	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The log file name at which the SQL thread stops executing."
	::= { replSlaveStatusEntry 29 }

replUntilLogPos	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The position in replUntilLogFile at
                 which the SQL thread stops executing."
	::= { replSlaveStatusEntry 30 }

replMasterServerId	OBJECT-TYPE
	SYNTAX	Integer32
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"ID of the master server."
	::= { replSlaveStatusEntry 31 }

replMasterSSLAllowed	OBJECT-TYPE
	SYNTAX	DisplayString
-- FIXME: special syntax for it?	
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"Possible values:
		 * `Yes' if an SSL connection to the master is
	           permitted .

                 * `No' if an SSL connection to the master is not
                   permitted.

                 * `Ignored' if an SSL connection is permitted but the
                   slave server does not have SSL support enabled."
	::= { replSlaveStatusEntry 32 }
	
replMasterSSLCAFile	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"File name of the Master CA file."
	::= { replSlaveStatusEntry 33 }

replMasterSSLCAPath	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"Path to look for SSL CA files."
	::= { replSlaveStatusEntry 34 }
	
replMasterSSLCert	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"File name of the master SSL certificate file."
	::= { replSlaveStatusEntry 35 }
	
replMasterSSLCipher	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"SSL ciphersuites in use."
	::= { replSlaveStatusEntry 36 }
	
replMasterSSLKey	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"File name of the master key file."
	::= { replSlaveStatusEntry 37 }
	
replMasterSSLVerifyServerCert	OBJECT-TYPE
	SYNTAX	TruthValue
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"Whether to verify server SSL certificate."
	::= { replSlaveStatusEntry 38 }

--
-- Replication master status
--
	
replMasterStatusTable	OBJECT-TYPE
	SYNTAX	SEQUENCE OF ReplMasterStatusEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
		"A table of replication master status.  On replication master,
	         it contains a single row, describing the current
	         status."
	::= { replication 2 }

replMasterStatusEntry	OBJECT-TYPE
	SYNTAX	ReplMasterStatusEntry
	MAX-ACCESS	not-accessible
	STATUS	current
	DESCRIPTION
		"An entry describing master status."
	INDEX { replMasterIndex }
	::= { replMasterStatusTable 1 }

ReplMasterStatusEntry	::= SEQUENCE {
	replMasterIndex			Integer32,
	replMasterCurrentLogFile	DisplayString,
	replMasterCurrentLogPos			Counter32,
	replMasterBinlogDoDB		DisplayString,
	replMasterBinlogIgnoreDB	DisplayString
}

replMasterIndex	OBJECT-TYPE
	SYNTAX  Integer32 (0..65535)
	MAX-ACCESS not-accessible
	STATUS  current
	DESCRIPTION
		"A number uniquely identifying master status row."
	::= { replMasterStatusEntry 1 }

replMasterCurrentLogFile	OBJECT-TYPE
	SYNTAX DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The name of the master binary log file."
	::= { replMasterStatusEntry 2 }

replMasterCurrentLogPos		OBJECT-TYPE
	SYNTAX Counter32
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The position in the current master binary log file."
	::= { replMasterStatusEntry 3 }
	
replMasterBinlogDoDB	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The list of database names to include in the binlog."
	::= { replMasterStatusEntry 4 }
	
replMasterBinlogIgnoreDB	OBJECT-TYPE
	SYNTAX	DisplayString
	MAX-ACCESS read-only
	STATUS current
	DESCRIPTION
		"The list of database names to exclude from the binlog."
	::= { replMasterStatusEntry 5 }
	
--
-- Process List
--

processListTable	OBJECT-TYPE
	SYNTAX	SEQUENCE OF ProcessListEntry
	MAX-ACCESS	not-accessible
	STATUS		current
	DESCRIPTION
		"A table of active threads."
	::= { processList 1 }

processListEntry	OBJECT-TYPE
	SYNTAX	ProcessListEntry
	MAX-ACCESS	not-accessible
	STATUS		current
	DESCRIPTION
		"A conceptual row of process list table."
	INDEX	{ processIndex }
	::= { processListTable 1 }

ProcessListEntry	::= SEQUENCE {
	processIndex		Integer32,
	processID		Integer32,
	processUser		DisplayString,
	processHost		DisplayString,
	processDatabase		DisplayString,
	processCommand		DisplayString,
	processTime		TimeStamp,
	processState		DisplayString,
	processInfo		DisplayString
}

processIndex	OBJECT-TYPE
	SYNTAX  Integer32 (0..65535)
	MAX-ACCESS not-accessible
	STATUS  current
	DESCRIPTION
		"A number uniquely identifying each process."
	::= { processListEntry 1 }

processID	OBJECT-TYPE
	SYNTAX  Integer32
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		"Thread ID."
	::= { processListEntry 2 }

processUser	OBJECT-TYPE
	SYNTAX	DisplayString
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
 		"Connecting user."
	::= { processListEntry 3 }

processHost	OBJECT-TYPE
	SYNTAX	DisplayString
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
 		"Remote hostname or IP."
	::= { processListEntry 4 }
	
processDatabase	OBJECT-TYPE
	SYNTAX	DisplayString
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
 		"Database name."
	::= { processListEntry 5 }

processCommand	OBJECT-TYPE
	SYNTAX	DisplayString
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
 		"Command being processed."
	::= { processListEntry 6 }

processTime	OBJECT-TYPE
	SYNTAX	TimeStamp
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
		"Running time of the thread."
	::= { processListEntry 7 }
	
processState	OBJECT-TYPE
	SYNTAX	DisplayString
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
 		"Process state."
	::= { processListEntry 8 }

processInfo	OBJECT-TYPE
	SYNTAX	DisplayString
 	MAX-ACCESS	read-only
 	STATUS		current
 	DESCRIPTION
		"Information about the process."
	::= { processListEntry 9 }

processTotalCount	OBJECT-TYPE
	SYNTAX  Gauge32
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		"Total number of processes (threads)."
	::= { processList 2 }

processActiveCount	OBJECT-TYPE
	SYNTAX  Gauge32
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		"Number of active processes (threads)."
	::= { processList 3 }	

processSlaveCount	OBJECT-TYPE
	SYNTAX  Gauge32
	MAX-ACCESS read-only
	STATUS  current
	DESCRIPTION
		"Number of replication slaves"
	::= { processList 4 }
	
END

-- Local variables:
-- eval: (add-hook 'write-file-hooks 'time-stamp)
-- time-stamp-start: "\\(LAST-UPDATED\\|REVISION\\)  *\""
-- time-stamp-end: "\""
-- time-stamp-format: "%:y%02m%02d%02H%02MZ"
-- time-stamp-line-limit: 32
-- time-stamp-count: 2
-- end: