cloudscale 0.0.7 → 0.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cloudscale.rb +10 -8
- data/lib/cloudscale/monitor/agent/agent.rb +9 -8
- data/lib/cloudscale/monitor/preops/preop.rb +21 -17
- data/lib/cloudscale/monitor/reporter/influxdb_reporter.rb +10 -9
- data/lib/cloudscale/plugins/mongo/data/mongo_chart.json +434 -0
- data/lib/cloudscale/plugins/mongo/data/mongo_menu.json +32 -0
- data/lib/cloudscale/plugins/mongo/mongo_db_collection_status.rb +65 -0
- data/lib/cloudscale/plugins/mongo/mongo_db_status.rb +4 -3
- data/lib/cloudscale/plugins/mongo/mongo_replica_status.rb +6 -5
- data/lib/cloudscale/plugins/mongo/mongo_server_status.rb +44 -34
- data/lib/cloudscale/plugins/mongo/preops/mongodb_preop.rb +73 -75
- data/lib/cloudscale/plugins/postgres/data/postgres_chart.json +110 -0
- data/lib/cloudscale/plugins/postgres/data/postgres_menu.json +17 -0
- data/lib/cloudscale/plugins/postgres/postgres_server_status.rb +4 -4
- data/lib/cloudscale/plugins/postgres/preops/postgres_preop.rb +49 -45
- data/lib/cloudscale/registry.rb +7 -16
- data/lib/cloudscale/store/agent/agent.store +1 -1
- data/lib/cloudscale/version.rb +1 -1
- metadata +39 -36
- data/lib/cloudscale/plugins/mongo/data/os_chart.json +0 -362
- data/lib/cloudscale/plugins/mongo/data/os_menu.json +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ae417e9a0ad0393aa9d12c3ad5ebe2011b43469
|
4
|
+
data.tar.gz: ac2fc6528ec4b6de4182394d63dec48ed6dc982b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02d8676dadadc22ade4d50f3386d397e9e186c2b5ea642a0d1fcdffcb8fe4ca0fe632a28ff5394bb3bb032f8971cb8cd8dcda9f7b12d12a5115b6c3d6a2c1ba8
|
7
|
+
data.tar.gz: 6a3310a96126b81bca26a7a31e54af3e44743a5056b34e77bebc1580d0c8f9fed55c900a5decb3def3e57a708786fb098ff4e55c036726aa9451124e297020bf
|
data/lib/cloudscale.rb
CHANGED
@@ -66,16 +66,15 @@ module Cloudscale
|
|
66
66
|
parser.separator "Plugin specific Settings [Mandatory]"
|
67
67
|
|
68
68
|
Preops::PluginPreop.pluginPreops.each do | pluginPreop_class |
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
if (pluginPreop.is_enabled)
|
73
|
-
pluginPreop.options.each do | key, value |
|
69
|
+
preopDb.options.merge!(pluginPreop_class.instance.options)
|
70
|
+
if (pluginPreop_class.instance.is_enabled)
|
71
|
+
pluginPreop_class.instance.options.each do | key, value |
|
74
72
|
if (value[:required])
|
75
73
|
mandatory.push(key)
|
76
74
|
end
|
77
|
-
parser.on(value[:argument][1,2] + " n", value[:argument] + "=n", value[:description]) do |
|
78
|
-
|
75
|
+
parser.on(value[:argument][1,2] + " n", value[:argument] + "=n", value[:description]) do | val |
|
76
|
+
pluginPreop_class.instance.options[key.to_sym][:value] = val
|
77
|
+
preopDb.set_option_value(key, val)
|
79
78
|
end
|
80
79
|
end
|
81
80
|
end
|
@@ -101,7 +100,6 @@ module Cloudscale
|
|
101
100
|
exit
|
102
101
|
else
|
103
102
|
preopDb.save_options
|
104
|
-
preopDb.save_options
|
105
103
|
end
|
106
104
|
rescue OptionParser::InvalidOption, OptionParser::MissingArgument
|
107
105
|
puts $!.to_s
|
@@ -126,6 +124,10 @@ module Cloudscale
|
|
126
124
|
when "start"
|
127
125
|
plugins = Set.new
|
128
126
|
|
127
|
+
Preops::PluginPreop.pluginPreops.each do | pluginPreop_class |
|
128
|
+
pluginPreop_class.instance.register
|
129
|
+
end
|
130
|
+
|
129
131
|
Plugins::Plugin.plugins.each do | plugin_class |
|
130
132
|
plugin = plugin_class.new
|
131
133
|
plugins << plugin
|
@@ -14,30 +14,30 @@ require "#{File.dirname(__FILE__)}/../../rest/rest_client"
|
|
14
14
|
module Cloudscale
|
15
15
|
module Monitor
|
16
16
|
class Agent
|
17
|
-
attr_accessor :log, :server, :client
|
17
|
+
attr_accessor :log, :registry, :server, :client
|
18
18
|
|
19
19
|
def initialize(token)
|
20
20
|
@log = Logger.new(STDOUT)
|
21
21
|
@server = Socket.gethostname
|
22
|
-
|
23
|
-
|
22
|
+
client = RestClientWrapper.instance
|
23
|
+
registry = Monitor::Registry.instance
|
24
24
|
|
25
25
|
puts " "
|
26
26
|
puts "Running preflight verification for cloudscale monitoring agent"
|
27
27
|
|
28
|
-
if (
|
28
|
+
if (registry.stored_agent == nil)
|
29
29
|
raise "You did not provide any valid Agent file under /store/agent/agent.store."
|
30
30
|
end
|
31
31
|
|
32
|
-
agent = client.searchOne('agents', 'findByAgentId', { :agentId =>
|
32
|
+
agent = client.searchOne('agents', 'findByAgentId', { :agentId => registry.stored_agent["agentId"] })
|
33
33
|
|
34
34
|
if (agent == nil)
|
35
35
|
raise "No agent registered yet. It is not allowed to connect this agent instance to cloudscale monitoring."
|
36
36
|
end
|
37
37
|
|
38
|
-
if (
|
38
|
+
if (registry.stored_agent_instance != nil)
|
39
39
|
agent_instance = client.searchOne('agentInstances',
|
40
|
-
|
40
|
+
'findByAgentInstanceId', { :id => registry.agent_instance_id })
|
41
41
|
end
|
42
42
|
|
43
43
|
if (agent_instance == nil)
|
@@ -45,7 +45,7 @@ module Cloudscale
|
|
45
45
|
|
46
46
|
agent_instance_settings = Monitor::Settings.new(15, 0, 1500, 5)
|
47
47
|
agent_instance = Monitor::AgentInstance.new(RestClientWrapper.load_entity_ref(agent)["href"],
|
48
|
-
|
48
|
+
registry.agent_instance_id, token, server, agent_instance_settings, Time.now.to_i * 1000)
|
49
49
|
|
50
50
|
client.post('agentInstances', agent_instance)
|
51
51
|
Constants::AgentInstance.create(agent_instance.to_h)
|
@@ -62,6 +62,7 @@ module Cloudscale
|
|
62
62
|
resetRestEndpoint('coredatas', agentInstanceId, 'Coredata')
|
63
63
|
resetRestEndpoint('tables', agentInstanceId, 'Table')
|
64
64
|
resetRestEndpoint('charts', agentInstanceId, 'Chart')
|
65
|
+
resetRestEndpoint('menus', agentInstanceId, 'Menu')
|
65
66
|
|
66
67
|
remove_agenInstance(agentInstanceId)
|
67
68
|
end
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require "fsdb"
|
2
2
|
require "#{File.dirname(__FILE__)}/../../registry"
|
3
|
+
require "#{File.dirname(__FILE__)}/../../rest/rest_client"
|
3
4
|
|
4
5
|
##
|
5
6
|
#
|
@@ -13,45 +14,48 @@ module Cloudscale
|
|
13
14
|
|
14
15
|
def init
|
15
16
|
@log = Logger.new(STDOUT)
|
16
|
-
@registry = Monitor::Registry.instance
|
17
|
+
@registry = Monitor::Registry.instance
|
18
|
+
@rest_client = RestClientWrapper.instance
|
17
19
|
end
|
18
20
|
|
19
21
|
def init_charts(path)
|
20
22
|
log.info("Starting monitoring chart synchronization...")
|
21
23
|
|
22
|
-
|
23
|
-
|
24
|
-
plugin
|
24
|
+
agentInstanceId = @registry.agent_instance_id
|
25
|
+
|
26
|
+
plugin = YAML.load(JSON.parse(File.read(path)).to_yaml)
|
27
|
+
plugin.each do | key, chart |
|
25
28
|
chart["agentInstanceId"] = agentInstanceId
|
26
29
|
|
27
30
|
chart["queries"].each { | query |
|
28
31
|
query["command"].sub! '[[agentInstanceId]]', agentInstanceId
|
29
32
|
}
|
30
33
|
|
31
|
-
test_chart = @
|
34
|
+
test_chart = @rest_client.searchOne("charts", "findByAgentInstanceIdAndChartId", { :agentInstanceId => agentInstanceId, :chartId => chart["chartId"]})
|
32
35
|
if (test_chart == nil)
|
33
|
-
|
36
|
+
@rest_client.post("charts", chart)
|
34
37
|
else
|
35
|
-
|
38
|
+
@rest_client.patch("charts", RestClientWrapper.load_entity_id(test_chart), chart)
|
36
39
|
end
|
37
40
|
end
|
38
41
|
|
39
|
-
Monitor::InitCharts.new(@registry.agent_instance_id, path)
|
40
|
-
|
41
42
|
log.info("Successfully synchronized charts...")
|
42
43
|
end
|
43
44
|
|
44
45
|
def init_menus(path)
|
45
46
|
log.info("Starting monitoring menu synchronization...")
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
48
|
+
agentInstanceId = @registry.agent_instance_id
|
49
|
+
|
50
|
+
plugin = YAML.load(JSON.parse(File.read(path)).to_yaml)
|
51
|
+
plugin.each do | key, menuItem |
|
52
|
+
menuItem["agentInstanceId"] = agentInstanceId
|
53
|
+
test_menu = @rest_client.searchOne("menus", "findByAgentInstanceIdAndMenuId", { :agentInstanceId => agentInstanceId, :menuId => menuItem["menuId"]})
|
54
|
+
if (test_menu == nil)
|
55
|
+
@rest_client.post("menus", menuItem)
|
56
|
+
else
|
57
|
+
@rest_client.patch("menus", RestClientWrapper.load_entity_id(test_menu), menuItem)
|
58
|
+
end
|
55
59
|
end
|
56
60
|
|
57
61
|
log.info("Successfully synchronized menus...")
|
@@ -13,7 +13,7 @@ module Cloudscale
|
|
13
13
|
class InfluxDbReporter
|
14
14
|
include Singleton
|
15
15
|
|
16
|
-
|
16
|
+
attr_reader :prefix
|
17
17
|
|
18
18
|
@@iDB = Constants::InfluxDb.load
|
19
19
|
|
@@ -85,7 +85,8 @@ module Cloudscale
|
|
85
85
|
0.0
|
86
86
|
]]
|
87
87
|
|
88
|
-
def initialize
|
88
|
+
def initialize
|
89
|
+
@prefix = Monitor::Registry.instance.agent_instance_id + "."
|
89
90
|
end
|
90
91
|
|
91
92
|
def report(metrics)
|
@@ -126,7 +127,7 @@ module Cloudscale
|
|
126
127
|
p[14] = timer.mean_rate
|
127
128
|
p[15] = timer.count
|
128
129
|
raise "timer dataset not equals column length" unless p.length == @@COLUMNS_TIMER.length
|
129
|
-
appendSeries(
|
130
|
+
appendSeries(@prefix, name, ".timer", @@COLUMNS_TIMER, p)
|
130
131
|
end
|
131
132
|
|
132
133
|
def reportHistogram(name, histogram, timestamp)
|
@@ -143,7 +144,7 @@ module Cloudscale
|
|
143
144
|
p[9] = histogram.quantiles(0.99)
|
144
145
|
p[11] = histogram.one_minute_rate
|
145
146
|
raise "histogram dataset not equals column length" unless p.length == @@COLUMNS_HISTOGRAM.length
|
146
|
-
appendSeries(
|
147
|
+
appendSeries(@prefix, name, ".histogram", @@COLUMNS_HISTOGRAM, p)
|
147
148
|
end
|
148
149
|
|
149
150
|
def reportCounter(name, counter, timestamp)
|
@@ -151,15 +152,15 @@ module Cloudscale
|
|
151
152
|
p[0] = timestamp
|
152
153
|
p[1] = counter.to_i
|
153
154
|
raise "counter dataset not equals column length" unless p.length == @@COLUMNS_COUNT.length
|
154
|
-
appendSeries(
|
155
|
+
appendSeries(@prefix, name, ".count", @@COLUMNS_COUNT, p)
|
155
156
|
end
|
156
157
|
|
157
158
|
def reportGauge(name, gauge, timestamp)
|
158
159
|
p = @@pointsGauge[0]
|
159
160
|
p[0] = timestamp
|
160
161
|
p[1] = gauge.get[:value]
|
161
|
-
raise "gauge dataset not equals column length" unless p.length == @@COLUMNS_GAUGE.length
|
162
|
-
appendSeries(
|
162
|
+
raise "gauge dataset not equals column length" unless p.length == @@COLUMNS_GAUGE.length
|
163
|
+
appendSeries(@prefix, name, ".value", @@COLUMNS_GAUGE, p)
|
163
164
|
end
|
164
165
|
|
165
166
|
def reportMeter(name, meter, timestamp)
|
@@ -170,7 +171,7 @@ module Cloudscale
|
|
170
171
|
p[4] = meter.fifteen_minute_rate
|
171
172
|
p[5] = meter.mean_rate
|
172
173
|
raise "meter dataset not equals column length" unless p.length == @@COLUMNS_METER.length
|
173
|
-
appendSeries(
|
174
|
+
appendSeries(@prefix, name, ".value", @@COLUMNS_METER, p)
|
174
175
|
end
|
175
176
|
|
176
177
|
def appendSeries(namePrefix, name, nameSuffix, columns, points)
|
@@ -179,7 +180,7 @@ module Cloudscale
|
|
179
180
|
data[columns[index]] = points[index]
|
180
181
|
}
|
181
182
|
client = InfluxDB::Client.new @@iDB["database"], { :host => @@iDB["host"], :port => @@iDB["port"], :username => @@iDB["username"],
|
182
|
-
:password => @@iDB["password"] }
|
183
|
+
:password => @@iDB["password"] }
|
183
184
|
client.write_point(namePrefix + name + nameSuffix, data, false)
|
184
185
|
end
|
185
186
|
|
@@ -0,0 +1,434 @@
|
|
1
|
+
{
|
2
|
+
"mongo.status" : {
|
3
|
+
"chartId" : "mongo.status",
|
4
|
+
"options" : {
|
5
|
+
"title" : { "text" : "Collection Stats" },
|
6
|
+
"subtitle" : { "text" : "The Collection 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" : "Collection Usage",
|
24
|
+
"enabled" : true,
|
25
|
+
"align" : "center",
|
26
|
+
"verticalAlign" : "bottom"
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"queries" :[{
|
30
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.status\\./i"
|
31
|
+
}],
|
32
|
+
"agentInstanceId" : null,
|
33
|
+
"menuId" : "mongo.status",
|
34
|
+
"order" : 0,
|
35
|
+
"width" : 12,
|
36
|
+
"height" : 0
|
37
|
+
},
|
38
|
+
"mongo.mem" : {
|
39
|
+
"chartId" : "mongo.mem",
|
40
|
+
"options" : {
|
41
|
+
"title" : { "text" : "Memory Usage" },
|
42
|
+
"subtitle" : { "text" : "The Memory 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" : "Memory Usage",
|
60
|
+
"enabled" : true,
|
61
|
+
"align" : "center",
|
62
|
+
"verticalAlign" : "bottom"
|
63
|
+
}
|
64
|
+
},
|
65
|
+
"queries" : [{
|
66
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.mem\\./i"
|
67
|
+
}],
|
68
|
+
"agentInstanceId" : null,
|
69
|
+
"menuId" : "mongo.server",
|
70
|
+
"order" : 0,
|
71
|
+
"width" : 6,
|
72
|
+
"height" : 0
|
73
|
+
},
|
74
|
+
"mongo.network" : {
|
75
|
+
"chartId" : "mongo.network",
|
76
|
+
"options" : {
|
77
|
+
"title" : { "text" : "Network Usage" },
|
78
|
+
"subtitle" : { "text" : "The Network 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" : "Network Usage",
|
96
|
+
"enabled" : true,
|
97
|
+
"align" : "center",
|
98
|
+
"verticalAlign" : "bottom"
|
99
|
+
}
|
100
|
+
},
|
101
|
+
"queries" : [{
|
102
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.network\\./i"
|
103
|
+
}],
|
104
|
+
"agentInstanceId" : null,
|
105
|
+
"menuId" : "mongo.server",
|
106
|
+
"order" : 0,
|
107
|
+
"width" : 6,
|
108
|
+
"height" : 0
|
109
|
+
},
|
110
|
+
"mongo.general" : {
|
111
|
+
"chartId" : "mongo.general",
|
112
|
+
"options" : {
|
113
|
+
"title" : { "text" : "Mongo general" },
|
114
|
+
"subtitle" : { "text" : "Mongo general information" },
|
115
|
+
"chart" : {
|
116
|
+
"type": "area"
|
117
|
+
},
|
118
|
+
"xAxis" : {
|
119
|
+
"title" : {
|
120
|
+
"text" : "Date"
|
121
|
+
},
|
122
|
+
"type" : "datetime"
|
123
|
+
},
|
124
|
+
"yAxis" : {
|
125
|
+
"title" : {
|
126
|
+
"text" : "bytes"
|
127
|
+
},
|
128
|
+
"type" : "linear"
|
129
|
+
},
|
130
|
+
"legend" : {
|
131
|
+
"title" : "Mongo general information",
|
132
|
+
"enabled" : true,
|
133
|
+
"align" : "center",
|
134
|
+
"verticalAlign" : "bottom"
|
135
|
+
}
|
136
|
+
},
|
137
|
+
"queries" : [{
|
138
|
+
"command" : "select derivative(value) from /^[[agentInstanceId]].mongo.general.connections\\./i WHERE time > now() - 300s GROUP BY time(10s)"
|
139
|
+
}],
|
140
|
+
"agentInstanceId" : null,
|
141
|
+
"menuId" : "mongo.server",
|
142
|
+
"order" : 0,
|
143
|
+
"width" : 12,
|
144
|
+
"height" : 0
|
145
|
+
},
|
146
|
+
"mongo.opcounts" : {
|
147
|
+
"chartId" : "mongo.opcounts",
|
148
|
+
"options" : {
|
149
|
+
"title" : { "text" : "Mongo Operation counts" },
|
150
|
+
"subtitle" : { "text" : "The mongo operation counts" },
|
151
|
+
"chart" : {
|
152
|
+
"type": "area"
|
153
|
+
},
|
154
|
+
"xAxis" : {
|
155
|
+
"title" : {
|
156
|
+
"text" : "Date"
|
157
|
+
},
|
158
|
+
"type" : "datetime"
|
159
|
+
},
|
160
|
+
"yAxis" : {
|
161
|
+
"title" : {
|
162
|
+
"text" : "bytes"
|
163
|
+
},
|
164
|
+
"type" : "linear"
|
165
|
+
},
|
166
|
+
"legend" : {
|
167
|
+
"title" : "Mongo Operation Counts",
|
168
|
+
"enabled" : true,
|
169
|
+
"align" : "center",
|
170
|
+
"verticalAlign" : "bottom"
|
171
|
+
}
|
172
|
+
},
|
173
|
+
"queries" : [{
|
174
|
+
"command" : "select derivative(value) from /^[[agentInstanceId]].mongo.opcounts\\./i WHERE time > now() - 300s GROUP BY time(10s)"
|
175
|
+
}],
|
176
|
+
"agentInstanceId" : null,
|
177
|
+
"menuId" : "mongo.server",
|
178
|
+
"order" : 0,
|
179
|
+
"width" : 12,
|
180
|
+
"height" : 0
|
181
|
+
},
|
182
|
+
"mongo.index.counter" : {
|
183
|
+
"chartId" : "mongo.index.counter",
|
184
|
+
"options" : {
|
185
|
+
"title" : { "text" : "Mongo Index Counter" },
|
186
|
+
"subtitle" : { "text" : "The index counter of the database" },
|
187
|
+
"chart" : {
|
188
|
+
"type": "area"
|
189
|
+
},
|
190
|
+
"xAxis" : {
|
191
|
+
"title" : {
|
192
|
+
"text" : "Date"
|
193
|
+
},
|
194
|
+
"type" : "datetime"
|
195
|
+
},
|
196
|
+
"yAxis" : {
|
197
|
+
"title" : {
|
198
|
+
"text" : "bytes"
|
199
|
+
},
|
200
|
+
"type" : "linear"
|
201
|
+
},
|
202
|
+
"legend" : {
|
203
|
+
"title" : "Mongo Index Counter",
|
204
|
+
"enabled" : true,
|
205
|
+
"align" : "center",
|
206
|
+
"verticalAlign" : "bottom"
|
207
|
+
}
|
208
|
+
},
|
209
|
+
"queries" : [{
|
210
|
+
"command" : "select derivative(value) from /^[[agentInstanceId]].mongo.index.counters\\./i WHERE time > now() - 300s GROUP BY time(10s)"
|
211
|
+
}],
|
212
|
+
"agentInstanceId" : null,
|
213
|
+
"menuId" : "mongo.server",
|
214
|
+
"order" : 0,
|
215
|
+
"width" : 12,
|
216
|
+
"height" : 0
|
217
|
+
},
|
218
|
+
"mongo.lock" : {
|
219
|
+
"chartId" : "mongo.lock",
|
220
|
+
"options" : {
|
221
|
+
"title" : { "text" : "Mongo lock times" },
|
222
|
+
"subtitle" : { "text" : "Mongo lock times" },
|
223
|
+
"chart" : {
|
224
|
+
"type": "area"
|
225
|
+
},
|
226
|
+
"xAxis" : {
|
227
|
+
"title" : {
|
228
|
+
"text" : "Date"
|
229
|
+
},
|
230
|
+
"type" : "datetime"
|
231
|
+
},
|
232
|
+
"yAxis" : {
|
233
|
+
"title" : {
|
234
|
+
"text" : "bytes"
|
235
|
+
},
|
236
|
+
"type" : "linear"
|
237
|
+
},
|
238
|
+
"legend" : {
|
239
|
+
"title" : "Mongo lock times",
|
240
|
+
"enabled" : true,
|
241
|
+
"align" : "center",
|
242
|
+
"verticalAlign" : "bottom"
|
243
|
+
}
|
244
|
+
},
|
245
|
+
"queries" : [{
|
246
|
+
"command" : "select derivative(value) from /^[[agentInstanceId]].mongo.global.lock\\./i WHERE time > now() - 300s GROUP BY time(10s)"
|
247
|
+
}],
|
248
|
+
"agentInstanceId" : null,
|
249
|
+
"menuId" : "mongo.server",
|
250
|
+
"order" : 0,
|
251
|
+
"width" : 12,
|
252
|
+
"height" : 0
|
253
|
+
},
|
254
|
+
"mongo.replicastate" : {
|
255
|
+
"chartId" : "mongo.replicastate",
|
256
|
+
"options" : {
|
257
|
+
"title" : { "text" : "Mongo Replica State" },
|
258
|
+
"subtitle" : { "text" : "The replica state of the MongoDB Cluster" },
|
259
|
+
"chart" : {
|
260
|
+
"type": "line"
|
261
|
+
},
|
262
|
+
"xAxis" : {
|
263
|
+
"title" : {
|
264
|
+
"text" : "Last 15 Minutes"
|
265
|
+
},
|
266
|
+
"type" : "datetime"
|
267
|
+
},
|
268
|
+
"yAxis" : {
|
269
|
+
"title" : {
|
270
|
+
"text" : "bytes"
|
271
|
+
},
|
272
|
+
"type" : "linear"
|
273
|
+
},
|
274
|
+
"legend" : {
|
275
|
+
"title" : "Replica state",
|
276
|
+
"enabled" : true,
|
277
|
+
"align" : "center",
|
278
|
+
"verticalAlign" : "bottom"
|
279
|
+
}
|
280
|
+
},
|
281
|
+
"queries" : [{
|
282
|
+
"command" : "select value from /^[[agentInstanceId]].mongo.replicatestate.member\\./i where time > now() - 15m group by time(15m)"
|
283
|
+
}],
|
284
|
+
"agentInstanceId" : null,
|
285
|
+
"menuId" : "mongo.replica",
|
286
|
+
"order" : 0,
|
287
|
+
"width" : 12,
|
288
|
+
"height" : 0
|
289
|
+
},
|
290
|
+
"mongo.collection.count" : {
|
291
|
+
"chartId" : "mongo.collection.count",
|
292
|
+
"options" : {
|
293
|
+
"title" : { "text" : "Mongo Collection Count Stats" },
|
294
|
+
"subtitle" : { "text" : "The collection count stats of the MongoDB Cluster" },
|
295
|
+
"chart" : {
|
296
|
+
"type": "line"
|
297
|
+
},
|
298
|
+
"xAxis" : {
|
299
|
+
"title" : {
|
300
|
+
"text" : "Last 15 Minutes"
|
301
|
+
},
|
302
|
+
"type" : "datetime"
|
303
|
+
},
|
304
|
+
"yAxis" : {
|
305
|
+
"title" : {
|
306
|
+
"text" : "bytes"
|
307
|
+
},
|
308
|
+
"type" : "linear"
|
309
|
+
},
|
310
|
+
"legend" : {
|
311
|
+
"title" : "Collection stats",
|
312
|
+
"enabled" : true,
|
313
|
+
"align" : "center",
|
314
|
+
"verticalAlign" : "bottom"
|
315
|
+
}
|
316
|
+
},
|
317
|
+
"queries" : [{
|
318
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.coll.count\\./i where time > now() - 15m group by time(15m)"
|
319
|
+
}],
|
320
|
+
"agentInstanceId" : null,
|
321
|
+
"menuId" : "mongo.collection",
|
322
|
+
"order" : 0,
|
323
|
+
"width" : 12,
|
324
|
+
"height" : 0
|
325
|
+
},
|
326
|
+
"mongo.collection.index" : {
|
327
|
+
"chartId" : "mongo.collection.index",
|
328
|
+
"options" : {
|
329
|
+
"title" : { "text" : "Mongo Collection index Stats" },
|
330
|
+
"subtitle" : { "text" : "The collection index stats of the MongoDB Cluster" },
|
331
|
+
"chart" : {
|
332
|
+
"type": "line"
|
333
|
+
},
|
334
|
+
"xAxis" : {
|
335
|
+
"title" : {
|
336
|
+
"text" : "Last 15 Minutes"
|
337
|
+
},
|
338
|
+
"type" : "datetime"
|
339
|
+
},
|
340
|
+
"yAxis" : {
|
341
|
+
"title" : {
|
342
|
+
"text" : "bytes"
|
343
|
+
},
|
344
|
+
"type" : "linear"
|
345
|
+
},
|
346
|
+
"legend" : {
|
347
|
+
"title" : "Collection index stats",
|
348
|
+
"enabled" : true,
|
349
|
+
"align" : "center",
|
350
|
+
"verticalAlign" : "bottom"
|
351
|
+
}
|
352
|
+
},
|
353
|
+
"queries" : [{
|
354
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.coll.index\\./i where time > now() - 15m group by time(15m)"
|
355
|
+
}],
|
356
|
+
"agentInstanceId" : null,
|
357
|
+
"menuId" : "mongo.collection",
|
358
|
+
"order" : 0,
|
359
|
+
"width" : 12,
|
360
|
+
"height" : 0
|
361
|
+
},
|
362
|
+
"mongo.collection.size" : {
|
363
|
+
"chartId" : "mongo.collection.size",
|
364
|
+
"options" : {
|
365
|
+
"title" : { "text" : "Mongo Collection size Stats" },
|
366
|
+
"subtitle" : { "text" : "The collection size stats of the MongoDB Cluster" },
|
367
|
+
"chart" : {
|
368
|
+
"type": "line"
|
369
|
+
},
|
370
|
+
"xAxis" : {
|
371
|
+
"title" : {
|
372
|
+
"text" : "Last 15 Minutes"
|
373
|
+
},
|
374
|
+
"type" : "datetime"
|
375
|
+
},
|
376
|
+
"yAxis" : {
|
377
|
+
"title" : {
|
378
|
+
"text" : "bytes"
|
379
|
+
},
|
380
|
+
"type" : "linear"
|
381
|
+
},
|
382
|
+
"legend" : {
|
383
|
+
"title" : "Collection size stats",
|
384
|
+
"enabled" : true,
|
385
|
+
"align" : "center",
|
386
|
+
"verticalAlign" : "bottom"
|
387
|
+
}
|
388
|
+
},
|
389
|
+
"queries" : [{
|
390
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.coll.size\\./i where time > now() - 15m group by time(15m)"
|
391
|
+
}],
|
392
|
+
"agentInstanceId" : null,
|
393
|
+
"menuId" : "mongo.collection",
|
394
|
+
"order" : 0,
|
395
|
+
"width" : 12,
|
396
|
+
"height" : 0
|
397
|
+
},
|
398
|
+
"mongo.collection.item" : {
|
399
|
+
"chartId" : "mongo.collection.item",
|
400
|
+
"options" : {
|
401
|
+
"title" : { "text" : "Mongo Collection item Stats" },
|
402
|
+
"subtitle" : { "text" : "The collection item of the MongoDB Cluster" },
|
403
|
+
"chart" : {
|
404
|
+
"type": "line"
|
405
|
+
},
|
406
|
+
"xAxis" : {
|
407
|
+
"title" : {
|
408
|
+
"text" : "Last 15 Minutes"
|
409
|
+
},
|
410
|
+
"type" : "datetime"
|
411
|
+
},
|
412
|
+
"yAxis" : {
|
413
|
+
"title" : {
|
414
|
+
"text" : "bytes"
|
415
|
+
},
|
416
|
+
"type" : "linear"
|
417
|
+
},
|
418
|
+
"legend" : {
|
419
|
+
"title" : "Collection item stats",
|
420
|
+
"enabled" : true,
|
421
|
+
"align" : "center",
|
422
|
+
"verticalAlign" : "bottom"
|
423
|
+
}
|
424
|
+
},
|
425
|
+
"queries" : [{
|
426
|
+
"command" : "select mean(value) from /^[[agentInstanceId]].mongo.coll.item\\./i where time > now() - 15m group by time(15m)"
|
427
|
+
}],
|
428
|
+
"agentInstanceId" : null,
|
429
|
+
"menuId" : "mongo.collection",
|
430
|
+
"order" : 0,
|
431
|
+
"width" : 12,
|
432
|
+
"height" : 0
|
433
|
+
}
|
434
|
+
}
|