24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
|
# File 'lib/fog/google/requests/monitoring/list_metric_descriptors.rb', line 24
def list_metric_descriptors(_options = {})
body = {
"metricDescriptors" => [
{
"type" => "compute.googleapis.com/instance/cpu/reserved_cores",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/cpu/reserved_cores",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
}
],
"metricKind" => "GAUGE",
"valueType" => "DOUBLE",
"unit" => "1",
"description" => "Number of cores reserved on the host of the instance.",
"displayName" => "Reserved cores"
},
{
"type" => "compute.googleapis.com/instance/cpu/usage_time",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/cpu/usage_time",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
}
],
"metricKind" => "DELTA",
"valueType" => "DOUBLE",
"unit" => "s",
"description" => "Delta CPU usage for all cores, in seconds. To compute the per-core CPU utilization fraction, divide this value by (end-start)*N, where end and start define this value's time interval and N is `compute.googleapis.com/instance/cpu/reserved_cores` at the end of the interval.",
"displayName" => "CPU usage"
},
{
"type" => "compute.googleapis.com/instance/disk/read_bytes_count",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/disk/read_bytes_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "device_name",
"description" => "The name of the disk device."
},
{
"key" => "storage_type",
"description" => "The storage type => `pd-standard` or `pd-ssd`."
},
{
"key" => "device_type",
"description" => "The disk type => `ephemeral` or `permanent`."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "By",
"description" => "Delta count of bytes read from disk.",
"displayName" => "Disk read bytes"
},
{
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/disk/read_ops_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "device_name",
"description" => "The name of the disk device."
},
{
"key" => "storage_type",
"description" => "The storage type => `pd-standard` or `pd-ssd`."
},
{
"key" => "device_type",
"description" => "The disk type => `ephemeral` or `permanent`."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "1",
"description" => "Delta count of disk read IO operations.",
"displayName" => "Disk read operations",
"type" => "compute.googleapis.com/instance/disk/read_ops_count"
},
{
"type" => "compute.googleapis.com/instance/disk/write_bytes_count",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/disk/write_bytes_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "device_name",
"description" => "The name of the disk device."
},
{
"key" => "storage_type",
"description" => "The storage type => `pd-standard` or `pd-ssd`."
},
{
"key" => "device_type",
"description" => "The disk type => `ephemeral` or `permanent`."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "By",
"description" => "Delta count of bytes written to disk.",
"displayName" => "Disk write bytes"
},
{
"type" => "compute.googleapis.com/instance/disk/write_ops_count",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/disk/write_ops_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "device_name",
"description" => "The name of the disk device."
},
{
"key" => "storage_type",
"description" => "The storage type => `pd-standard` or `pd-ssd`."
},
{
"key" => "device_type",
"description" => "The disk type => `ephemeral` or `permanent`."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "1",
"description" => "Delta count of disk write IO operations.",
"displayName" => "Disk write operations"
},
{
"type" => "compute.googleapis.com/instance/network/received_packets_count",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/network/received_packets_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "loadbalanced",
"valueType" => "BOOL",
"description" => "Whether traffic was received by an L3 loadbalanced IP address assigned to the VM. Traffic that is externally routed to the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "1",
"description" => "Delta count of packets received from the network.",
"displayName" => "Received packets"
},
{
"type" => "compute.googleapis.com/instance/network/sent_bytes_count",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/network/sent_bytes_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "loadbalanced",
"valueType" => "BOOL",
"description" => "Whether traffic was sent from an L3 loadbalanced IP address assigned to the VM. Traffic that is externally routed from the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "By",
"description" => "Delta count of bytes sent over the network.",
"displayName" => "Sent bytes"
},
{
"type" => "compute.googleapis.com/instance/network/sent_packets_count",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/network/sent_packets_count",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
},
{
"key" => "loadbalanced",
"valueType" => "BOOL",
"description" => "Whether traffic was sent from an L3 loadbalanced IP address assigned to the VM. Traffic that is externally routed from the VM's standard internal or external IP address, such as L7 loadbalanced traffic, is not considered to be loadbalanced in this metric."
}
],
"metricKind" => "DELTA",
"valueType" => "INT64",
"unit" => "1",
"description" => "Delta count of packets sent over the network.",
"displayName" => "Sent packets"
},
{
"type" => "compute.googleapis.com/instance/uptime",
"name" => "projects/#{@project}/metricDescriptors/compute.googleapis.com/instance/uptime",
"labels" => [
{
"key" => "instance_name",
"description" => "The name of the VM instance."
}
],
"metricKind" => "DELTA",
"valueType" => "DOUBLE",
"unit" => "s",
"description" => "How long the VM has been running, in seconds.",
"displayName" => "Uptime"
}
]
}
build_excon_response(body)
end
|