Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 33b5132

Browse files
author
Brice Figureau
committed
New graphs: InnoDB row lock time/row lock waits
1 parent e79faab commit 33b5132

File tree

5 files changed

+52
-1
lines changed

5 files changed

+52
-1
lines changed

MYSQL-SERVER-MIB.txt

+15
Original file line numberDiff line numberDiff line change
@@ -1260,5 +1260,20 @@ myKeyBufferSize OBJECT-TYPE
12601260
"Size of the Key Buffer"
12611261
::= { myStatus 148 }
12621262

1263+
myInnoDBRowLockTime OBJECT-TYPE
1264+
SYNTAX mySQLUnsigned64
1265+
MAX-ACCESS read-only
1266+
STATUS current
1267+
DESCRIPTION
1268+
"Total time (ms) spent in acquiring row locks"
1269+
::= { myStatus 149 }
1270+
1271+
myInnoDBRowLockWaits OBJECT-TYPE
1272+
SYNTAX mySQLUnsigned64
1273+
MAX-ACCESS read-only
1274+
STATUS current
1275+
DESCRIPTION
1276+
"The number of times a row lock had to be waited for"
1277+
::= { myStatus 150 }
12631278

12641279
END

mysql-snmp

+3
Original file line numberDiff line numberDiff line change
@@ -475,6 +475,7 @@ my @types = (
475475
'Counter64', 'Counter64', 'Counter64', 'Counter64', # 137 - 140
476476
'Counter64', 'Counter64', 'Counter64', 'Counter64', # 141 - 144
477477
'Counter64', 'Counter64', 'Counter64', 'Counter64', # 145 - 148
478+
'Counter64', 'Counter64', # 149 - 150
478479
);
479480

480481
my @newkeys = (
@@ -552,6 +553,7 @@ my @newkeys = (
552553
'myThreadHashMemory', 'myInnoDBSemWaits', # 143 - 144
553554
'myInnoDBSemWaitTime', 'myKeyBufBytesUnflushed', # 145 - 146
554555
'myKeyBufBytesUsed', 'myKeyBufferSize', # 147 - 148
556+
'myInnoDBRowLockTime', 'myInnoDBRowLockWaits', # 149 - 150
555557
);
556558

557559
my @oldkeys = (
@@ -629,6 +631,7 @@ my @oldkeys = (
629631
'thread_hash_memory', 'innodb_sem_waits', # 143 - 144
630632
'innodb_sem_wait_time_ms', 'key_buf_bytes_unflushed', # 145 - 146
631633
'key_buf_bytes_used', 'key_buffer_size', # 147 - 148
634+
'Innodb_row_lock_time', 'Innodb_row_lock_waits', # 149 - 150
632635
);
633636

634637
run() unless caller();

opennms/mysql.datacollection-config.xml

+2
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@
153153
<mibObj oid=".1.3.6.1.4.1.20267.200.1.146" instance="0" alias="myKeyBufBytsUnflshd" type="Gauge64" />
154154
<mibObj oid=".1.3.6.1.4.1.20267.200.1.147" instance="0" alias="myKeyBufBytesUsed" type="Gauge64" />
155155
<mibObj oid=".1.3.6.1.4.1.20267.200.1.148" instance="0" alias="myKeyBufferSize" type="Gauge64" />
156+
<mibObj oid=".1.3.6.1.4.1.20267.200.1.149" instance="0" alias="myInnoDBRowLockTime" type="Counter64" />
157+
<mibObj oid=".1.3.6.1.4.1.20267.200.1.150" instance="0" alias="myInnoDBRowLockWats" type="Counter64" />
156158
</group>
157159

158160
<systemDef name="Net-Snmp">

opennms/mysql.snmp-graph.properties

+30-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Add this to the reports list
2-
# reports=mysql.mysqlfilesandtables, mysql.myisamindexes, mysql.mysqlnetworktraffic, mysql.mysqlquerycachememory, mysql.innodbiopending, mysql.innodbinternalhashmemoryusage, mysql.innodbactivelockedtransactions, mysql.innodblog, mysql.mysqlsorts, mysql.mysqltemporaryobjects, mysql.innodbcheckpointage, mysql.innodbtablesinuse, mysql.innodbrowoperations, mysql.innodbtransactions, mysql.innodbsemaphores, mysql.mysqlprocesslist, mysql.innodbadaptivehashindex, mysql.mysqlselecttypes, mysql.mysqlthreads, mysql.innodbinsertbufferusage, mysql.mysqlcommandcounters, mysql.innodbinsertbuffer, mysql.innodbmemoryallocation, mysql.mysqlconnections, mysql.innodblockstructures, mysql.innodbsemaphorewaittime, mysql.innodbbufferpool, mysql.mysqltablelocks, mysql.myisamkeycache, mysql.innodbsemaphorewaits, mysql.mysqlreplication, mysql.innodbio, mysql.mysqlquerycache, mysql.innodbbufferpoolactivity, mysql.mysqlbinaryrelaylogs, mysql.innodbcurrentlockwaits
2+
# reports=mysql.mysqlfilesandtables, mysql.myisamindexes, mysql.mysqlnetworktraffic, mysql.mysqlquerycachememory, mysql.innodbiopending, mysql.innodbinternalhashmemoryusage, mysql.innodbactivelockedtransactions, mysql.innodblog, mysql.mysqlsorts, mysql.mysqltemporaryobjects, mysql.innodbcheckpointage, mysql.innodbtablesinuse, mysql.innodbrowoperations, mysql.innodbtransactions, mysql.innodbsemaphores, mysql.mysqlprocesslist, mysql.innodbrowlocktime, mysql.innodbadaptivehashindex, mysql.mysqlselecttypes, mysql.mysqlthreads, mysql.innodbinsertbufferusage, mysql.mysqlcommandcounters, mysql.innodbinsertbuffer, mysql.innodbmemoryallocation, mysql.mysqlconnections, mysql.innodblockstructures, mysql.innodbsemaphorewaittime, mysql.innodbbufferpool, mysql.mysqltablelocks, mysql.myisamkeycache, mysql.innodbsemaphorewaits, mysql.mysqlreplication, mysql.innodbrowlockwaits, mysql.innodbio, mysql.mysqlquerycache, mysql.innodbbufferpoolactivity, mysql.mysqlbinaryrelaylogs, mysql.innodbcurrentlockwaits
33

44
# paste this at the end of snmp-graph.properties file
55
report.mysql.myisamindexes.name=MyISAM Indexes
@@ -1081,3 +1081,32 @@ report.mysql.myisamkeycache.command=--title "MyISAM Key Cache" \
10811081
GPRINT:myKeyBufBytsUnflshd:MIN:"Min \\: %8.2lf %s" \
10821082
GPRINT:myKeyBufBytsUnflshd:MAX:"Max \\: %8.2lf %s\\n"
10831083

1084+
report.mysql.innodbrowlocktime.name=InnoDB Row Lock Time
1085+
report.mysql.innodbrowlocktime.columns=myInnoDBRowLockTime
1086+
report.mysql.innodbrowlocktime.type=nodeSnmp
1087+
report.mysql.innodbrowlocktime.width=565
1088+
report.mysql.innodbrowlocktime.height=200
1089+
report.mysql.innodbrowlocktime.command=--title "InnoDB Row Lock Time" \
1090+
--width 565 \
1091+
--height 200 \
1092+
DEF:myInnoDBRowLockTime={rrd1}:myInnoDBRowLockTime:AVERAGE \
1093+
AREA:myInnoDBRowLockTime#B11D03:"Innodb Row Lock Time" \
1094+
GPRINT:myInnoDBRowLockTime:AVERAGE:"Avg \\: %8.2lf %s" \
1095+
GPRINT:myInnoDBRowLockTime:MIN:"Min \\: %8.2lf %s" \
1096+
GPRINT:myInnoDBRowLockTime:MAX:"Max \\: %8.2lf %s\\n"
1097+
1098+
1099+
report.mysql.innodbrowlockwaits.name=InnoDB Row Lock Waits
1100+
report.mysql.innodbrowlockwaits.columns=myInnoDBRowLockWats
1101+
report.mysql.innodbrowlockwaits.type=nodeSnmp
1102+
report.mysql.innodbrowlockwaits.width=565
1103+
report.mysql.innodbrowlockwaits.height=200
1104+
report.mysql.innodbrowlockwaits.command=--title "InnoDB Row Lock Waits" \
1105+
--width 565 \
1106+
--height 200 \
1107+
DEF:myInnoDBRowLockWats={rrd1}:myInnoDBRowLockWats:AVERAGE \
1108+
AREA:myInnoDBRowLockWats#E84A5F:"Innodb Row Lock Waits" \
1109+
GPRINT:myInnoDBRowLockWats:AVERAGE:"Avg \\: %8.2lf %s" \
1110+
GPRINT:myInnoDBRowLockWats:MIN:"Min \\: %8.2lf %s" \
1111+
GPRINT:myInnoDBRowLockWats:MAX:"Max \\: %8.2lf %s\\n"
1112+

opennms/tools/cacti2MIB.pl

+2
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,8 @@
168168
'key_buf_bytes_unflushed' => {mib => 'myKeyBufBytesUnflushed', order => 146, type => 'Gauge64'},
169169
'key_buf_bytes_used' => {mib => 'myKeyBufBytesUsed', order => 147, type => 'Gauge64'},
170170
'key_buffer_size' => {mib => 'myKeyBufferSize', order => 148, type => 'Gauge64'},
171+
'Innodb_row_lock_time' => {mib => 'myInnoDBRowLockTime', order => 149, type => 'Counter64'},
172+
'Innodb_row_lock_waits' => {mib => 'myInnoDBRowLockWaits', order => 150, type => 'Counter64'},
171173
},
172174
startoid => '.1.3.6.1.4.1.20267.200.1',
173175
}

0 commit comments

Comments
 (0)