| 1 |
### |
| 2 |
### Note: |
| 3 |
### To setup database access: |
| 4 |
### GRANT SUPER, PROCESS ON *.* TO your_user@localhost \ |
| 5 |
### IDENTIFIED BY "your_password"; |
| 6 |
### |
| 7 |
### Notice in this example binlogging is not enabled in the MySQL |
| 8 |
### server. In this case the "mysql_binlog_*" metrics are |
| 9 |
### commented out. |
| 10 |
### |
| 11 |
|
| 12 |
modules { |
| 13 |
module { |
| 14 |
name = "mysql" |
| 15 |
language = "python" |
| 16 |
|
| 17 |
param host { |
| 18 |
value = 'localhost' |
| 19 |
} |
| 20 |
param user { |
| 21 |
value = 'your_user' |
| 22 |
} |
| 23 |
param passwd { |
| 24 |
value = 'your_password' |
| 25 |
} |
| 26 |
param timeout { |
| 27 |
value = 30 |
| 28 |
} |
| 29 |
param unix_socket { |
| 30 |
value = '' |
| 31 |
} |
| 32 |
param get_innodb { |
| 33 |
value = True |
| 34 |
} |
| 35 |
param get_master { |
| 36 |
value = False |
| 37 |
} |
| 38 |
param get_slave { |
| 39 |
value = False |
| 40 |
} |
| 41 |
param delta_per_second { |
| 42 |
value = True |
| 43 |
} |
| 44 |
} |
| 45 |
} |
| 46 |
|
| 47 |
collection_group { |
| 48 |
collect_every = 60 |
| 49 |
time_threshold = 60 |
| 50 |
|
| 51 |
metric { |
| 52 |
name = "mysql_innodb_pending_normal_aio_reads" |
| 53 |
} |
| 54 |
metric { |
| 55 |
name = "mysql_innodb_pending_log_writes" |
| 56 |
} |
| 57 |
metric { |
| 58 |
name = "mysql_innodb_transactions" |
| 59 |
} |
| 60 |
metric { |
| 61 |
name = "mysql_innodb_pending_chkp_writes" |
| 62 |
} |
| 63 |
metric { |
| 64 |
name = "mysql_innodb_rows_updated" |
| 65 |
} |
| 66 |
metric { |
| 67 |
name = "mysql_innodb_data_fsyncs" |
| 68 |
} |
| 69 |
metric { |
| 70 |
name = "mysql_innodb_spin_rounds" |
| 71 |
} |
| 72 |
metric { |
| 73 |
name = "mysql_innodb_spin_waits" |
| 74 |
} |
| 75 |
metric { |
| 76 |
name = "mysql_innodb_pending_aio_log_ios" |
| 77 |
} |
| 78 |
metric { |
| 79 |
name = "mysql_innodb_pending_log_flushes" |
| 80 |
} |
| 81 |
metric { |
| 82 |
name = "mysql_innodb_rows_read" |
| 83 |
} |
| 84 |
metric { |
| 85 |
name = "mysql_innodb_transactions_unpurged" |
| 86 |
} |
| 87 |
metric { |
| 88 |
name = "mysql_innodb_queries_queued" |
| 89 |
} |
| 90 |
metric { |
| 91 |
name = "mysql_innodb_pending_ibuf_aio_reads" |
| 92 |
} |
| 93 |
metric { |
| 94 |
name = "mysql_innodb_pending_normal_aio_writes" |
| 95 |
} |
| 96 |
metric { |
| 97 |
name = "mysql_innodb_pages_read" |
| 98 |
} |
| 99 |
metric { |
| 100 |
name = "mysql_innodb_read_views" |
| 101 |
} |
| 102 |
metric { |
| 103 |
name = "mysql_innodb_buffer_pool_pages_data" |
| 104 |
} |
| 105 |
metric { |
| 106 |
name = "mysql_innodb_data_reads" |
| 107 |
} |
| 108 |
metric { |
| 109 |
name = "mysql_innodb_queries_inside" |
| 110 |
} |
| 111 |
metric { |
| 112 |
name = "mysql_innodb_log_bytes_written" |
| 113 |
} |
| 114 |
metric { |
| 115 |
name = "mysql_innodb_buffer_pool_pages_dirty" |
| 116 |
} |
| 117 |
metric { |
| 118 |
name = "mysql_innodb_pending_aio_sync_ios" |
| 119 |
} |
| 120 |
metric { |
| 121 |
name = "mysql_innodb_ibuf_merged" |
| 122 |
} |
| 123 |
metric { |
| 124 |
name = "mysql_innodb_pages_created" |
| 125 |
} |
| 126 |
metric { |
| 127 |
name = "mysql_innodb_buffer_pool_pages_free" |
| 128 |
} |
| 129 |
metric { |
| 130 |
name = "mysql_innodb_pages_written" |
| 131 |
} |
| 132 |
metric { |
| 133 |
name = "mysql_innodb_rows_inserted" |
| 134 |
} |
| 135 |
metric { |
| 136 |
name = "mysql_innodb_active_transactions" |
| 137 |
} |
| 138 |
metric { |
| 139 |
name = "mysql_innodb_log_bytes_flushed" |
| 140 |
} |
| 141 |
metric { |
| 142 |
name = "mysql_innodb_history_list" |
| 143 |
} |
| 144 |
metric { |
| 145 |
name = "mysql_innodb_pending_buffer_pool_flushes" |
| 146 |
} |
| 147 |
metric { |
| 148 |
name = "mysql_innodb_current_transactions" |
| 149 |
} |
| 150 |
metric { |
| 151 |
name = "mysql_innodb_ibuf_inserts" |
| 152 |
} |
| 153 |
metric { |
| 154 |
name = "mysql_innodb_rows_deleted" |
| 155 |
} |
| 156 |
metric { |
| 157 |
name = "mysql_innodb_buffer_pool_pages_bytes" |
| 158 |
} |
| 159 |
metric { |
| 160 |
name = "mysql_innodb_buffer_pool_pages_total" |
| 161 |
} |
| 162 |
metric { |
| 163 |
name = "mysql_innodb_log_bytes_unflushed" |
| 164 |
} |
| 165 |
metric { |
| 166 |
name = "mysql_innodb_data_writes" |
| 167 |
} |
| 168 |
metric { |
| 169 |
name = "mysql_innodb_transactions_purged" |
| 170 |
} |
| 171 |
metric { |
| 172 |
name = "mysql_innodb_os_waits" |
| 173 |
} |
| 174 |
metric { |
| 175 |
name = "mysql_innodb_log_writes" |
| 176 |
} |
| 177 |
metric { |
| 178 |
name = "mysql_innodb_ibuf_merges" |
| 179 |
} |
| 180 |
/* |
| 181 |
metric { |
| 182 |
name = "mysql_binlog_space_used" |
| 183 |
} |
| 184 |
metric { |
| 185 |
name = "mysql_binlog_space_current" |
| 186 |
} |
| 187 |
metric { |
| 188 |
name = "mysql_binlog_count" |
| 189 |
} |
| 190 |
metric { |
| 191 |
name = "mysql_binlog_space_total" |
| 192 |
} |
| 193 |
*/ |
| 194 |
metric { |
| 195 |
name = "mysql_key_write_requests" |
| 196 |
} |
| 197 |
metric { |
| 198 |
name = "mysql_qcache_inserts" |
| 199 |
} |
| 200 |
metric { |
| 201 |
name = "mysql_select_scan" |
| 202 |
} |
| 203 |
metric { |
| 204 |
name = "mysql_key_writes" |
| 205 |
} |
| 206 |
metric { |
| 207 |
name = "mysql_com_update_multi" |
| 208 |
} |
| 209 |
metric { |
| 210 |
name = "mysql_table_locks_immediate" |
| 211 |
} |
| 212 |
metric { |
| 213 |
name = "mysql_threads_created" |
| 214 |
} |
| 215 |
metric { |
| 216 |
name = "mysql_connections" |
| 217 |
} |
| 218 |
metric { |
| 219 |
name = "mysql_questions" |
| 220 |
} |
| 221 |
metric { |
| 222 |
name = "mysql_bytes_received" |
| 223 |
} |
| 224 |
metric { |
| 225 |
name = "mysql_qcache_queries_in_cache" |
| 226 |
} |
| 227 |
metric { |
| 228 |
name = "mysql_binlog_cache_disk_use" |
| 229 |
} |
| 230 |
metric { |
| 231 |
name = "mysql_uptime" |
| 232 |
} |
| 233 |
metric { |
| 234 |
name = "mysql_slave_open_temp_tables" |
| 235 |
} |
| 236 |
metric { |
| 237 |
name = "mysql_slow_launch_threads" |
| 238 |
} |
| 239 |
metric { |
| 240 |
name = "mysql_open_tables" |
| 241 |
} |
| 242 |
metric { |
| 243 |
name = "mysql_sort_range" |
| 244 |
} |
| 245 |
metric { |
| 246 |
name = "mysql_select_range" |
| 247 |
} |
| 248 |
metric { |
| 249 |
name = "mysql_com_insert" |
| 250 |
} |
| 251 |
metric { |
| 252 |
name = "mysql_sort_rows" |
| 253 |
} |
| 254 |
metric { |
| 255 |
name = "mysql_select_range_check" |
| 256 |
} |
| 257 |
metric { |
| 258 |
name = "mysql_version" |
| 259 |
} |
| 260 |
metric { |
| 261 |
name = "mysql_max_connections" |
| 262 |
} |
| 263 |
metric { |
| 264 |
name = "mysql_query_cache_size" |
| 265 |
} |
| 266 |
metric { |
| 267 |
name = "mysql_opened_tables" |
| 268 |
} |
| 269 |
metric { |
| 270 |
name = "mysql_threads_running" |
| 271 |
} |
| 272 |
metric { |
| 273 |
name = "mysql_slow_queries" |
| 274 |
} |
| 275 |
metric { |
| 276 |
name = "mysql_created_tmp_tables" |
| 277 |
} |
| 278 |
metric { |
| 279 |
name = "mysql_threads_connected" |
| 280 |
} |
| 281 |
metric { |
| 282 |
name = "mysql_select_full_join" |
| 283 |
} |
| 284 |
metric { |
| 285 |
name = "mysql_com_select" |
| 286 |
} |
| 287 |
metric { |
| 288 |
name = "mysql_slave_retried_transactions" |
| 289 |
} |
| 290 |
metric { |
| 291 |
name = "mysql_threads_cached" |
| 292 |
} |
| 293 |
metric { |
| 294 |
name = "mysql_table_locks_waited" |
| 295 |
} |
| 296 |
metric { |
| 297 |
name = "mysql_qcache_lowmem_prunes" |
| 298 |
} |
| 299 |
metric { |
| 300 |
name = "mysql_binlog_cache_use" |
| 301 |
} |
| 302 |
metric { |
| 303 |
name = "mysql_com_insert_select" |
| 304 |
} |
| 305 |
metric { |
| 306 |
name = "mysql_qcache_hits" |
| 307 |
} |
| 308 |
metric { |
| 309 |
name = "mysql_created_tmp_files" |
| 310 |
} |
| 311 |
metric { |
| 312 |
name = "mysql_open_files" |
| 313 |
} |
| 314 |
metric { |
| 315 |
name = "mysql_com_update" |
| 316 |
} |
| 317 |
metric { |
| 318 |
name = "mysql_select_full_range_join" |
| 319 |
} |
| 320 |
metric { |
| 321 |
name = "mysql_qcache_not_cached" |
| 322 |
} |
| 323 |
metric { |
| 324 |
name = "mysql_sort_scan" |
| 325 |
} |
| 326 |
metric { |
| 327 |
name = "mysql_max_used_connections" |
| 328 |
} |
| 329 |
metric { |
| 330 |
name = "mysql_com_delete_multi" |
| 331 |
} |
| 332 |
metric { |
| 333 |
name = "mysql_bytes_sent" |
| 334 |
} |
| 335 |
metric { |
| 336 |
name = "mysql_com_replace" |
| 337 |
} |
| 338 |
metric { |
| 339 |
name = "mysql_qcache_free_memory" |
| 340 |
} |
| 341 |
metric { |
| 342 |
name = "mysql_qcache_total_blocks" |
| 343 |
} |
| 344 |
metric { |
| 345 |
name = "mysql_com_delete" |
| 346 |
} |
| 347 |
metric { |
| 348 |
name = "mysql_key_read_requests" |
| 349 |
} |
| 350 |
metric { |
| 351 |
name = "mysql_qcache_free_blocks" |
| 352 |
} |
| 353 |
metric { |
| 354 |
name = "mysql_aborted_connects" |
| 355 |
} |
| 356 |
metric { |
| 357 |
name = "mysql_com_load" |
| 358 |
} |
| 359 |
metric { |
| 360 |
name = "mysql_com_replace_select" |
| 361 |
} |
| 362 |
metric { |
| 363 |
name = "mysql_created_tmp_disk_tables" |
| 364 |
} |
| 365 |
metric { |
| 366 |
name = "mysql_key_reads" |
| 367 |
} |
| 368 |
metric { |
| 369 |
name = "mysql_aborted_clients" |
| 370 |
} |
| 371 |
} |