aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2016-06-06 21:06:56 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2016-06-06 21:06:56 +0300
commit363bfa3d008da517ca284f9e83bfa5183f977e24 (patch)
tree5705f739a022bcf2633b5c68d3bbdc785facacf7
parentd0c73a249dd7719923612c6b3a23cfeb8c8720d0 (diff)
downloadmysqlstat-363bfa3d008da517ca284f9e83bfa5183f977e24.tar.gz
mysqlstat-363bfa3d008da517ca284f9e83bfa5183f977e24.tar.bz2
Reimplement replication OIDs as a table. Implement process list OIDs.
-rw-r--r--configure.ac2
-rw-r--r--src/MYSQL-STAT-MIB.txt352
-rw-r--r--src/Makefile.am8
-rw-r--r--src/mysqlstat.c509
-rw-r--r--src/mysqlstat_mib.mib2c384
5 files changed, 885 insertions, 370 deletions
diff --git a/configure.ac b/configure.ac
index 16d4eed..de177fd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,7 +15,7 @@
15# along with Mysqlstat. If not, see <http://www.gnu.org/licenses/>. 15# along with Mysqlstat. If not, see <http://www.gnu.org/licenses/>.
16 16
17AC_PREREQ(2.69) 17AC_PREREQ(2.69)
18AC_INIT([mysqlstat], 0.0.90, [gray@gnu.org]) 18AC_INIT([mysqlstat], 0.0.91, [gray@gnu.org])
19AC_CONFIG_SRCDIR(src/mysqlstat_mib.mib2c) 19AC_CONFIG_SRCDIR(src/mysqlstat_mib.mib2c)
20AM_CONFIG_HEADER(config.h) 20AM_CONFIG_HEADER(config.h)
21AC_CONFIG_AUX_DIR([build-aux]) 21AC_CONFIG_AUX_DIR([build-aux])
diff --git a/src/MYSQL-STAT-MIB.txt b/src/MYSQL-STAT-MIB.txt
index 1580837..8fbc0e6 100644
--- a/src/MYSQL-STAT-MIB.txt
+++ b/src/MYSQL-STAT-MIB.txt
@@ -18,19 +18,90 @@ IMPORTS
18 FROM INET-ADDRESS-MIB; 18 FROM INET-ADDRESS-MIB;
19 19
20mysql MODULE-IDENTITY 20mysql MODULE-IDENTITY
21 LAST-UPDATED "201606060944Z" 21 LAST-UPDATED "201606061638Z"
22 ORGANIZATION "Gray Software" 22 ORGANIZATION "Gray Software"
23 CONTACT-INFO "Sergey Poznyakoff <gray@gnu.org>" 23 CONTACT-INFO "Sergey Poznyakoff <gray@gnu.org>"
24 DESCRIPTION 24 DESCRIPTION
25 "This MIB module defines objects for MySQL statistics." 25 "This MIB module defines objects for MySQL statistics."
26 REVISION "201606060944Z" 26 REVISION "201606061638Z"
27 DESCRIPTION 27 DESCRIPTION
28 "First revision." 28 "First revision."
29 ::= { enterprises 9163 101 } 29 ::= { enterprises 9163 101 }
30 30
31replication OBJECT IDENTIFIER ::= { mysql 1 } 31replication OBJECT IDENTIFIER ::= { mysql 1 }
32replStatus OBJECT IDENTIFIER ::= { replication 1 } 32processList OBJECT IDENTIFIER ::= { mysql 2 }
33replConfig OBJECT IDENTIFIER ::= { replication 2 } 33
34--
35-- Replication Slave Status
36--
37
38replSlaveStatusTable OBJECT-TYPE
39 SYNTAX SEQUENCE OF ReplSlaveStatusEntry
40 MAX-ACCESS not-accessible
41 STATUS current
42 DESCRIPTION
43 "A table of replication status. On replication slave,
44 it contains a single row, describing the current
45 status."
46 ::= { replication 1 }
47
48replSlaveStatusEntry OBJECT-TYPE
49 SYNTAX ReplSlaveStatusEntry
50 MAX-ACCESS not-accessible
51 STATUS current
52 DESCRIPTION
53 "An entry describing slave status."
54 INDEX { replSlaveIndex }
55 ::= { replSlaveStatusTable 1 }
56
57ReplSlaveStatusEntry ::= SEQUENCE {
58 replSlaveIndex Integer32,
59 replSlaveIOState ThreadStatusString,
60 replMasterLogFile DisplayString,
61 replReadMasterLogPos Counter32,
62 replRelayLogFile DisplayString,
63 replRelayLogPos Counter32,
64 replRelayMasterLogFile DisplayString,
65 replSlaveIORunning SlaveRunningState,
66 replSlaveSQLRunning TruthValue,
67 replLastSQLErrno Integer32,
68 replLastSQLError SQLErrorString,
69 replLastIOErrno Integer32,
70 replLastIOError SQLErrorString,
71 replExecMasterLogPos Counter32,
72 replRelayLogSpace Counter64,
73 replSecondsBehindMaster TimeStamp,
74 replMasterHost DisplayString,
75 replMasterUser DisplayString,
76 replMasterPort Integer32,
77 replConnectRetry TimeStamp,
78 replReplicateDoDB DisplayString,
79 replReplicateIgnoreDB DisplayString,
80 replReplicateDoTable DisplayString,
81 replReplicateIgnoreTable DisplayString,
82 replReplicateWildDoTable DisplayString,
83 replReplicateWildIgnoreTable DisplayString,
84 replSkipCounter Counter32,
85 replUntilCondition DisplayString,
86 replUntilLogFile DisplayString,
87 replUntilLogPos DisplayString,
88 replMasterServerId Integer32,
89 replMasterSSLAllowed DisplayString,
90 replMasterSSLCAFile DisplayString,
91 replMasterSSLCAPath DisplayString,
92 replMasterSSLCert DisplayString,
93 replMasterSSLCipher DisplayString,
94 replMasterSSLKey DisplayString,
95 replMasterSSLVerifyServerCert TruthValue
96}
97
98replSlaveIndex OBJECT-TYPE
99 SYNTAX Integer32 (0..65535)
100 MAX-ACCESS not-accessible
101 STATUS current
102 DESCRIPTION
103 "A number uniquely identifying slave status row."
104 ::= { replSlaveStatusEntry 1 }
34 105
35ThreadStatusString ::= TEXTUAL-CONVENTION 106ThreadStatusString ::= TEXTUAL-CONVENTION
36 DISPLAY-HINT "128t" 107 DISPLAY-HINT "128t"
@@ -46,7 +117,7 @@ replSlaveIOState OBJECT-TYPE
46 "Describes what the thread is doing: trying to connect 117 "Describes what the thread is doing: trying to connect
47 to the master, waiting for events from the master, 118 to the master, waiting for events from the master,
48 reconnecting to the master, etc." 119 reconnecting to the master, etc."
49 ::= { replStatus 1 } 120 ::= { replSlaveStatusEntry 2 }
50 121
51replMasterLogFile OBJECT-TYPE 122replMasterLogFile OBJECT-TYPE
52 SYNTAX DisplayString 123 SYNTAX DisplayString
@@ -55,7 +126,7 @@ replMasterLogFile OBJECT-TYPE
55 DESCRIPTION 126 DESCRIPTION
56 "The name of the master binary log file from which the 127 "The name of the master binary log file from which the
57 I/O thread is currently reading." 128 I/O thread is currently reading."
58 ::= { replStatus 2 } 129 ::= { replSlaveStatusEntry 3 }
59 130
60replReadMasterLogPos OBJECT-TYPE 131replReadMasterLogPos OBJECT-TYPE
61 SYNTAX Counter32 132 SYNTAX Counter32
@@ -64,7 +135,7 @@ replReadMasterLogPos OBJECT-TYPE
64 DESCRIPTION 135 DESCRIPTION
65 "The position in the current master binary log file up 136 "The position in the current master binary log file up
66 to which the I/O thread has read." 137 to which the I/O thread has read."
67 ::= { replStatus 3 } 138 ::= { replSlaveStatusEntry 4 }
68 139
69replRelayLogFile OBJECT-TYPE 140replRelayLogFile OBJECT-TYPE
70 SYNTAX DisplayString 141 SYNTAX DisplayString
@@ -73,7 +144,7 @@ replRelayLogFile OBJECT-TYPE
73 DESCRIPTION 144 DESCRIPTION
74 "The name of the relay log file from which the SQL 145 "The name of the relay log file from which the SQL
75 thread is currently reading and executing." 146 thread is currently reading and executing."
76 ::= { replStatus 4 } 147 ::= { replSlaveStatusEntry 5 }
77 148
78replRelayLogPos OBJECT-TYPE 149replRelayLogPos OBJECT-TYPE
79 SYNTAX Counter32 150 SYNTAX Counter32
@@ -82,7 +153,7 @@ replRelayLogPos OBJECT-TYPE
82 DESCRIPTION 153 DESCRIPTION
83 "The position in the current relay log file up to 154 "The position in the current relay log file up to
84 which the SQL thread has read and executed." 155 which the SQL thread has read and executed."
85 ::= { replStatus 5 } 156 ::= { replSlaveStatusEntry 6 }
86 157
87replRelayMasterLogFile OBJECT-TYPE 158replRelayMasterLogFile OBJECT-TYPE
88 SYNTAX DisplayString 159 SYNTAX DisplayString
@@ -91,7 +162,7 @@ replRelayMasterLogFile OBJECT-TYPE
91 DESCRIPTION 162 DESCRIPTION
92 "The name of the master binary log file containing the 163 "The name of the master binary log file containing the
93 most recent event executed by the SQL thread." 164 most recent event executed by the SQL thread."
94 ::= { replStatus 6 } 165 ::= { replSlaveStatusEntry 7 }
95 166
96SlaveRunningState ::= TEXTUAL-CONVENTION 167SlaveRunningState ::= TEXTUAL-CONVENTION
97 STATUS current 168 STATUS current
@@ -107,7 +178,7 @@ replSlaveIORunning OBJECT-TYPE
107 DESCRIPTION 178 DESCRIPTION
108 "Whether the I/O thread is started and has connected 179 "Whether the I/O thread is started and has connected
109 successfully to the master." 180 successfully to the master."
110 ::= { replStatus 7 } 181 ::= { replSlaveStatusEntry 8 }
111 182
112replSlaveSQLRunning OBJECT-TYPE 183replSlaveSQLRunning OBJECT-TYPE
113 SYNTAX TruthValue 184 SYNTAX TruthValue
@@ -115,7 +186,7 @@ replSlaveSQLRunning OBJECT-TYPE
115 STATUS current 186 STATUS current
116 DESCRIPTION 187 DESCRIPTION
117 "Whether the SQL thread is started." 188 "Whether the SQL thread is started."
118 ::= { replStatus 8 } 189 ::= { replSlaveStatusEntry 9 }
119 190
120replLastSQLErrno OBJECT-TYPE 191replLastSQLErrno OBJECT-TYPE
121 SYNTAX Integer32 192 SYNTAX Integer32
@@ -124,7 +195,7 @@ replLastSQLErrno OBJECT-TYPE
124 DESCRIPTION 195 DESCRIPTION
125 "The error code of the last error that caused the SQL 196 "The error code of the last error that caused the SQL
126 thread to stop." 197 thread to stop."
127 ::= { replStatus 9 } 198 ::= { replSlaveStatusEntry 10 }
128 199
129SQLErrorString ::= TEXTUAL-CONVENTION 200SQLErrorString ::= TEXTUAL-CONVENTION
130