ovirt_metrics 1.4.1 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/ovirt_metrics/column_definitions.rb +4 -4
- data/lib/ovirt_metrics/models/host_configuration.rb +0 -14
- data/lib/ovirt_metrics/models/host_samples_history.rb +1 -1
- data/lib/ovirt_metrics/models/vm_samples_history.rb +1 -1
- data/lib/ovirt_metrics/version.rb +1 -1
- data/spec/models/host_samples_history_spec.rb +10 -10
- data/spec/models/vm_disk_samples_history_spec.rb +4 -4
- data/spec/models/vm_samples_history_spec.rb +3 -8
- data/spec/support/active_record.rb +0 -6
- metadata +5 -9
- data/spec/models/host_configuration_spec.rb +0 -31
- data/spec/schemas/schema_rhev30.rb +0 -655
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 44450df0a7e97dcfb4ce4130086d6f9bffae58357cc9b0b86c64449c38a7294b
|
4
|
+
data.tar.gz: b41dd6c590ce4c99bf0a3892c9dd941bb56df5b0477b2f7982c4b26fa6558873
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 051223d519ad682d3e5d91115de76d25d3cbbbf87ca81a686a287ad92199da2535fea4e2842aeb0fe582ca29e5f139c87e2cca713cce1ffa498a0a948945a3e0
|
7
|
+
data.tar.gz: 6c4fd514f05daf23892844ca0a162eb2753aa2f2cd104b01c22b41644fd0e631e222efbb65ab4f4f11949594c765ece5f1a8c0bcd719b8bf541e3823230bf2e4
|
@@ -21,7 +21,7 @@ module OvirtMetrics
|
|
21
21
|
:counter_key => "cpu_usagemhz_rate_average",
|
22
22
|
:instance => "",
|
23
23
|
:capture_interval => "20",
|
24
|
-
:precision =>
|
24
|
+
:precision => 1,
|
25
25
|
:rollup => "average",
|
26
26
|
:unit_key => "megahertz",
|
27
27
|
:capture_interval_name => "realtime"
|
@@ -55,7 +55,7 @@ module OvirtMetrics
|
|
55
55
|
:counter_key => "disk_usage_rate_average",
|
56
56
|
:instance => "",
|
57
57
|
:capture_interval => "20",
|
58
|
-
:precision =>
|
58
|
+
:precision => 1,
|
59
59
|
:rollup => "average",
|
60
60
|
:unit_key => "kilobytespersecond",
|
61
61
|
:capture_interval_name => "realtime"
|
@@ -69,7 +69,7 @@ module OvirtMetrics
|
|
69
69
|
:counter_key => "net_usage_rate_average",
|
70
70
|
:instance => "",
|
71
71
|
:capture_interval => "20",
|
72
|
-
:precision =>
|
72
|
+
:precision => 1,
|
73
73
|
:rollup => "average",
|
74
74
|
:unit_key => "kilobytespersecond",
|
75
75
|
:capture_interval_name => "realtime"
|
@@ -89,7 +89,7 @@ module OvirtMetrics
|
|
89
89
|
:counter_key => "net_usage_rate_average",
|
90
90
|
:instance => "",
|
91
91
|
:capture_interval => "20",
|
92
|
-
:precision =>
|
92
|
+
:precision => 1,
|
93
93
|
:rollup => "average",
|
94
94
|
:unit_key => "kilobytespersecond",
|
95
95
|
:capture_interval_name => "realtime"
|
@@ -3,19 +3,5 @@ module OvirtMetrics
|
|
3
3
|
has_many :host_interface_configurations, :foreign_key => :host_configuration_version
|
4
4
|
|
5
5
|
belongs_to :cluster_configuration, :foreign_key => :cluster_configuration_version
|
6
|
-
|
7
|
-
GHZ_REGEX = /.*\@\s*(\d+\.\d+)GHz/
|
8
|
-
MHZ_REGEX = /.*\@\s*(\d+\.\d+)MHz/
|
9
|
-
def speed_in_mhz
|
10
|
-
if self.cpu_model.respond_to?(:match)
|
11
|
-
match = self.cpu_model.match(GHZ_REGEX)
|
12
|
-
return (match[1].to_f * 1024) if match
|
13
|
-
|
14
|
-
match = self.cpu_model.match(MHZ_REGEX)
|
15
|
-
return match[1].to_f if match
|
16
|
-
end
|
17
|
-
|
18
|
-
return nil
|
19
|
-
end
|
20
6
|
end
|
21
7
|
end
|
@@ -4,7 +4,7 @@ module OvirtMetrics
|
|
4
4
|
|
5
5
|
def cpu_usagemhz_rate_average
|
6
6
|
return 0.0 if self.host_configuration.nil?
|
7
|
-
speed_of_host = self.host_configuration.
|
7
|
+
speed_of_host = self.host_configuration.cpu_speed_mh.to_f * self.host_configuration.number_of_cores.to_i
|
8
8
|
return (speed_of_host * (self.cpu_usage_percent.to_f / 100.0))
|
9
9
|
end
|
10
10
|
end
|
@@ -4,7 +4,7 @@ module OvirtMetrics
|
|
4
4
|
belongs_to :vm_configuration, :foreign_key => :vm_configuration_version
|
5
5
|
|
6
6
|
def cpu_usagemhz_rate_average
|
7
|
-
speed_of_host = self.host_configuration.try(:
|
7
|
+
speed_of_host = self.host_configuration.try(:cpu_speed_mh).to_f
|
8
8
|
|
9
9
|
# TODO: Research if self.host_configuration.speed_in_mhz is aggregate or per core/socket
|
10
10
|
# enumerator = self.vm_configuration.cpu_per_socket * self.vm_configuration.number_of_sockets
|
@@ -9,25 +9,25 @@ describe OvirtMetrics::HostSamplesHistory do
|
|
9
9
|
|
10
10
|
context "when host_configuration exists" do
|
11
11
|
before(:each) { @host_configuration = OvirtMetrics::HostConfiguration.new }
|
12
|
-
it "and
|
12
|
+
it "and cpu_speed_mh and number_of_cores is nil" do
|
13
13
|
host_history = described_class.new(:host_configuration => @host_configuration)
|
14
14
|
expect(host_history.cpu_usagemhz_rate_average).to eq(0)
|
15
15
|
end
|
16
16
|
|
17
|
-
it "and
|
17
|
+
it "and cpu_speed_mh is nil and number_of_cores is numeric" do
|
18
18
|
host_history = described_class.new(:host_configuration => @host_configuration)
|
19
19
|
allow(@host_configuration).to receive_messages(:number_of_cores => 1)
|
20
20
|
expect(host_history.cpu_usagemhz_rate_average).to eq(0)
|
21
21
|
end
|
22
22
|
|
23
|
-
it "and
|
23
|
+
it "and cpu_speed_mh is numeric and number_of_cores is nil" do
|
24
24
|
host_history = described_class.new(:host_configuration => @host_configuration)
|
25
|
-
allow(@host_configuration).to receive_messages(:
|
25
|
+
allow(@host_configuration).to receive_messages(:cpu_speed_mh => 2048.0)
|
26
26
|
expect(host_history.cpu_usagemhz_rate_average).to eq(0)
|
27
27
|
end
|
28
28
|
|
29
|
-
it "and
|
30
|
-
allow(@host_configuration).to receive_messages(:
|
29
|
+
it "and cpu_speed_mh is numeric and number_of_cores is numeric" do
|
30
|
+
allow(@host_configuration).to receive_messages(:cpu_speed_mh => 2048.0)
|
31
31
|
allow(@host_configuration).to receive_messages(:number_of_cores => 2)
|
32
32
|
|
33
33
|
host_history = described_class.new(
|
@@ -40,13 +40,13 @@ describe OvirtMetrics::HostSamplesHistory do
|
|
40
40
|
end
|
41
41
|
end
|
42
42
|
|
43
|
-
context "RHEV 3.
|
44
|
-
before(:each) {
|
43
|
+
context "RHEV 3.1" do
|
44
|
+
before(:each) { load_rhev_31 }
|
45
45
|
it_should_behave_like "HostSamplesHistory"
|
46
46
|
end
|
47
47
|
|
48
|
-
context "RHEV
|
49
|
-
before(:each) {
|
48
|
+
context "RHEV 4" do
|
49
|
+
before(:each) { load_rhev_40 }
|
50
50
|
it_should_behave_like "HostSamplesHistory"
|
51
51
|
end
|
52
52
|
end
|
@@ -30,13 +30,13 @@ describe OvirtMetrics::VmDiskSamplesHistory do
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
-
context "RHEV 3.
|
34
|
-
before(:each) {
|
33
|
+
context "RHEV 3.1" do
|
34
|
+
before(:each) { load_rhev_31 }
|
35
35
|
it_should_behave_like "VmDiskSamplesHistory"
|
36
36
|
end
|
37
37
|
|
38
|
-
context "RHEV
|
39
|
-
before(:each) {
|
38
|
+
context "RHEV 4" do
|
39
|
+
before(:each) { load_rhev_40 }
|
40
40
|
it_should_behave_like "VmDiskSamplesHistory"
|
41
41
|
end
|
42
42
|
end
|
@@ -9,14 +9,14 @@ describe OvirtMetrics::VmSamplesHistory do
|
|
9
9
|
end
|
10
10
|
|
11
11
|
context "when host_configuration exists" do
|
12
|
-
it "and
|
12
|
+
it "and cpu_speed_mh is nil" do
|
13
13
|
vm_history = described_class.new(:host_configuration => OvirtMetrics::HostConfiguration.new)
|
14
14
|
expect(vm_history.cpu_usagemhz_rate_average).to eq(0)
|
15
15
|
end
|
16
16
|
|
17
|
-
it "and
|
17
|
+
it "and cpu_speed_mh is not nil" do
|
18
18
|
host_configuration = OvirtMetrics::HostConfiguration.new
|
19
|
-
allow(host_configuration).to receive_messages(:
|
19
|
+
allow(host_configuration).to receive_messages(:cpu_speed_mh => 2048.0)
|
20
20
|
|
21
21
|
vm_history = described_class.new(
|
22
22
|
:cpu_usage_percent => 50,
|
@@ -28,11 +28,6 @@ describe OvirtMetrics::VmSamplesHistory do
|
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
31
|
-
context "RHEV 3.0" do
|
32
|
-
before(:each) { load_rhev_30 }
|
33
|
-
it_should_behave_like "VmSamplesHistory"
|
34
|
-
end
|
35
|
-
|
36
31
|
context "RHEV 3.1" do
|
37
32
|
before(:each) { load_rhev_31 }
|
38
33
|
it_should_behave_like "VmSamplesHistory"
|
@@ -29,12 +29,6 @@ RSpec.configure do |config|
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
-
def load_rhev_30
|
33
|
-
ActiveRecord::Schema.verbose = false
|
34
|
-
load File.join(File.dirname(__FILE__), %w{.. schemas schema_rhev30.rb})
|
35
|
-
reset_models
|
36
|
-
end
|
37
|
-
|
38
32
|
def load_rhev_31
|
39
33
|
ActiveRecord::Schema.verbose = false
|
40
34
|
load File.join(File.dirname(__FILE__), %w{.. schemas schema_rhev31.rb})
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ovirt_metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleg Barenboim
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -104,7 +104,7 @@ dependencies:
|
|
104
104
|
version: 4.2.3
|
105
105
|
- - "<"
|
106
106
|
- !ruby/object:Gem::Version
|
107
|
-
version: '5.
|
107
|
+
version: '5.2'
|
108
108
|
type: :runtime
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -114,7 +114,7 @@ dependencies:
|
|
114
114
|
version: 4.2.3
|
115
115
|
- - "<"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '5.
|
117
|
+
version: '5.2'
|
118
118
|
- !ruby/object:Gem::Dependency
|
119
119
|
name: pg
|
120
120
|
requirement: !ruby/object:Gem::Requirement
|
@@ -221,13 +221,11 @@ files:
|
|
221
221
|
- lib/ovirt_metrics/models/vm_samples_history.rb
|
222
222
|
- lib/ovirt_metrics/nic_metrics.rb
|
223
223
|
- lib/ovirt_metrics/version.rb
|
224
|
-
- spec/models/host_configuration_spec.rb
|
225
224
|
- spec/models/host_samples_history_spec.rb
|
226
225
|
- spec/models/vm_disk_samples_history_spec.rb
|
227
226
|
- spec/models/vm_samples_history_spec.rb
|
228
227
|
- spec/nic_metrics_spec.rb
|
229
228
|
- spec/ovirt_metrics_spec.rb
|
230
|
-
- spec/schemas/schema_rhev30.rb
|
231
229
|
- spec/schemas/schema_rhev31.rb
|
232
230
|
- spec/schemas/schema_rhev40.rb
|
233
231
|
- spec/spec_helper.rb
|
@@ -252,18 +250,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
250
|
version: '0'
|
253
251
|
requirements: []
|
254
252
|
rubyforge_project:
|
255
|
-
rubygems_version: 2.
|
253
|
+
rubygems_version: 2.7.2
|
256
254
|
signing_key:
|
257
255
|
specification_version: 4
|
258
256
|
summary: OvirtMetrics is an ActiveRecord-based gem for reading the oVirt History database.
|
259
257
|
test_files:
|
260
|
-
- spec/models/host_configuration_spec.rb
|
261
258
|
- spec/models/host_samples_history_spec.rb
|
262
259
|
- spec/models/vm_disk_samples_history_spec.rb
|
263
260
|
- spec/models/vm_samples_history_spec.rb
|
264
261
|
- spec/nic_metrics_spec.rb
|
265
262
|
- spec/ovirt_metrics_spec.rb
|
266
|
-
- spec/schemas/schema_rhev30.rb
|
267
263
|
- spec/schemas/schema_rhev31.rb
|
268
264
|
- spec/schemas/schema_rhev40.rb
|
269
265
|
- spec/spec_helper.rb
|
@@ -1,31 +0,0 @@
|
|
1
|
-
describe OvirtMetrics::HostConfiguration do
|
2
|
-
shared_examples_for "HostConfiguration" do
|
3
|
-
context "#speed_in_mhz" do
|
4
|
-
it "when cpu_model is nil" do
|
5
|
-
expect(described_class.new(:cpu_model => nil).speed_in_mhz).to be_nil
|
6
|
-
end
|
7
|
-
|
8
|
-
it "when cpu_model is in GHz" do
|
9
|
-
expect(described_class.new(:cpu_model => "Intel(R) Xeon(R) CPU E5506 @ 2.00GHz").speed_in_mhz).to eq(2048.0)
|
10
|
-
end
|
11
|
-
|
12
|
-
it "when cpu_model is in MHz" do
|
13
|
-
expect(described_class.new(:cpu_model => "Intel(R) Xeon(R) CPU E5506 @ 2.00MHz").speed_in_mhz).to eq(2.0)
|
14
|
-
end
|
15
|
-
|
16
|
-
it "when cpu_model is some other string" do
|
17
|
-
expect(described_class.new(:cpu_model => "XXX").speed_in_mhz).to be_nil
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
context "RHEV 3.0" do
|
23
|
-
before(:each) { load_rhev_30 }
|
24
|
-
it_should_behave_like "HostConfiguration"
|
25
|
-
end
|
26
|
-
|
27
|
-
context "RHEV 3.1" do
|
28
|
-
before(:each) { load_rhev_31 }
|
29
|
-
it_should_behave_like "HostConfiguration"
|
30
|
-
end
|
31
|
-
end
|
@@ -1,655 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
# This file is auto-generated from the current state of the database. Instead
|
3
|
-
# of editing this file, please use the migrations feature of Active Record to
|
4
|
-
# incrementally modify your database, and then regenerate this schema definition.
|
5
|
-
#
|
6
|
-
# Note that this schema.rb definition is the authoritative source for your
|
7
|
-
# database schema. If you need to create the application database on another
|
8
|
-
# system, you should be using db:schema:load, not running all the migrations
|
9
|
-
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
10
|
-
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
11
|
-
#
|
12
|
-
# It's strongly recommended to check this file into your version control system.
|
13
|
-
|
14
|
-
ActiveRecord::Schema.define(:version => 20130115171747) do
|
15
|
-
|
16
|
-
create_table "calendar", :id => false, :force => true do |t|
|
17
|
-
t.datetime "the_datetime", :null => false
|
18
|
-
t.date "the_date", :null => false
|
19
|
-
t.integer "the_year", :limit => 2, :null => false
|
20
|
-
t.integer "the_month", :limit => 2, :null => false
|
21
|
-
t.string "month_name", :limit => 9, :null => false
|
22
|
-
t.integer "the_day", :limit => 2, :null => false
|
23
|
-
t.string "day_name", :limit => 9, :null => false
|
24
|
-
t.time "the_hour", :null => false
|
25
|
-
end
|
26
|
-
|
27
|
-
add_index "calendar", ["the_date"], :name => "calendar_table_index"
|
28
|
-
|
29
|
-
create_table "cluster_configuration", :primary_key => "history_id", :force => true do |t|
|
30
|
-
t.string "cluster_id", :limit => nil, :null => false
|
31
|
-
t.string "cluster_name", :limit => 40, :null => false
|
32
|
-
t.string "cluster_description", :limit => 4000
|
33
|
-
t.string "datacenter_id", :limit => nil
|
34
|
-
t.string "cpu_name"
|
35
|
-
t.string "compatibility_version", :limit => 40, :default => "2.2", :null => false
|
36
|
-
t.integer "datacenter_configuration_version"
|
37
|
-
t.datetime "create_date"
|
38
|
-
t.datetime "update_date"
|
39
|
-
t.datetime "delete_date"
|
40
|
-
end
|
41
|
-
|
42
|
-
add_index "cluster_configuration", ["cluster_id"], :name => "cluster_configuration_cluster_id_idx"
|
43
|
-
add_index "cluster_configuration", ["datacenter_id"], :name => "cluster_configuration_datacenter_id_idx"
|
44
|
-
|
45
|
-
create_table "datacenter_configuration", :primary_key => "history_id", :force => true do |t|
|
46
|
-
t.string "datacenter_id", :limit => nil, :null => false
|
47
|
-
t.string "datacenter_name", :limit => 40, :null => false
|
48
|
-
t.string "datacenter_description", :limit => 4000, :null => false
|
49
|
-
t.integer "storage_type", :limit => 2, :null => false
|
50
|
-
t.datetime "create_date"
|
51
|
-
t.datetime "update_date"
|
52
|
-
t.datetime "delete_date"
|
53
|
-
end
|
54
|
-
|
55
|
-
add_index "datacenter_configuration", ["datacenter_id"], :name => "datacenter_configuration_datacenter_id_idx"
|
56
|
-
|
57
|
-
create_table "datacenter_daily_history", :primary_key => "history_id", :force => true do |t|
|
58
|
-
t.datetime "history_datetime", :null => false
|
59
|
-
t.string "datacenter_id", :limit => nil, :null => false
|
60
|
-
t.integer "datacenter_status", :limit => 2, :null => false
|
61
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
62
|
-
t.integer "datacenter_configuration_version", :null => false
|
63
|
-
end
|
64
|
-
|
65
|
-
add_index "datacenter_daily_history", ["datacenter_configuration_version"], :name => "idx_datacenter_configuration_version_daily"
|
66
|
-
add_index "datacenter_daily_history", ["datacenter_id"], :name => "datacenter_daily_history_datacenter_id_idx"
|
67
|
-
add_index "datacenter_daily_history", ["history_datetime"], :name => "idx_datacenter_history_datetime_daily"
|
68
|
-
|
69
|
-
create_table "datacenter_hourly_history", :primary_key => "history_id", :force => true do |t|
|
70
|
-
t.datetime "history_datetime", :null => false
|
71
|
-
t.string "datacenter_id", :limit => nil, :null => false
|
72
|
-
t.integer "datacenter_status", :limit => 2, :null => false
|
73
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
74
|
-
t.integer "datacenter_configuration_version", :null => false
|
75
|
-
end
|
76
|
-
|
77
|
-
add_index "datacenter_hourly_history", ["datacenter_configuration_version"], :name => "idx_datacenter_configuration_version_hourly"
|
78
|
-
add_index "datacenter_hourly_history", ["datacenter_id"], :name => "datacenter_hourly_history_datacenter_id_idx"
|
79
|
-
add_index "datacenter_hourly_history", ["history_datetime"], :name => "idx_datacenter_history_datetime_hourly"
|
80
|
-
|
81
|
-
create_table "datacenter_samples_history", :primary_key => "history_id", :force => true do |t|
|
82
|
-
t.datetime "history_datetime", :null => false
|
83
|
-
t.string "datacenter_id", :limit => nil, :null => false
|
84
|
-
t.integer "datacenter_status", :limit => 2, :null => false
|
85
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
86
|
-
t.integer "datacenter_configuration_version", :null => false
|
87
|
-
end
|
88
|
-
|
89
|
-
add_index "datacenter_samples_history", ["datacenter_configuration_version"], :name => "idx_datacenter_configuration_version_samples"
|
90
|
-
add_index "datacenter_samples_history", ["datacenter_id"], :name => "datacenter_samples_history_datacenter_id_idx"
|
91
|
-
add_index "datacenter_samples_history", ["history_datetime"], :name => "idx_datacenter_history_datetime_samples"
|
92
|
-
|
93
|
-
create_table "datacenter_storage_domain_map", :primary_key => "history_id", :force => true do |t|
|
94
|
-
t.string "storage_domain_id", :limit => nil, :null => false
|
95
|
-
t.string "datacenter_id", :limit => nil, :null => false
|
96
|
-
t.datetime "attach_date", :null => false
|
97
|
-
t.datetime "detach_date"
|
98
|
-
end
|
99
|
-
|
100
|
-
add_index "datacenter_storage_domain_map", ["datacenter_id"], :name => "datacenter_storage_domain_map_datacenter_id_idx"
|
101
|
-
add_index "datacenter_storage_domain_map", ["storage_domain_id"], :name => "datacenter_storage_domain_map_storage_domain_id_idx"
|
102
|
-
|
103
|
-
create_table "disks_vm_map", :primary_key => "history_id", :force => true do |t|
|
104
|
-
t.string "vm_disk_id", :limit => nil, :null => false
|
105
|
-
t.string "vm_id", :limit => nil, :null => false
|
106
|
-
t.datetime "attach_date", :null => false
|
107
|
-
t.datetime "detach_date"
|
108
|
-
end
|
109
|
-
|
110
|
-
add_index "disks_vm_map", ["vm_disk_id"], :name => "disks_vm_map_vm_disk_id_idx"
|
111
|
-
add_index "disks_vm_map", ["vm_id"], :name => "disks_vm_map_vm_id_idx"
|
112
|
-
|
113
|
-
create_table "enum_translator", :id => false, :force => true do |t|
|
114
|
-
t.string "enum_type", :limit => 40, :null => false
|
115
|
-
t.integer "enum_key", :limit => 2, :null => false
|
116
|
-
t.string "language_code", :limit => 40, :null => false
|
117
|
-
t.string "value", :limit => 40, :null => false
|
118
|
-
end
|
119
|
-
|
120
|
-
create_table "history_configuration", :id => false, :force => true do |t|
|
121
|
-
t.string "var_name", :limit => 50, :null => false
|
122
|
-
t.string "var_value"
|
123
|
-
t.datetime "var_datetime"
|
124
|
-
end
|
125
|
-
|
126
|
-
create_table "host_configuration", :primary_key => "history_id", :force => true do |t|
|
127
|
-
t.string "host_id", :limit => nil, :null => false
|
128
|
-
t.string "host_unique_id", :limit => 128
|
129
|
-
t.string "host_name", :null => false
|
130
|
-
t.string "cluster_id", :limit => nil, :null => false
|
131
|
-
t.integer "host_type", :limit => 2, :default => 0, :null => false
|
132
|
-
t.string "fqn_or_ip", :null => false
|
133
|
-
t.integer "memory_size_mb"
|
134
|
-
t.integer "swap_size_mb"
|
135
|
-
t.string "cpu_model"
|
136
|
-
t.integer "number_of_cores", :limit => 2
|
137
|
-
t.string "host_os"
|
138
|
-
t.string "pm_ip_address"
|
139
|
-
t.string "kernel_version"
|
140
|
-
t.string "kvm_version"
|
141
|
-
t.string "vdsm_version", :limit => 40
|
142
|
-
t.integer "vdsm_port", :null => false
|
143
|
-
t.integer "cluster_configuration_version"
|
144
|
-
t.datetime "create_date"
|
145
|
-
t.datetime "update_date"
|
146
|
-
t.datetime "delete_date"
|
147
|
-
end
|
148
|
-
|
149
|
-
add_index "host_configuration", ["cluster_id"], :name => "host_configuration_cluster_id_idx"
|
150
|
-
add_index "host_configuration", ["host_id"], :name => "host_configuration_host_id_idx"
|
151
|
-
|
152
|
-
create_table "host_daily_history", :primary_key => "history_id", :force => true do |t|
|
153
|
-
t.datetime "history_datetime", :null => false
|
154
|
-
t.string "host_id", :limit => nil, :null => false
|
155
|
-
t.integer "host_status", :limit => 2, :null => false
|
156
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
157
|
-
t.integer "memory_usage_percent", :limit => 2, :default => 0
|
158
|
-
t.integer "max_memory_usage", :limit => 2
|
159
|
-
t.integer "cpu_usage_percent", :limit => 2
|
160
|
-
t.integer "max_cpu_usage", :limit => 2
|
161
|
-
t.integer "ksm_cpu_percent", :limit => 2, :default => 0
|
162
|
-
t.integer "max_ksm_cpu_percent", :limit => 2, :default => 0
|
163
|
-
t.integer "active_vms", :limit => 2, :default => 0
|
164
|
-
t.integer "max_active_vms", :limit => 2, :default => 0
|
165
|
-
t.integer "total_vms", :limit => 2, :default => 0
|
166
|
-
t.integer "max_total_vms", :limit => 2, :default => 0
|
167
|
-
t.integer "total_vms_vcpus", :default => 0
|
168
|
-
t.integer "max_total_vms_vcpus", :default => 0
|
169
|
-
t.integer "cpu_load", :default => 0
|
170
|
-
t.integer "max_cpu_load", :default => 0
|
171
|
-
t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
|
172
|
-
t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
|
173
|
-
t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
|
174
|
-
t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
|
175
|
-
t.integer "swap_used_mb"
|
176
|
-
t.integer "max_swap_used_mb"
|
177
|
-
t.integer "host_configuration_version"
|
178
|
-
end
|
179
|
-
|
180
|
-
add_index "host_daily_history", ["history_datetime"], :name => "idx_host_history_datetime_daily"
|
181
|
-
add_index "host_daily_history", ["host_configuration_version"], :name => "idx_host_configuration_version_daily"
|
182
|
-
add_index "host_daily_history", ["host_id"], :name => "host_daily_history_host_id_idx"
|
183
|
-
|
184
|
-
create_table "host_hourly_history", :primary_key => "history_id", :force => true do |t|
|
185
|
-
t.datetime "history_datetime", :null => false
|
186
|
-
t.string "host_id", :limit => nil, :null => false
|
187
|
-
t.integer "host_status", :limit => 2, :null => false
|
188
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
189
|
-
t.integer "memory_usage_percent", :limit => 2, :default => 0
|
190
|
-
t.integer "max_memory_usage", :limit => 2
|
191
|
-
t.integer "cpu_usage_percent", :limit => 2
|
192
|
-
t.integer "max_cpu_usage", :limit => 2
|
193
|
-
t.integer "ksm_cpu_percent", :limit => 2, :default => 0
|
194
|
-
t.integer "max_ksm_cpu_percent", :limit => 2, :default => 0
|
195
|
-
t.integer "active_vms", :limit => 2, :default => 0
|
196
|
-
t.integer "max_active_vms", :limit => 2, :default => 0
|
197
|
-
t.integer "total_vms", :limit => 2, :default => 0
|
198
|
-
t.integer "max_total_vms", :limit => 2, :default => 0
|
199
|
-
t.integer "total_vms_vcpus", :default => 0
|
200
|
-
t.integer "max_total_vms_vcpus", :default => 0
|
201
|
-
t.integer "cpu_load", :default => 0
|
202
|
-
t.integer "max_cpu_load", :default => 0
|
203
|
-
t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
|
204
|
-
t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
|
205
|
-
t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
|
206
|
-
t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
|
207
|
-
t.integer "swap_used_mb"
|
208
|
-
t.integer "max_swap_used_mb"
|
209
|
-
t.integer "host_configuration_version"
|
210
|
-
end
|
211
|
-
|
212
|
-
add_index "host_hourly_history", ["history_datetime"], :name => "idx_host_history_datetime_hourly"
|
213
|
-
add_index "host_hourly_history", ["host_configuration_version"], :name => "idx_host_configuration_version_hourly"
|
214
|
-
add_index "host_hourly_history", ["host_id"], :name => "host_hourly_history_host_id_idx"
|
215
|
-
|
216
|
-
create_table "host_interface_configuration", :primary_key => "history_id", :force => true do |t|
|
217
|
-
t.string "host_interface_id", :limit => nil, :null => false
|
218
|
-
t.string "host_interface_name", :limit => 50, :null => false
|
219
|
-
t.string "host_id", :limit => nil, :null => false
|
220
|
-
t.integer "host_interface_type", :limit => 2
|
221
|
-
t.integer "host_interface_speed_bps"
|
222
|
-
t.string "mac_address", :limit => 20
|
223
|
-
t.string "network_name", :limit => 50
|
224
|
-
t.string "ip_address", :limit => 20
|
225
|
-
t.string "gateway", :limit => 20
|
226
|
-
t.boolean "bond"
|
227
|
-
t.string "bond_name", :limit => 50
|
228
|
-
t.integer "vlan_id"
|
229
|
-
t.integer "host_configuration_version"
|
230
|
-
t.datetime "create_date"
|
231
|
-
t.datetime "update_date"
|
232
|
-
t.datetime "delete_date"
|
233
|
-
end
|
234
|
-
|
235
|
-
add_index "host_interface_configuration", ["host_id"], :name => "host_interface_configuration_host_id_idx"
|
236
|
-
add_index "host_interface_configuration", ["host_interface_id"], :name => "host_interface_configuration_host_interface_id_idx"
|
237
|
-
|
238
|
-
create_table "host_interface_daily_history", :primary_key => "history_id", :force => true do |t|
|
239
|
-
t.datetime "history_datetime", :null => false
|
240
|
-
t.string "host_interface_id", :limit => nil, :null => false
|
241
|
-
t.integer "receive_rate_percent", :limit => 2
|
242
|
-
t.integer "max_receive_rate_percent", :limit => 2
|
243
|
-
t.integer "transmit_rate_percent", :limit => 2
|
244
|
-
t.integer "max_transmit_rate_percent", :limit => 2
|
245
|
-
t.integer "host_interface_configuration_version"
|
246
|
-
end
|
247
|
-
|
248
|
-
add_index "host_interface_daily_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_daily"
|
249
|
-
add_index "host_interface_daily_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_daily"
|
250
|
-
add_index "host_interface_daily_history", ["host_interface_id"], :name => "host_interface_daily_history_host_interface_id_idx"
|
251
|
-
|
252
|
-
create_table "host_interface_hourly_history", :primary_key => "history_id", :force => true do |t|
|
253
|
-
t.datetime "history_datetime", :null => false
|
254
|
-
t.string "host_interface_id", :limit => nil, :null => false
|
255
|
-
t.integer "receive_rate_percent", :limit => 2
|
256
|
-
t.integer "max_receive_rate_percent", :limit => 2
|
257
|
-
t.integer "transmit_rate_percent", :limit => 2
|
258
|
-
t.integer "max_transmit_rate_percent", :limit => 2
|
259
|
-
t.integer "host_interface_configuration_version"
|
260
|
-
end
|
261
|
-
|
262
|
-
add_index "host_interface_hourly_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_hourly"
|
263
|
-
add_index "host_interface_hourly_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_hourly"
|
264
|
-
add_index "host_interface_hourly_history", ["host_interface_id"], :name => "host_interface_hourly_history_host_interface_id_idx"
|
265
|
-
|
266
|
-
create_table "host_interface_samples_history", :primary_key => "history_id", :force => true do |t|
|
267
|
-
t.datetime "history_datetime", :null => false
|
268
|
-
t.string "host_interface_id", :limit => nil, :null => false
|
269
|
-
t.integer "receive_rate_percent", :limit => 2
|
270
|
-
t.integer "transmit_rate_percent", :limit => 2
|
271
|
-
t.integer "host_interface_configuration_version"
|
272
|
-
end
|
273
|
-
|
274
|
-
add_index "host_interface_samples_history", ["history_datetime"], :name => "idx_host_interface_history_datetime_samples"
|
275
|
-
add_index "host_interface_samples_history", ["host_interface_configuration_version"], :name => "idx_host_interface_configuration_version_samples"
|
276
|
-
add_index "host_interface_samples_history", ["host_interface_id"], :name => "host_interface_samples_history_host_interface_id_idx"
|
277
|
-
|
278
|
-
create_table "host_samples_history", :primary_key => "history_id", :force => true do |t|
|
279
|
-
t.datetime "history_datetime", :null => false
|
280
|
-
t.string "host_id", :limit => nil, :null => false
|
281
|
-
t.integer "host_status", :limit => 2, :null => false
|
282
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
283
|
-
t.integer "memory_usage_percent", :limit => 2, :default => 0
|
284
|
-
t.integer "cpu_usage_percent", :limit => 2
|
285
|
-
t.integer "ksm_cpu_percent", :limit => 2, :default => 0
|
286
|
-
t.integer "active_vms", :limit => 2, :default => 0
|
287
|
-
t.integer "total_vms", :limit => 2, :default => 0
|
288
|
-
t.integer "total_vms_vcpus", :default => 0
|
289
|
-
t.integer "cpu_load", :default => 0
|
290
|
-
t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
|
291
|
-
t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
|
292
|
-
t.integer "swap_used_mb"
|
293
|
-
t.integer "host_configuration_version"
|
294
|
-
end
|
295
|
-
|
296
|
-
add_index "host_samples_history", ["history_datetime"], :name => "idx_host_history_datetime_samples"
|
297
|
-
add_index "host_samples_history", ["host_configuration_version"], :name => "idx_host_configuration_version_samples"
|
298
|
-
add_index "host_samples_history", ["host_id"], :name => "host_samples_history_host_id_idx"
|
299
|
-
|
300
|
-
create_table "period", :id => false, :force => true do |t|
|
301
|
-
t.string "month_name", :limit => 20, :null => false
|
302
|
-
t.date "month_startdate", :null => false
|
303
|
-
t.date "month_enddate", :null => false
|
304
|
-
t.date "quarter_enddate", :null => false
|
305
|
-
end
|
306
|
-
|
307
|
-
create_table "storage_domain_configuration", :primary_key => "history_id", :force => true do |t|
|
308
|
-
t.string "storage_domain_id", :limit => nil, :null => false
|
309
|
-
t.string "storage_domain_name", :limit => 250, :null => false
|
310
|
-
t.integer "storage_domain_type", :limit => 2, :null => false
|
311
|
-
t.integer "storage_type", :limit => 2, :null => false
|
312
|
-
t.datetime "create_date"
|
313
|
-
t.datetime "update_date"
|
314
|
-
t.datetime "delete_date"
|
315
|
-
end
|
316
|
-
|
317
|
-
add_index "storage_domain_configuration", ["storage_domain_id"], :name => "storage_domain_configuration_storage_domain_id_idx"
|
318
|
-
|
319
|
-
create_table "storage_domain_daily_history", :primary_key => "history_id", :force => true do |t|
|
320
|
-
t.datetime "history_datetime", :null => false
|
321
|
-
t.string "storage_domain_id", :limit => nil, :null => false
|
322
|
-
t.integer "available_disk_size_gb"
|
323
|
-
t.integer "used_disk_size_gb"
|
324
|
-
t.integer "storage_configuration_version"
|
325
|
-
end
|
326
|
-
|
327
|
-
add_index "storage_domain_daily_history", ["history_datetime"], :name => "idx_storage_domain_history_datetime_daily"
|
328
|
-
add_index "storage_domain_daily_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_daily"
|
329
|
-
add_index "storage_domain_daily_history", ["storage_domain_id"], :name => "storage_domain_daily_history_storage_domain_id_idx"
|
330
|
-
|
331
|
-
create_table "storage_domain_hourly_history", :primary_key => "history_id", :force => true do |t|
|
332
|
-
t.datetime "history_datetime", :null => false
|
333
|
-
t.string "storage_domain_id", :limit => nil, :null => false
|
334
|
-
t.integer "available_disk_size_gb"
|
335
|
-
t.integer "used_disk_size_gb"
|
336
|
-
t.integer "storage_configuration_version"
|
337
|
-
end
|
338
|
-
|
339
|
-
add_index "storage_domain_hourly_history", ["history_datetime"], :name => "idx_storage_history_datetime_hourly"
|
340
|
-
add_index "storage_domain_hourly_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_hourly"
|
341
|
-
add_index "storage_domain_hourly_history", ["storage_domain_id"], :name => "storage_domain_hourly_history_storage_domain_id_idx"
|
342
|
-
|
343
|
-
create_table "storage_domain_samples_history", :primary_key => "history_id", :force => true do |t|
|
344
|
-
t.datetime "history_datetime", :null => false
|
345
|
-
t.string "storage_domain_id", :limit => nil, :null => false
|
346
|
-
t.integer "available_disk_size_gb"
|
347
|
-
t.integer "used_disk_size_gb"
|
348
|
-
t.integer "storage_configuration_version"
|
349
|
-
end
|
350
|
-
|
351
|
-
add_index "storage_domain_samples_history", ["history_datetime"], :name => "idx_storage_history_datetime_samples"
|
352
|
-
add_index "storage_domain_samples_history", ["storage_configuration_version"], :name => "idx_storage_configuration_version_samples"
|
353
|
-
add_index "storage_domain_samples_history", ["storage_domain_id"], :name => "storage_domain_samples_history_storage_domain_id_idx"
|
354
|
-
|
355
|
-
create_table "tag_details", :primary_key => "history_id", :force => true do |t|
|
356
|
-
t.string "tag_id", :limit => nil, :null => false
|
357
|
-
t.string "tag_name", :limit => 50, :null => false
|
358
|
-
t.string "tag_description", :limit => 4000
|
359
|
-
t.string "tag_path", :limit => 4000, :null => false
|
360
|
-
t.integer "tag_level", :limit => 2, :null => false
|
361
|
-
t.datetime "create_date", :null => false
|
362
|
-
t.datetime "update_date"
|
363
|
-
t.datetime "delete_date"
|
364
|
-
end
|
365
|
-
|
366
|
-
add_index "tag_details", ["tag_id"], :name => "tag_details_tag_id_idx"
|
367
|
-
add_index "tag_details", ["tag_level"], :name => "tag_details_tag_level_idx"
|
368
|
-
add_index "tag_details", ["tag_path"], :name => "tag_details_tag_path_idx"
|
369
|
-
|
370
|
-
create_table "tag_relations_history", :primary_key => "history_id", :force => true do |t|
|
371
|
-
t.string "entity_id", :limit => nil, :null => false
|
372
|
-
t.integer "entity_type", :limit => 2, :null => false
|
373
|
-
t.string "parent_id", :limit => nil
|
374
|
-
t.datetime "attach_date", :null => false
|
375
|
-
t.datetime "detach_date"
|
376
|
-
end
|
377
|
-
|
378
|
-
add_index "tag_relations_history", ["entity_id", "attach_date"], :name => "ix_tag_relations_history"
|
379
|
-
add_index "tag_relations_history", ["entity_type"], :name => "ix_tag_relations_history_1"
|
380
|
-
add_index "tag_relations_history", ["parent_id"], :name => "tag_relations_history_parent_id_idx"
|
381
|
-
|
382
|
-
create_table "vm_configuration", :primary_key => "history_id", :force => true do |t|
|
383
|
-
t.string "vm_id", :limit => nil, :null => false
|
384
|
-
t.string "vm_name", :null => false
|
385
|
-
t.string "vm_description", :limit => 4000
|
386
|
-
t.integer "vm_type", :limit => 2
|
387
|
-
t.string "cluster_id", :limit => nil, :null => false
|
388
|
-
t.string "template_id", :limit => nil, :null => false
|
389
|
-
t.string "template_name", :limit => 40
|
390
|
-
t.integer "cpu_per_socket", :limit => 2
|
391
|
-
t.integer "number_of_sockets", :limit => 2
|
392
|
-
t.integer "memory_size_mb"
|
393
|
-
t.integer "operating_system", :limit => 2, :default => 0, :null => false
|
394
|
-
t.string "ad_domain", :limit => 40
|
395
|
-
t.string "default_host", :limit => nil
|
396
|
-
t.boolean "high_availability"
|
397
|
-
t.boolean "initialized"
|
398
|
-
t.boolean "stateless"
|
399
|
-
t.boolean "fail_back"
|
400
|
-
t.boolean "auto_suspend", :default => false
|
401
|
-
t.integer "usb_policy", :limit => 2
|
402
|
-
t.string "time_zone", :limit => 40
|
403
|
-
t.integer "cluster_configuration_version"
|
404
|
-
t.integer "default_host_configuration_version"
|
405
|
-
t.datetime "create_date"
|
406
|
-
t.datetime "update_date"
|
407
|
-
t.datetime "delete_date"
|
408
|
-
end
|
409
|
-
|
410
|
-
add_index "vm_configuration", ["cluster_id"], :name => "vm_configuration_cluster_id_idx"
|
411
|
-
add_index "vm_configuration", ["vm_id"], :name => "vm_configuration_vm_id_idx"
|
412
|
-
|
413
|
-
create_table "vm_daily_history", :primary_key => "history_id", :force => true do |t|
|
414
|
-
t.datetime "history_datetime", :null => false
|
415
|
-
t.string "vm_id", :limit => nil, :null => false
|
416
|
-
t.integer "vm_status", :limit => 2, :null => false
|
417
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
418
|
-
t.integer "cpu_usage_percent", :limit => 2, :default => 0
|
419
|
-
t.integer "max_cpu_usage", :limit => 2
|
420
|
-
t.integer "memory_usage_percent", :limit => 2, :default => 0
|
421
|
-
t.integer "max_memory_usage", :limit => 2
|
422
|
-
t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
|
423
|
-
t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
|
424
|
-
t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
|
425
|
-
t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
|
426
|
-
t.datetime "vm_last_up_time"
|
427
|
-
t.datetime "vm_last_boot_time"
|
428
|
-
t.string "vm_ip"
|
429
|
-
t.string "current_user_name"
|
430
|
-
t.string "currently_running_on_host", :limit => nil
|
431
|
-
t.integer "vm_configuration_version"
|
432
|
-
t.integer "current_host_configuration_version"
|
433
|
-
end
|
434
|
-
|
435
|
-
add_index "vm_daily_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_daily"
|
436
|
-
add_index "vm_daily_history", ["history_datetime"], :name => "idx_vm_history_datetime_daily"
|
437
|
-
add_index "vm_daily_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_daily"
|
438
|
-
add_index "vm_daily_history", ["vm_id"], :name => "vm_daily_history_vm_id_idx"
|
439
|
-
|
440
|
-
create_table "vm_disk_configuration", :primary_key => "history_id", :force => true do |t|
|
441
|
-
t.string "vm_disk_id", :limit => nil, :null => false
|
442
|
-
t.string "storage_domain_id", :limit => nil
|
443
|
-
t.integer "vm_internal_drive_mapping", :limit => 2
|
444
|
-
t.string "vm_disk_description", :limit => 4000
|
445
|
-
t.integer "vm_disk_size_mb"
|
446
|
-
t.integer "vm_disk_type", :limit => 2
|
447
|
-
t.integer "vm_disk_format", :limit => 2
|
448
|
-
t.integer "vm_disk_interface", :limit => 2
|
449
|
-
t.datetime "create_date"
|
450
|
-
t.datetime "update_date"
|
451
|
-
t.datetime "delete_date"
|
452
|
-
end
|
453
|
-
|
454
|
-
add_index "vm_disk_configuration", ["storage_domain_id"], :name => "vm_disk_configuration_storage_domain_id_idx"
|
455
|
-
add_index "vm_disk_configuration", ["vm_disk_id"], :name => "vm_disk_configuration_vm_disk_id_idx"
|
456
|
-
|
457
|
-
create_table "vm_disk_daily_history", :primary_key => "history_id", :force => true do |t|
|
458
|
-
t.datetime "history_datetime", :null => false
|
459
|
-
t.string "vm_disk_id", :limit => nil, :null => false
|
460
|
-
t.integer "vm_disk_status", :limit => 2
|
461
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
462
|
-
t.integer "vm_disk_actual_size_mb", :null => false
|
463
|
-
t.integer "read_rate_bytes_per_second"
|
464
|
-
t.integer "max_read_rate_bytes_per_second"
|
465
|
-
t.decimal "read_latency_seconds", :precision => 18, :scale => 9
|
466
|
-
t.decimal "max_read_latency_seconds", :precision => 18, :scale => 9
|
467
|
-
t.integer "write_rate_bytes_per_second"
|
468
|
-
t.integer "max_write_rate_bytes_per_second"
|
469
|
-
t.decimal "write_latency_seconds", :precision => 18, :scale => 9
|
470
|
-
t.decimal "max_write_latency_seconds", :precision => 18, :scale => 9
|
471
|
-
t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
|
472
|
-
t.decimal "max_flush_latency_seconds", :precision => 18, :scale => 9
|
473
|
-
t.integer "vm_disk_configuration_version"
|
474
|
-
end
|
475
|
-
|
476
|
-
add_index "vm_disk_daily_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_daily"
|
477
|
-
add_index "vm_disk_daily_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_daily"
|
478
|
-
add_index "vm_disk_daily_history", ["vm_disk_id"], :name => "vm_disk_daily_history_vm_disk_id_idx"
|
479
|
-
|
480
|
-
create_table "vm_disk_hourly_history", :primary_key => "history_id", :force => true do |t|
|
481
|
-
t.datetime "history_datetime", :null => false
|
482
|
-
t.string "vm_disk_id", :limit => nil, :null => false
|
483
|
-
t.integer "vm_disk_status", :limit => 2
|
484
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
485
|
-
t.integer "vm_disk_actual_size_mb", :null => false
|
486
|
-
t.integer "read_rate_bytes_per_second"
|
487
|
-
t.integer "max_read_rate_bytes_per_second"
|
488
|
-
t.decimal "read_latency_seconds", :precision => 18, :scale => 9
|
489
|
-
t.decimal "max_read_latency_seconds", :precision => 18, :scale => 9
|
490
|
-
t.integer "write_rate_bytes_per_second"
|
491
|
-
t.integer "max_write_rate_bytes_per_second"
|
492
|
-
t.decimal "write_latency_seconds", :precision => 18, :scale => 9
|
493
|
-
t.decimal "max_write_latency_seconds", :precision => 18, :scale => 9
|
494
|
-
t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
|
495
|
-
t.decimal "max_flush_latency_seconds", :precision => 18, :scale => 9
|
496
|
-
t.integer "vm_disk_configuration_version"
|
497
|
-
end
|
498
|
-
|
499
|
-
add_index "vm_disk_hourly_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_hourly"
|
500
|
-
add_index "vm_disk_hourly_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_hourly"
|
501
|
-
add_index "vm_disk_hourly_history", ["vm_disk_id"], :name => "vm_disk_hourly_history_vm_disk_id_idx"
|
502
|
-
|
503
|
-
create_table "vm_disk_samples_history", :primary_key => "history_id", :force => true do |t|
|
504
|
-
t.datetime "history_datetime", :null => false
|
505
|
-
t.string "vm_disk_id", :limit => nil, :null => false
|
506
|
-
t.integer "vm_disk_status", :limit => 2
|
507
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
508
|
-
t.integer "vm_disk_actual_size_mb", :null => false
|
509
|
-
t.integer "read_rate_bytes_per_second"
|
510
|
-
t.decimal "read_latency_seconds", :precision => 18, :scale => 9
|
511
|
-
t.integer "write_rate_bytes_per_second"
|
512
|
-
t.decimal "write_latency_seconds", :precision => 18, :scale => 9
|
513
|
-
t.decimal "flush_latency_seconds", :precision => 18, :scale => 9
|
514
|
-
t.integer "vm_disk_configuration_version"
|
515
|
-
end
|
516
|
-
|
517
|
-
add_index "vm_disk_samples_history", ["history_datetime"], :name => "idx_vm_disk_history_datetime_samples"
|
518
|
-
add_index "vm_disk_samples_history", ["vm_disk_configuration_version"], :name => "idx_vm_disk_configuration_version_samples"
|
519
|
-
add_index "vm_disk_samples_history", ["vm_disk_id"], :name => "vm_disk_samples_history_vm_disk_id_idx"
|
520
|
-
|
521
|
-
create_table "vm_disks_usage_daily_history", :primary_key => "history_id", :force => true do |t|
|
522
|
-
t.datetime "history_datetime", :null => false
|
523
|
-
t.string "vm_id", :limit => nil, :null => false
|
524
|
-
t.text "disks_usage"
|
525
|
-
end
|
526
|
-
|
527
|
-
add_index "vm_disks_usage_daily_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_daily"
|
528
|
-
add_index "vm_disks_usage_daily_history", ["vm_id"], :name => "idx_disks_usage_vm_id_daily"
|
529
|
-
|
530
|
-
create_table "vm_disks_usage_hourly_history", :primary_key => "history_id", :force => true do |t|
|
531
|
-
t.datetime "history_datetime", :null => false
|
532
|
-
t.string "vm_id", :limit => nil, :null => false
|
533
|
-
t.text "disks_usage"
|
534
|
-
end
|
535
|
-
|
536
|
-
add_index "vm_disks_usage_hourly_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_hourly"
|
537
|
-
add_index "vm_disks_usage_hourly_history", ["vm_id"], :name => "idx_disks_usage_vm_id_hourly"
|
538
|
-
|
539
|
-
create_table "vm_disks_usage_samples_history", :primary_key => "history_id", :force => true do |t|
|
540
|
-
t.datetime "history_datetime", :null => false
|
541
|
-
t.string "vm_id", :limit => nil, :null => false
|
542
|
-
t.text "disks_usage"
|
543
|
-
end
|
544
|
-
|
545
|
-
add_index "vm_disks_usage_samples_history", ["history_datetime"], :name => "idx_disks_usage_history_datetime_samples"
|
546
|
-
add_index "vm_disks_usage_samples_history", ["vm_id"], :name => "idx_disks_usage_vm_id_samples"
|
547
|
-
|
548
|
-
create_table "vm_hourly_history", :primary_key => "history_id", :force => true do |t|
|
549
|
-
t.datetime "history_datetime", :null => false
|
550
|
-
t.string "vm_id", :limit => nil, :null => false
|
551
|
-
t.integer "vm_status", :limit => 2, :null => false
|
552
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
553
|
-
t.integer "cpu_usage_percent", :limit => 2, :default => 0
|
554
|
-
t.integer "max_cpu_usage", :limit => 2
|
555
|
-
t.integer "memory_usage_percent", :limit => 2, :default => 0
|
556
|
-
t.integer "max_memory_usage", :limit => 2
|
557
|
-
t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
|
558
|
-
t.integer "max_user_cpu_usage_percent", :limit => 2, :default => 0
|
559
|
-
t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
|
560
|
-
t.integer "max_system_cpu_usage_percent", :limit => 2, :default => 0
|
561
|
-
t.datetime "vm_last_up_time"
|
562
|
-
t.datetime "vm_last_boot_time"
|
563
|
-
t.string "vm_ip"
|
564
|
-
t.string "current_user_name"
|
565
|
-
t.string "currently_running_on_host", :limit => nil
|
566
|
-
t.integer "vm_configuration_version"
|
567
|
-
t.integer "current_host_configuration_version"
|
568
|
-
end
|
569
|
-
|
570
|
-
add_index "vm_hourly_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_hourly"
|
571
|
-
add_index "vm_hourly_history", ["history_datetime"], :name => "idx_vm_history_datetime_hourly"
|
572
|
-
add_index "vm_hourly_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_hourly"
|
573
|
-
add_index "vm_hourly_history", ["vm_id"], :name => "vm_hourly_history_vm_id_idx"
|
574
|
-
|
575
|
-
create_table "vm_interface_configuration", :primary_key => "history_id", :force => true do |t|
|
576
|
-
t.string "vm_interface_id", :limit => nil, :null => false
|
577
|
-
t.string "vm_interface_name", :limit => 50, :null => false
|
578
|
-
t.string "vm_id", :limit => nil
|
579
|
-
t.integer "vm_interface_type", :limit => 2
|
580
|
-
t.integer "vm_interface_speed_bps"
|
581
|
-
t.string "mac_address", :limit => 20
|
582
|
-
t.string "network_name", :limit => 50
|
583
|
-
t.integer "vm_configuration_version"
|
584
|
-
t.datetime "create_date"
|
585
|
-
t.datetime "update_date"
|
586
|
-
t.datetime "delete_date"
|
587
|
-
end
|
588
|
-
|
589
|
-
add_index "vm_interface_configuration", ["vm_id"], :name => "vm_interface_configuration_vm_id_idx"
|
590
|
-
add_index "vm_interface_configuration", ["vm_interface_id"], :name => "vm_interface_configuration_vm_interface_id_idx"
|
591
|
-
|
592
|
-
create_table "vm_interface_daily_history", :primary_key => "history_id", :force => true do |t|
|
593
|
-
t.datetime "history_datetime", :null => false
|
594
|
-
t.string "vm_interface_id", :limit => nil, :null => false
|
595
|
-
t.integer "receive_rate_percent", :limit => 2
|
596
|
-
t.integer "max_receive_rate_percent", :limit => 2
|
597
|
-
t.integer "transmit_rate_percent", :limit => 2
|
598
|
-
t.integer "max_transmit_rate_percent", :limit => 2
|
599
|
-
t.integer "vm_interface_configuration_version"
|
600
|
-
end
|
601
|
-
|
602
|
-
add_index "vm_interface_daily_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_daily"
|
603
|
-
add_index "vm_interface_daily_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_daily"
|
604
|
-
add_index "vm_interface_daily_history", ["vm_interface_id"], :name => "vm_interface_daily_history_vm_interface_id_idx"
|
605
|
-
|
606
|
-
create_table "vm_interface_hourly_history", :primary_key => "history_id", :force => true do |t|
|
607
|
-
t.datetime "history_datetime", :null => false
|
608
|
-
t.string "vm_interface_id", :limit => nil, :null => false
|
609
|
-
t.integer "receive_rate_percent", :limit => 2
|
610
|
-
t.integer "max_receive_rate_percent", :limit => 2
|
611
|
-
t.integer "transmit_rate_percent", :limit => 2
|
612
|
-
t.integer "max_transmit_rate_percent", :limit => 2
|
613
|
-
t.integer "vm_interface_configuration_version"
|
614
|
-
end
|
615
|
-
|
616
|
-
add_index "vm_interface_hourly_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_hourly"
|
617
|
-
add_index "vm_interface_hourly_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_hourly"
|
618
|
-
add_index "vm_interface_hourly_history", ["vm_interface_id"], :name => "vm_interface_hourly_history_vm_interface_id_idx"
|
619
|
-
|
620
|
-
create_table "vm_interface_samples_history", :primary_key => "history_id", :force => true do |t|
|
621
|
-
t.datetime "history_datetime", :null => false
|
622
|
-
t.string "vm_interface_id", :limit => nil, :null => false
|
623
|
-
t.integer "receive_rate_percent", :limit => 2
|
624
|
-
t.integer "transmit_rate_percent", :limit => 2
|
625
|
-
t.integer "vm_interface_configuration_version"
|
626
|
-
end
|
627
|
-
|
628
|
-
add_index "vm_interface_samples_history", ["history_datetime"], :name => "idx_vm_interface_history_datetime_samples"
|
629
|
-
add_index "vm_interface_samples_history", ["vm_interface_configuration_version"], :name => "idx_vm_interface_configuration_version_samples"
|
630
|
-
add_index "vm_interface_samples_history", ["vm_interface_id"], :name => "vm_interface_samples_history_vm_interface_id_idx"
|
631
|
-
|
632
|
-
create_table "vm_samples_history", :primary_key => "history_id", :force => true do |t|
|
633
|
-
t.datetime "history_datetime", :null => false
|
634
|
-
t.string "vm_id", :limit => nil, :null => false
|
635
|
-
t.integer "vm_status", :limit => 2, :null => false
|
636
|
-
t.decimal "minutes_in_status", :precision => 7, :scale => 2, :default => 1.0, :null => false
|
637
|
-
t.integer "cpu_usage_percent", :limit => 2, :default => 0
|
638
|
-
t.integer "memory_usage_percent", :limit => 2, :default => 0
|
639
|
-
t.integer "user_cpu_usage_percent", :limit => 2, :default => 0
|
640
|
-
t.integer "system_cpu_usage_percent", :limit => 2, :default => 0
|
641
|
-
t.datetime "vm_last_up_time"
|
642
|
-
t.datetime "vm_last_boot_time"
|
643
|
-
t.string "vm_ip"
|
644
|
-
t.string "current_user_name"
|
645
|
-
t.string "currently_running_on_host", :limit => nil
|
646
|
-
t.integer "vm_configuration_version"
|
647
|
-
t.integer "current_host_configuration_version"
|
648
|
-
end
|
649
|
-
|
650
|
-
add_index "vm_samples_history", ["current_host_configuration_version"], :name => "idx_vm_current_host_configuration_samples"
|
651
|
-
add_index "vm_samples_history", ["history_datetime"], :name => "idx_vm_history_datetime_samples"
|
652
|
-
add_index "vm_samples_history", ["vm_configuration_version"], :name => "idx_vm_configuration_version_samples"
|
653
|
-
add_index "vm_samples_history", ["vm_id"], :name => "vm_samples_history_vm_id_idx"
|
654
|
-
|
655
|
-
end
|