Skip to content

Commit

Permalink
Collect domain memory stat from KVM (#4402) (#6265)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amanda H. L. de Andrade authored and jsoriano committed Apr 19, 2018
1 parent 227dc95 commit ccd8a31
Show file tree
Hide file tree
Showing 38 changed files with 24,549 additions and 0 deletions.
28 changes: 28 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,34 @@ WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

--------------------------------------------------------------------
Dependency: github.com/davecgh/go-xdr
Revision: e6a2ba005892b6a5b27cb5352f64c2e96942dd28
License type (autodetected): MIT
./metricbeat/module/kvm/vendor/github.com/davecgh/go-xdr/LICENSE:
--------------------------------------------------------------------
Copyright (c) 2012-2014 Dave Collins <dave@davec.name>

Permission to use, copy, modify, and distribute this software for any
purpose with or without fee is hereby granted, provided that the above
copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------------------------------------------------
Dependency: github.com/digitalocean/go-libvirt
Revision: 59d541f19311883ad82708651353009fb207d8a9
License type (autodetected): Apache-2.0
./metricbeat/module/kvm/vendor/github.com/digitalocean/go-libvirt/LICENSE.md:
--------------------------------------------------------------------
Apache License 2.0


--------------------------------------------------------------------
Dependency: github.com/docker/distribution
Revision: 1e2f10eb65743fed02f573d31a4587de09afb20e
Expand Down
Binary file added metricbeat/NOTICE.txt
Binary file not shown.
69 changes: 69 additions & 0 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ grouped in the following categories:
* <<exported-fields-kibana>>
* <<exported-fields-kubernetes-processor>>
* <<exported-fields-kubernetes>>
* <<exported-fields-kvm>>
* <<exported-fields-logstash>>
* <<exported-fields-memcached>>
* <<exported-fields-mongodb>>
Expand Down Expand Up @@ -7849,6 +7850,74 @@ type: long
Total inodes
--
[[exported-fields-kvm]]
== kvm fields
experimental[]
kvm module
[float]
== kvm fields
[float]
== dommemstat fields
dommemstat
[float]
== stat fields
Memory stat
*`kvm.dommemstat.stat.name`*::
+
--
type: keyword
Memory stat name
--
*`kvm.dommemstat.stat.value`*::
+
--
type: long
Memory stat value
--
*`kvm.dommemstat.id`*::
+
--
type: long
Domain id
--
*`kvm.dommemstat.name`*::
+
--
type: keyword
Domain name
--
[[exported-fields-logstash]]
Expand Down
43 changes: 43 additions & 0 deletions metricbeat/docs/modules/kvm.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-module-kvm]]
== kvm module

experimental[]

== kvm module

This is the kvm module.



[float]
=== Example configuration

The kvm module supports the standard configuration options that are described
in <<configuration-metricbeat>>. Here is an example configuration:

[source,yaml]
----
metricbeat.modules:
- module: kvm
metricsets: ["dommemstat"]
enabled: false
period: 10s
hosts: ["localhost"]
# Timeout to connect to Libvirt server
#timeout: 1s
----

[float]
=== Metricsets

The following metricsets are available:

* <<metricbeat-metricset-kvm-dommemstat,dommemstat>>

include::kvm/dommemstat.asciidoc[]

23 changes: 23 additions & 0 deletions metricbeat/docs/modules/kvm/dommemstat.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
////
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-metricset-kvm-dommemstat]]
=== kvm dommemstat metricset

experimental[]

include::../../../module/kvm/dommemstat/_meta/docs.asciidoc[]


==== Fields

For a description of each field in the metricset, see the
<<exported-fields-kvm,exported fields>> section.

Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/kvm/dommemstat/_meta/data.json[]
----
3 changes: 3 additions & 0 deletions metricbeat/docs/modules_list.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ This file is generated! See scripts/docs_collector.py
|<<metricbeat-metricset-kubernetes-state_statefulset,state_statefulset>>
|<<metricbeat-metricset-kubernetes-system,system>>
|<<metricbeat-metricset-kubernetes-volume,volume>>
|<<metricbeat-module-kvm,kvm>> experimental[] |image:./images/icon-no.png[No prebuilt dashboards] |
.1+| .1+| |<<metricbeat-metricset-kvm-dommemstat,dommemstat>> experimental[]
|<<metricbeat-module-logstash,Logstash>> beta[] |image:./images/icon-no.png[No prebuilt dashboards] |
.2+| .2+| |<<metricbeat-metricset-logstash-node,node>> beta[]
|<<metricbeat-metricset-logstash-node_stats,node_stats>> beta[]
Expand Down Expand Up @@ -146,6 +148,7 @@ include::modules/jolokia.asciidoc[]
include::modules/kafka.asciidoc[]
include::modules/kibana.asciidoc[]
include::modules/kubernetes.asciidoc[]
include::modules/kvm.asciidoc[]
include::modules/logstash.asciidoc[]
include::modules/memcached.asciidoc[]
include::modules/mongodb.asciidoc[]
Expand Down
2 changes: 2 additions & 0 deletions metricbeat/include/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ import (
_ "github.com/elastic/beats/metricbeat/module/kubernetes/system"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/util"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/volume"
_ "github.com/elastic/beats/metricbeat/module/kvm"
_ "github.com/elastic/beats/metricbeat/module/kvm/dommemstat"
_ "github.com/elastic/beats/metricbeat/module/logstash"
_ "github.com/elastic/beats/metricbeat/module/logstash/node"
_ "github.com/elastic/beats/metricbeat/module/logstash/node_stats"
Expand Down
10 changes: 10 additions & 0 deletions metricbeat/metricbeat.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,16 @@ metricbeat.modules:
metricsets:
- event

#--------------------------------- kvm Module --------------------------------
- module: kvm
metricsets: ["dommemstat"]
enabled: false
period: 10s
hosts: ["localhost"]

# Timeout to connect to Libvirt server
#timeout: 1s

#------------------------------ Logstash Module ------------------------------
- module: logstash
metricsets: ["node", "node_stats"]
Expand Down
8 changes: 8 additions & 0 deletions metricbeat/module/kvm/_meta/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
- module: kvm
metricsets: ["dommemstat"]
enabled: false
period: 10s
hosts: ["localhost"]

# Timeout to connect to Libvirt server
#timeout: 1s
4 changes: 4 additions & 0 deletions metricbeat/module/kvm/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
== kvm module

This is the kvm module.

11 changes: 11 additions & 0 deletions metricbeat/module/kvm/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
- key: kvm
title: "kvm"
description: >
experimental[]
kvm module
fields:
- name: kvm
type: group
description: >
fields:
2 changes: 2 additions & 0 deletions metricbeat/module/kvm/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// Package kvm is a Metricbeat module that contains MetricSets.
package kvm
19 changes: 19 additions & 0 deletions metricbeat/module/kvm/dommemstat/_meta/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"@timestamp":"2016-05-23T08:05:34.853Z",
"beat":{
"hostname":"beathost",
"name":"beathost"
},
"metricset":{
"host":"localhost",
"module":"kvm",
"name":"dommemstat",
"rtt":44269
},
"kvm":{
"dommemstat":{
"example": "dommemstat"
}
},
"type":"metricsets"
}
3 changes: 3 additions & 0 deletions metricbeat/module/kvm/dommemstat/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
=== kvm dommemstat MetricSet

This is the dommemstat metricset of the module kvm.
26 changes: 26 additions & 0 deletions metricbeat/module/kvm/dommemstat/_meta/fields.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
- name: dommemstat
type: group
description: >
dommemstat
fields:
- name: stat
type: group
description: >
Memory stat
fields:
- name: name
type: keyword
description: >
Memory stat name
- name: value
type: long
description: >
Memory stat value
- name: id
type: long
description: >
Domain id
- name: name
type: keyword
description: >
Domain name
Loading

0 comments on commit ccd8a31

Please sign in to comment.