Skip to content

Commit

Permalink
Set default metricsets in vsphere module
Browse files Browse the repository at this point in the history
  • Loading branch information
jsoriano committed Mar 27, 2018
1 parent 96b5aee commit 01c53c2
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 13 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ https://github.com/elastic/beats/compare/v6.0.0-beta2...master[Check the HEAD di
- Add experimental module to collect metrics from munin nodes. {pull}6517[6517]
- Add support for wildcards and explicit metrics grouping in jolokia/jmx. {pull}6462[6462]
- Set `collector` as default metricset in Prometheus module. {pull}6636[6636]
- Set default metricsets in vSphere module. {pull}6676[6676]

*Packetbeat*

Expand Down
2 changes: 1 addition & 1 deletion metricbeat/docs/modules/vsphere.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ beta[]

The vSphere module uses the https://github.com/vmware/govmomi[Govmomi] library to collect metrics from any Vmware SDK URL (ESXi/VCenter). This library is built for and tested against ESXi and vCenter 5.5, 6.0 and 6.5.

By default it enables the metricsets `datastore`, `host` and `virtualmachine`.


[float]
Expand All @@ -21,7 +22,6 @@ in <<configuration-metricbeat>>. Here is an example configuration:
----
metricbeat.modules:
- module: vsphere
metricsets: ["datastore", "host", "virtualmachine"]
period: 10s
hosts: ["https://localhost/sdk"]
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,7 @@ metricbeat.modules:

#------------------------------- vSphere Module ------------------------------
- module: vsphere
enabled: true
metricsets: ["datastore", "host", "virtualmachine"]
period: 10s
hosts: ["https://localhost/sdk"]
Expand All @@ -487,7 +488,6 @@ metricbeat.modules:
insecure: false
# Get custom fields when using virtualmachine metric set. Default false.
# get_custom_fields: false


#------------------------------- Windows Module ------------------------------
- module: windows
Expand Down
12 changes: 12 additions & 0 deletions metricbeat/module/vsphere/_meta/config.reference.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- module: vsphere
enabled: true
metricsets: ["datastore", "host", "virtualmachine"]
period: 10s
hosts: ["https://localhost/sdk"]

username: "user"
password: "password"
# If insecure is true, don't verify the server's certificate chain
insecure: false
# Get custom fields when using virtualmachine metric set. Default false.
# get_custom_fields: false
1 change: 0 additions & 1 deletion metricbeat/module/vsphere/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- module: vsphere
metricsets: ["datastore", "host", "virtualmachine"]
period: 10s
hosts: ["https://localhost/sdk"]

Expand Down
1 change: 1 addition & 0 deletions metricbeat/module/vsphere/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
The vSphere module uses the https://github.com/vmware/govmomi[Govmomi] library to collect metrics from any Vmware SDK URL (ESXi/VCenter). This library is built for and tested against ESXi and vCenter 5.5, 6.0 and 6.5.

By default it enables the metricsets `datastore`, `host` and `virtualmachine`.
6 changes: 3 additions & 3 deletions metricbeat/module/vsphere/datastore/datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ import (
)

func init() {
if err := mb.Registry.AddMetricSet("vsphere", "datastore", New); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("vsphere", "datastore", New,
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down
6 changes: 3 additions & 3 deletions metricbeat/module/vsphere/host/host.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ import (
)

func init() {
if err := mb.Registry.AddMetricSet("vsphere", "host", New); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("vsphere", "host", New,
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down
6 changes: 3 additions & 3 deletions metricbeat/module/vsphere/virtualmachine/virtualmachine.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
)

func init() {
if err := mb.Registry.AddMetricSet("vsphere", "virtualmachine", New); err != nil {
panic(err)
}
mb.Registry.MustAddMetricSet("vsphere", "virtualmachine", New,
mb.DefaultMetricSet(),
)
}

type MetricSet struct {
Expand Down
1 change: 0 additions & 1 deletion metricbeat/modules.d/vsphere.yml.disabled
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
- module: vsphere
metricsets: ["datastore", "host", "virtualmachine"]
period: 10s
hosts: ["https://localhost/sdk"]

Expand Down

0 comments on commit 01c53c2

Please sign in to comment.