You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: plugins/inputs/vsphere/README.md
+47
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ vm_metric_exclude = [ "*" ]
27
27
28
28
## VMs
29
29
## Typical VM metrics (if omitted or empty, all metrics are collected)
30
+
# vm_include = [ "/*/vm/**"] # Inventory path to VMs to collect (by default all are collected)
30
31
vm_metric_include = [
31
32
"cpu.demand.average",
32
33
"cpu.idle.summation",
@@ -68,6 +69,7 @@ vm_metric_exclude = [ "*" ]
68
69
69
70
## Hosts
70
71
## Typical host metrics (if omitted or empty, all metrics are collected)
72
+
# host_include = [ "/*/host/**"] # Inventory path to hosts to collect (by default all are collected)
71
73
host_metric_include = [
72
74
"cpu.coreUtilization.average",
73
75
"cpu.costop.summation",
@@ -120,16 +122,19 @@ vm_metric_exclude = [ "*" ]
120
122
# host_instances = true ## true by default
121
123
122
124
## Clusters
125
+
# cluster_include = [ "/*/host/**"] # Inventory path to clusters to collect (by default all are collected)
123
126
# cluster_metric_include = [] ## if omitted or empty, all metrics are collected
124
127
# cluster_metric_exclude = [] ## Nothing excluded by default
125
128
# cluster_instances = false ## false by default
126
129
127
130
## Datastores
131
+
# cluster_include = [ "/*/datastore/**"] # Inventory path to datastores to collect (by default all are collected)
128
132
# datastore_metric_include = [] ## if omitted or empty, all metrics are collected
129
133
# datastore_metric_exclude = [] ## Nothing excluded by default
130
134
# datastore_instances = false ## false by default
131
135
132
136
## Datacenters
137
+
# datacenter_include = [ "/*/host/**"] # Inventory path to clusters to collect (by default all are collected)
133
138
datacenter_metric_include = [] ## if omitted or empty, all metrics are collected
134
139
datacenter_metric_exclude = [ "*" ] ## Datacenters are not collected by default.
135
140
# datacenter_instances = false ## false by default
@@ -196,6 +201,48 @@ For setting up concurrency, modify `collect_concurrency` and `discover_concurren
196
201
# discover_concurrency = 1
197
202
```
198
203
204
+
### Inventory Paths
205
+
Resources to be monitored can be selected using Inventory Paths. This treats the vSphere inventory as a tree structure similar
206
+
to a file system. A vSphere inventory has a structure similar to this:
207
+
208
+
```
209
+
<root>
210
+
+-DC0 # Virtual datacenter
211
+
+-datastore # Datastore folder (created by system)
212
+
| +-Datastore1
213
+
+-host # Host folder (created by system)
214
+
| +-Cluster1
215
+
| | +-Host1
216
+
| | | +-VM1
217
+
| | | +-VM2
218
+
| | | +-hadoop1
219
+
| +-Host2 # Dummy cluster created for non-clustered host
220
+
| | +-Host2
221
+
| | | +-VM3
222
+
| | | +-VM4
223
+
+-vm # VM folder (created by system)
224
+
| +-VM1
225
+
| +-VM2
226
+
| +-Folder1
227
+
| | +-hadoop1
228
+
| | +-NestedFolder1
229
+
| | | +-VM3
230
+
| | | +-VM4
231
+
```
232
+
233
+
#### Using Inventory Paths
234
+
Using familiar UNIX-style paths, one could select e.g. VM2 with the path ```/DC0/vm/VM2```.
235
+
236
+
Often, we want to select a group of resource, such as all the VMs in a folder. We could use the path ```/DC0/vm/Folder1/*``` for that.
237
+
238
+
Another possibility is to select objects using a partial name, such as ```/DC0/vm/Folder1/hadoop*``` yielding all vms in Folder1 with a name starting with "hadoop".
239
+
240
+
Finally, due to the arbitrary nesting of the folder structure, we need a "recursive wildcard" for traversing multiple folders. We use the "**" symbol for that. If we want to look for a VM with a name starting with "hadoop" in any folder, we could use the following path: ```/DC0/vm/**/hadoop*```
241
+
242
+
#### Multiple paths to VMs
243
+
As we can see from the example tree above, VMs appear both in its on folder under the datacenter, as well as under the hosts. This is useful when you like to select VMs on a specific host. For example, ```/DC0/host/Cluster1/Host1/hadoop*``` selects all VMs with a name starting with "hadoop" that are running on Host1.
244
+
245
+
We can extend this to looking at a cluster level: ```/DC0/host/Cluster1/*/hadoop*```. This selects any VM matching "hadoop*" on any host in Cluster1.
0 commit comments