cloudscale 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/bin/cloudscale +5 -0
  3. data/lib/cloudscale/monitor/agent/agent.rb +8 -2
  4. data/lib/cloudscale/monitor/reporter/influxdb_reporter.rb +29 -5
  5. data/lib/cloudscale/plugins/mongo/preops/mongodb_preop.rb +12 -4
  6. data/lib/cloudscale/plugins/mysql/data/mysql_chart.json +506 -0
  7. data/lib/cloudscale/plugins/mysql/data/mysql_menu.json +35 -0
  8. data/lib/cloudscale/plugins/mysql/mysql_counters.rb +90 -0
  9. data/lib/cloudscale/plugins/mysql/mysql_general_status.rb +119 -0
  10. data/lib/cloudscale/plugins/mysql/mysql_innodb.rb +113 -0
  11. data/lib/cloudscale/plugins/mysql/mysql_querycache.rb +59 -0
  12. data/lib/cloudscale/plugins/mysql/preops/mysql_preop.rb +95 -0
  13. data/lib/cloudscale/plugins/postgres/preops/postgres_preop.rb +12 -4
  14. data/lib/cloudscale/plugins/redis/data/redis_chart.json +110 -0
  15. data/lib/cloudscale/plugins/redis/data/redis_menu.json +17 -0
  16. data/lib/cloudscale/plugins/redis/preops/redis_preop.rb +117 -0
  17. data/lib/cloudscale/plugins/redis/redis_server_status.rb +227 -0
  18. data/lib/cloudscale/rest/rest_client.rb +14 -8
  19. data/lib/cloudscale/rest/rest_client_helper.rb +23 -16
  20. data/lib/cloudscale/schedule.rb +1 -0
  21. data/lib/cloudscale/store/agent/agent.store +1 -1
  22. data/lib/cloudscale/store/agent/agent_instance.store +11 -0
  23. data/lib/cloudscale/store/agent/influxdb.store +1 -1
  24. data/lib/cloudscale/version.rb +1 -1
  25. data/lib/store/plugin/host +1 -0
  26. data/lib/store/plugin/mongo-connect-timeout +1 -0
  27. data/lib/store/plugin/mongo-db +1 -0
  28. data/lib/store/plugin/mongo-host +1 -0
  29. data/lib/store/plugin/mongo-op-timeout +1 -0
  30. data/lib/store/plugin/mongo-password +1 -0
  31. data/lib/store/plugin/mongo-port +2 -0
  32. data/lib/store/plugin/mongo-ssl +2 -0
  33. data/lib/store/plugin/mongo-username +1 -0
  34. data/lib/store/plugin/mysql-db +0 -0
  35. data/lib/store/plugin/mysql-host +0 -0
  36. data/lib/store/plugin/mysql-password +0 -0
  37. data/lib/store/plugin/mysql-port +1 -0
  38. data/lib/store/plugin/mysql-username +0 -0
  39. data/lib/store/plugin/port +1 -0
  40. data/lib/store/plugin/postgres-db +0 -0
  41. data/lib/store/plugin/postgres-host +0 -0
  42. data/lib/store/plugin/postgres-password +0 -0
  43. data/lib/store/plugin/postgres-port +1 -0
  44. data/lib/store/plugin/postgres-username +0 -0
  45. data/lib/store/plugin/redis-db +0 -0
  46. data/lib/store/plugin/redis-host +0 -0
  47. data/lib/store/plugin/redis-password +0 -0
  48. data/lib/store/plugin/redis-port +1 -0
  49. data/lib/store/plugin/redis-reconnect-attempts +1 -0
  50. data/lib/store/plugin/redis-timeout +1 -0
  51. data/lib/store/plugin/redis-username +0 -0
  52. data/lib/store/plugin/token +1 -0
  53. metadata +45 -11
  54. data/bin/autospec +0 -16
  55. data/bin/bundler +0 -16
  56. data/bin/htmldiff +0 -16
  57. data/bin/ldiff +0 -16
  58. data/bin/monitor +0 -16
  59. data/bin/rake +0 -16
  60. data/bin/restclient +0 -16
  61. data/bin/rspec +0 -16
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2ae417e9a0ad0393aa9d12c3ad5ebe2011b43469
4
- data.tar.gz: ac2fc6528ec4b6de4182394d63dec48ed6dc982b
3
+ metadata.gz: 076b3c0a89c636a51e24ce4f0b878997fbd782a7
4
+ data.tar.gz: c8d285c178ad942b87609e09edec16d3c05ecf7e
5
5
  SHA512:
6
- metadata.gz: 02d8676dadadc22ade4d50f3386d397e9e186c2b5ea642a0d1fcdffcb8fe4ca0fe632a28ff5394bb3bb032f8971cb8cd8dcda9f7b12d12a5115b6c3d6a2c1ba8
7
- data.tar.gz: 6a3310a96126b81bca26a7a31e54af3e44743a5056b34e77bebc1580d0c8f9fed55c900a5decb3def3e57a708786fb098ff4e55c036726aa9451124e297020bf
6
+ metadata.gz: 881c2fe647ba573a69b23213624d0facf2e101aef3aa0534d98bd05eec5002f9de506a567b5ff54dad63eaeeab26b0599de3e97ab8c483c39fce9e480844687a
7
+ data.tar.gz: 4435e35253c3e2a89d04ced0bac5812eadc792c89f9ef82160a698a0c3ab88fb395bb019a70567d8f26f099868fd75ffaa32cbe09ec5b3fc355b1d039c472b1f
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "cloudscale"
4
+
5
+ Cloudscale::Monitor(ARGV)
@@ -37,7 +37,7 @@ module Cloudscale
37
37
 
38
38
  if (registry.stored_agent_instance != nil)
39
39
  agent_instance = client.searchOne('agentInstances',
40
- 'findByAgentInstanceId', { :id => registry.agent_instance_id })
40
+ 'findByAgentInstanceId', { :agentInstanceId => registry.agent_instance_id })
41
41
  end
42
42
 
43
43
  if (agent_instance == nil)
@@ -93,13 +93,19 @@ module Cloudscale
93
93
  puts "Removing AgentInstance completely:\n"
94
94
 
95
95
  agent_instance = rest_client.searchOne('agentInstances',
96
- 'findByAgentInstanceId', { :id => agentInstanceId })
96
+ 'findByAgentInstanceId', { :agentInstanceId => agentInstanceId })
97
97
 
98
98
  rest_client.delete('agentInstances', RestClientWrapper.load_entity_id(agent_instance))
99
99
 
100
100
  puts " Deleting AgentInstance was successful \n\n"
101
101
  end
102
102
 
103
+ def self.alive(agentInstanceId)
104
+ rest_client = RestClientWrapper.instance
105
+
106
+ rest_client.get_with_path('agentInstances', agentInstanceId, 'alive')
107
+ end
108
+
103
109
  end
104
110
  end
105
111
  end
@@ -13,7 +13,11 @@ module Cloudscale
13
13
  class InfluxDbReporter
14
14
  include Singleton
15
15
 
16
- attr_reader :prefix
16
+ attr_reader :prefix, :client, :dataset
17
+
18
+ def log
19
+ @log = Logger.new(STDOUT)
20
+ end
17
21
 
18
22
  @@iDB = Constants::InfluxDb.load
19
23
 
@@ -87,9 +91,13 @@ module Cloudscale
87
91
 
88
92
  def initialize
89
93
  @prefix = Monitor::Registry.instance.agent_instance_id + "."
94
+ @client = InfluxDB::Client.new @@iDB["database"], { :host => @@iDB["host"], :port => @@iDB["port"], :username => @@iDB["username"],
95
+ :password => @@iDB["password"] }
90
96
  end
91
97
 
92
98
  def report(metrics)
99
+ clear
100
+
93
101
  timestamp = Time.now.to_i
94
102
  metrics.each do | key, metric |
95
103
  case metric
@@ -107,6 +115,10 @@ module Cloudscale
107
115
  puts 'Unhandled instrument'
108
116
  end
109
117
  end
118
+
119
+ if (hasSeries)
120
+ send
121
+ end
110
122
  end
111
123
 
112
124
  def reportTimer(name, timer, timestamp)
@@ -159,7 +171,7 @@ module Cloudscale
159
171
  p = @@pointsGauge[0]
160
172
  p[0] = timestamp
161
173
  p[1] = gauge.get[:value]
162
- raise "gauge dataset not equals column length" unless p.length == @@COLUMNS_GAUGE.length
174
+ raise "gauge dataset not equals column length" unless p.length == @@COLUMNS_GAUGE.length
163
175
  appendSeries(@prefix, name, ".value", @@COLUMNS_GAUGE, p)
164
176
  end
165
177
 
@@ -179,9 +191,21 @@ module Cloudscale
179
191
  columns.each_with_index { | val, index |
180
192
  data[columns[index]] = points[index]
181
193
  }
182
- client = InfluxDB::Client.new @@iDB["database"], { :host => @@iDB["host"], :port => @@iDB["port"], :username => @@iDB["username"],
183
- :password => @@iDB["password"] }
184
- client.write_point(namePrefix + name + nameSuffix, data, false)
194
+
195
+ @dataset.push({:name => namePrefix + name + nameSuffix, :data => data})
196
+ end
197
+
198
+ def send()
199
+ log.info("Dataset length: #{@dataset.length}. Now sending...")
200
+ @client.write_points(@dataset, false)
201
+ end
202
+
203
+ def clear()
204
+ @dataset = Array.new
205
+ end
206
+
207
+ def hasSeries()
208
+ return !@dataset.empty?
185
209
  end
186
210
 
187
211
  end
@@ -17,15 +17,23 @@ module Cloudscale
17
17
  class MongodbPreop < Preops::PluginPreop
18
18
  include Singleton
19
19
 
20
- attr_accessor :options
20
+ attr_accessor :options, :client
21
21
 
22
22
  def is_enabled
23
- true
23
+ enabled = true
24
+
25
+ if !defined? Mongo
26
+ enabled = false
27
+ end
28
+
29
+ enabled
24
30
  end
25
31
 
26
32
  def register
27
- init_charts("#{File.dirname(__FILE__)}/../data/mongo_chart.json")
28
- init_menus("#{File.dirname(__FILE__)}/../data/mongo_menu.json")
33
+ if is_enabled
34
+ init_charts("#{File.dirname(__FILE__)}/../data/mongo_chart.json")
35
+ init_menus("#{File.dirname(__FILE__)}/../data/mongo_menu.json")
36
+ end
29
37
  end
30
38
 
31
39
  def initialize
@@ -0,0 +1,506 @@
1
+ {
2
+ "mysql.handler.general" : {
3
+ "chartId" : "mysql.handler.general",
4
+ "options" : {
5
+ "title" : { "text" : "Row Stats" },
6
+ "subtitle" : { "text" : "The row usage/performance details" },
7
+ "chart" : {
8
+ "type": "area"
9
+ },
10
+ "xAxis" : {
11
+ "title" : {
12
+ "text" : "Date"
13
+ },
14
+ "type" : "datetime"
15
+ },
16
+ "yAxis" : {
17
+ "title" : {
18
+ "text" : "short"
19
+ },
20
+ "type" : "linear"
21
+ },
22
+ "legend" : {
23
+ "title" : "Row Statistics",
24
+ "enabled" : true,
25
+ "align" : "center",
26
+ "verticalAlign" : "bottom"
27
+ }
28
+ },
29
+ "queries" :[{
30
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.handler.general\\./i"
31
+ }],
32
+ "agentInstanceId" : null,
33
+ "menuId" : "mysql.counter",
34
+ "order" : 0,
35
+ "width" : 6,
36
+ "height" : 0
37
+ },
38
+ "mysql.handler.transaction" : {
39
+ "chartId" : "mysql.handler.transaction",
40
+ "options" : {
41
+ "title" : { "text" : "Transction Stats" },
42
+ "subtitle" : { "text" : "The row usage/performance details" },
43
+ "chart" : {
44
+ "type": "area"
45
+ },
46
+ "xAxis" : {
47
+ "title" : {
48
+ "text" : "Date"
49
+ },
50
+ "type" : "datetime"
51
+ },
52
+ "yAxis" : {
53
+ "title" : {
54
+ "text" : "short"
55
+ },
56
+ "type" : "linear"
57
+ },
58
+ "legend" : {
59
+ "title" : "Transaction Statistics",
60
+ "enabled" : true,
61
+ "align" : "center",
62
+ "verticalAlign" : "bottom"
63
+ }
64
+ },
65
+ "queries" :[{
66
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.handler.read.transaction\\./i"
67
+ }],
68
+ "agentInstanceId" : null,
69
+ "menuId" : "mysql.counter",
70
+ "order" : 0,
71
+ "width" : 6,
72
+ "height" : 0
73
+ },
74
+ "mysql.handler.paging" : {
75
+ "chartId" : "mysql.handler.paging",
76
+ "options" : {
77
+ "title" : { "text" : "Read Paging Stats" },
78
+ "subtitle" : { "text" : "The row usage/performance details" },
79
+ "chart" : {
80
+ "type": "area"
81
+ },
82
+ "xAxis" : {
83
+ "title" : {
84
+ "text" : "Date"
85
+ },
86
+ "type" : "datetime"
87
+ },
88
+ "yAxis" : {
89
+ "title" : {
90
+ "text" : "short"
91
+ },
92
+ "type" : "linear"
93
+ },
94
+ "legend" : {
95
+ "title" : "Row Statistics",
96
+ "enabled" : true,
97
+ "align" : "center",
98
+ "verticalAlign" : "bottom"
99
+ }
100
+ },
101
+ "queries" :[{
102
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.handler.read.paging\\./i"
103
+ }],
104
+ "agentInstanceId" : null,
105
+ "menuId" : "mysql.counter",
106
+ "order" : 0,
107
+ "width" : 12,
108
+ "height" : 0
109
+ },
110
+ "mysql.innodb.buffer" : {
111
+ "chartId" : "mysql.innodb.buffer",
112
+ "options" : {
113
+ "title" : { "text" : "InnoDb Buffer Stats" },
114
+ "subtitle" : { "text" : "The row usage/performance details" },
115
+ "chart" : {
116
+ "type": "area"
117
+ },
118
+ "xAxis" : {
119
+ "title" : {
120
+ "text" : "Date"
121
+ },
122
+ "type" : "datetime"
123
+ },
124
+ "yAxis" : {
125
+ "title" : {
126
+ "text" : "short"
127
+ },
128
+ "type" : "linear"
129
+ },
130
+ "legend" : {
131
+ "title" : "Buffer Statistics",
132
+ "enabled" : true,
133
+ "align" : "center",
134
+ "verticalAlign" : "bottom"
135
+ }
136
+ },
137
+ "queries" :[{
138
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.innodb.buffer\\./i"
139
+ }],
140
+ "agentInstanceId" : null,
141
+ "menuId" : "mysql.innodb",
142
+ "order" : 0,
143
+ "width" : 6,
144
+ "height" : 0
145
+ },
146
+ "mysql.innodb.page" : {
147
+ "chartId" : "mysql.innodb.page",
148
+ "options" : {
149
+ "title" : { "text" : "InnoDb Page Stats" },
150
+ "subtitle" : { "text" : "The row usage/performance details" },
151
+ "chart" : {
152
+ "type": "area"
153
+ },
154
+ "xAxis" : {
155
+ "title" : {
156
+ "text" : "Date"
157
+ },
158
+ "type" : "datetime"
159
+ },
160
+ "yAxis" : {
161
+ "title" : {
162
+ "text" : "short"
163
+ },
164
+ "type" : "linear"
165
+ },
166
+ "legend" : {
167
+ "title" : "Page Statistics",
168
+ "enabled" : true,
169
+ "align" : "center",
170
+ "verticalAlign" : "bottom"
171
+ }
172
+ },
173
+ "queries" :[{
174
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.innodb.page\\./i"
175
+ }],
176
+ "agentInstanceId" : null,
177
+ "menuId" : "mysql.innodb",
178
+ "order" : 0,
179
+ "width" : 6,
180
+ "height" : 0
181
+ },
182
+ "mysql.innodb.row" : {
183
+ "chartId" : "mysql.innodb.row",
184
+ "options" : {
185
+ "title" : { "text" : "InnoDb Row Stats" },
186
+ "subtitle" : { "text" : "The row usage/performance details" },
187
+ "chart" : {
188
+ "type": "area"
189
+ },
190
+ "xAxis" : {
191
+ "title" : {
192
+ "text" : "Date"
193
+ },
194
+ "type" : "datetime"
195
+ },
196
+ "yAxis" : {
197
+ "title" : {
198
+ "text" : "short"
199
+ },
200
+ "type" : "linear"
201
+ },
202
+ "legend" : {
203
+ "title" : "Page Statistics",
204
+ "enabled" : true,
205
+ "align" : "center",
206
+ "verticalAlign" : "bottom"
207
+ }
208
+ },
209
+ "queries" :[{
210
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.innodb.row\\./i"
211
+ }],
212
+ "agentInstanceId" : null,
213
+ "menuId" : "mysql.innodb",
214
+ "order" : 0,
215
+ "width" : 6,
216
+ "height" : 0
217
+ },
218
+ "mysql.qcache.queries" : {
219
+ "chartId" : "mysql.qcache.queries",
220
+ "options" : {
221
+ "title" : { "text" : "InnoDb Query Cache Stats" },
222
+ "subtitle" : { "text" : "The row usage/performance details" },
223
+ "chart" : {
224
+ "type": "area"
225
+ },
226
+ "xAxis" : {
227
+ "title" : {
228
+ "text" : "Date"
229
+ },
230
+ "type" : "datetime"
231
+ },
232
+ "yAxis" : {
233
+ "title" : {
234
+ "text" : "short"
235
+ },
236
+ "type" : "linear"
237
+ },
238
+ "legend" : {
239
+ "title" : "Query Cache Statistics",
240
+ "enabled" : true,
241
+ "align" : "center",
242
+ "verticalAlign" : "bottom"
243
+ }
244
+ },
245
+ "queries" :[{
246
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.qcache\\./i"
247
+ }],
248
+ "agentInstanceId" : null,
249
+ "menuId" : "mysql.querycache",
250
+ "order" : 0,
251
+ "width" : 12,
252
+ "height" : 0
253
+ },
254
+ "mysql.general.network" : {
255
+ "chartId" : "mysql.general.network",
256
+ "options" : {
257
+ "title" : { "text" : "MySQL Network Stats" },
258
+ "subtitle" : { "text" : "The network usage/performance details" },
259
+ "chart" : {
260
+ "type": "area"
261
+ },
262
+ "xAxis" : {
263
+ "title" : {
264
+ "text" : "Date"
265
+ },
266
+ "type" : "datetime"
267
+ },
268
+ "yAxis" : {
269
+ "title" : {
270
+ "text" : "short"
271
+ },
272
+ "type" : "linear"
273
+ },
274
+ "legend" : {
275
+ "title" : "Network Statistics",
276
+ "enabled" : true,
277
+ "align" : "center",
278
+ "verticalAlign" : "bottom"
279
+ }
280
+ },
281
+ "queries" :[{
282
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.network\\./i"
283
+ }],
284
+ "agentInstanceId" : null,
285
+ "menuId" : "mysql.general",
286
+ "order" : 0,
287
+ "width" : 6,
288
+ "height" : 0
289
+ },
290
+ "mysql.general.binlog" : {
291
+ "chartId" : "mysql.general.binlog",
292
+ "options" : {
293
+ "title" : { "text" : "MySQL Binlog Stats" },
294
+ "subtitle" : { "text" : "The binlog usage/performance details" },
295
+ "chart" : {
296
+ "type": "area"
297
+ },
298
+ "xAxis" : {
299
+ "title" : {
300
+ "text" : "Date"
301
+ },
302
+ "type" : "datetime"
303
+ },
304
+ "yAxis" : {
305
+ "title" : {
306
+ "text" : "short"
307
+ },
308
+ "type" : "linear"
309
+ },
310
+ "legend" : {
311
+ "title" : "Binlog Statistics",
312
+ "enabled" : true,
313
+ "align" : "center",
314
+ "verticalAlign" : "bottom"
315
+ }
316
+ },
317
+ "queries" :[{
318
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.binlog\\./i"
319
+ }],
320
+ "agentInstanceId" : null,
321
+ "menuId" : "mysql.general",
322
+ "order" : 0,
323
+ "width" : 6,
324
+ "height" : 0
325
+ },
326
+ "mysql.general.key" : {
327
+ "chartId" : "mysql.general.key",
328
+ "options" : {
329
+ "title" : { "text" : "MySQL Key Read/Write Stats" },
330
+ "subtitle" : { "text" : "The key read/write usage/performance details" },
331
+ "chart" : {
332
+ "type": "area"
333
+ },
334
+ "xAxis" : {
335
+ "title" : {
336
+ "text" : "Date"
337
+ },
338
+ "type" : "datetime"
339
+ },
340
+ "yAxis" : {
341
+ "title" : {
342
+ "text" : "short"
343
+ },
344
+ "type" : "linear"
345
+ },
346
+ "legend" : {
347
+ "title" : "Key Read/Write Statistics",
348
+ "enabled" : true,
349
+ "align" : "center",
350
+ "verticalAlign" : "bottom"
351
+ }
352
+ },
353
+ "queries" :[{
354
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.key\\./i"
355
+ }],
356
+ "agentInstanceId" : null,
357
+ "menuId" : "mysql.general",
358
+ "order" : 0,
359
+ "width" : 12,
360
+ "height" : 0
361
+ },
362
+ "mysql.general.connections" : {
363
+ "chartId" : "mysql.general.connections",
364
+ "options" : {
365
+ "title" : { "text" : "MySQL Connection Stats" },
366
+ "subtitle" : { "text" : "The connection usage/performance details" },
367
+ "chart" : {
368
+ "type": "area"
369
+ },
370
+ "xAxis" : {
371
+ "title" : {
372
+ "text" : "Date"
373
+ },
374
+ "type" : "datetime"
375
+ },
376
+ "yAxis" : {
377
+ "title" : {
378
+ "text" : "short"
379
+ },
380
+ "type" : "linear"
381
+ },
382
+ "legend" : {
383
+ "title" : "Key Read/Write Statistics",
384
+ "enabled" : true,
385
+ "align" : "center",
386
+ "verticalAlign" : "bottom"
387
+ }
388
+ },
389
+ "queries" :[{
390
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.connections\\./i"
391
+ }],
392
+ "agentInstanceId" : null,
393
+ "menuId" : "mysql.general",
394
+ "order" : 0,
395
+ "width" : 6,
396
+ "height" : 0
397
+ },
398
+ "mysql.general.aborted" : {
399
+ "chartId" : "mysql.general.aborted",
400
+ "options" : {
401
+ "title" : { "text" : "MySQL abort Stats" },
402
+ "subtitle" : { "text" : "The abort usage/performance details" },
403
+ "chart" : {
404
+ "type": "area"
405
+ },
406
+ "xAxis" : {
407
+ "title" : {
408
+ "text" : "Date"
409
+ },
410
+ "type" : "datetime"
411
+ },
412
+ "yAxis" : {
413
+ "title" : {
414
+ "text" : "short"
415
+ },
416
+ "type" : "linear"
417
+ },
418
+ "legend" : {
419
+ "title" : "Abort Statistics",
420
+ "enabled" : true,
421
+ "align" : "center",
422
+ "verticalAlign" : "bottom"
423
+ }
424
+ },
425
+ "queries" :[{
426
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.aborted\\./i"
427
+ }],
428
+ "agentInstanceId" : null,
429
+ "menuId" : "mysql.general",
430
+ "order" : 0,
431
+ "width" : 6,
432
+ "height" : 0
433
+ },
434
+ "mysql.general.open" : {
435
+ "chartId" : "mysql.general.open",
436
+ "options" : {
437
+ "title" : { "text" : "MySQL open Stats" },
438
+ "subtitle" : { "text" : "The files and tables open usage/performance details" },
439
+ "chart" : {
440
+ "type": "area"
441
+ },
442
+ "xAxis" : {
443
+ "title" : {
444
+ "text" : "Date"
445
+ },
446
+ "type" : "datetime"
447
+ },
448
+ "yAxis" : {
449
+ "title" : {
450
+ "text" : "short"
451
+ },
452
+ "type" : "linear"
453
+ },
454
+ "legend" : {
455
+ "title" : "Files and Tables open Statistics",
456
+ "enabled" : true,
457
+ "align" : "center",
458
+ "verticalAlign" : "bottom"
459
+ }
460
+ },
461
+ "queries" :[{
462
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.open\\./i"
463
+ }],
464
+ "agentInstanceId" : null,
465
+ "menuId" : "mysql.general",
466
+ "order" : 0,
467
+ "width" : 6,
468
+ "height" : 0
469
+ },
470
+ "mysql.general.select" : {
471
+ "chartId" : "mysql.general.select",
472
+ "options" : {
473
+ "title" : { "text" : "MySQL select Stats" },
474
+ "subtitle" : { "text" : "The select usage/performance details" },
475
+ "chart" : {
476
+ "type": "area"
477
+ },
478
+ "xAxis" : {
479
+ "title" : {
480
+ "text" : "Date"
481
+ },
482
+ "type" : "datetime"
483
+ },
484
+ "yAxis" : {
485
+ "title" : {
486
+ "text" : "short"
487
+ },
488
+ "type" : "linear"
489
+ },
490
+ "legend" : {
491
+ "title" : "Select and Join Statistics",
492
+ "enabled" : true,
493
+ "align" : "center",
494
+ "verticalAlign" : "bottom"
495
+ }
496
+ },
497
+ "queries" :[{
498
+ "command" : "select mean(value) from /^[[agentInstanceId]].mysql.general.select\\./i"
499
+ }],
500
+ "agentInstanceId" : null,
501
+ "menuId" : "mysql.general",
502
+ "order" : 0,
503
+ "width" : 6,
504
+ "height" : 0
505
+ }
506
+ }