Skip to content

Commit

Permalink
Incorporating review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
vjsamuel committed May 18, 2017
1 parent 59227c8 commit 3267969
Show file tree
Hide file tree
Showing 18 changed files with 392 additions and 132 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ https://github.com/elastic/beats/compare/v6.0.0-alpha1...master[Check the HEAD d
- Add process_summary metricset that records high level metrics about processes. {pull}4231[4231]
- Add `kube-state-metrics` based metrics to `kubernetes` module {pull}4253[4253]
- Add debug logging to Jolokia JMX metricset. {pull}4341[4341]
- Add events metricset for kubernetes metricbeat module {pull}4315[4315]

*Packetbeat*

Expand Down
7 changes: 0 additions & 7 deletions NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -1181,13 +1181,6 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

--------------------------------------------------------------------
<<<<<<< HEAD
github.com/ericchiang/k8s
--------------------------------------------------------------------
Apache License


--------------------------------------------------------------------
github.com/golang/protobuf
--------------------------------------------------------------------
Expand Down
143 changes: 139 additions & 4 deletions metricbeat/docs/fields.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -6058,18 +6058,153 @@ Used inodes
[float]
== events Fields
== event Fields
The Kubernetes events metricset collects events that are generated by objects running inside of Kubernetes
[float]
=== kubernetes.event.count
type: long
Count field records the number of times the particular event has occured
[float]
=== kubernetes.event.message
type: keyword
Message recorded for the given event
[float]
=== kubernetes.event.reason
type: keyword
Reason recorded for the given event
[float]
=== kubernetes.event.type
type: keyword
Type of the given event
[float]
== metadata Fields
Metadata associated with the given event
[float]
=== kubernetes.event.metadata.timestamp.created
type: date
Timestamp of creation of the given event
[float]
=== kubernetes.event.metadata.timestamp.deleted
type: date
Timestamp of deletion of the given event
[float]
=== kubernetes.event.metadata.name
type: keyword
Name of the event
events
[float]
=== kubernetes.event.metadata.namespace
type: keyword
Namespace in which event was generated
[float]
=== kubernetes.event.metadata.resource_version
type: keyword
Version of the event resource
[float]
=== kubernetes.event.metadata.uid
type: keyword
Unique identifier to the event object
[float]
=== kubernetes.event.metadata.self_link
type: keyword
URL representing the event
[float]
== involved_object Fields
Metadata associated with the given involved object
[float]
=== kubernetes.event.involved_object.api_version
type: keyword
API version of the object
[float]
=== kubernetes.event.involved_object.kind
type: keyword
API kind of the object
[float]
=== kubernetes.event.involved_object.name
type: keyword
name of the object
[float]
=== kubernetes.event.involved_object.resource_version
type: keyword
resource version of the object
[float]
=== kubernetes.events.example
=== kubernetes.event.involved_object.uid
type: keyword
Example field
UUID version of the object
[float]
Expand Down
10 changes: 8 additions & 2 deletions metricbeat/docs/modules/kubernetes.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ metricbeat.modules:
- state_container
period: 10s
hosts: ["kube-state-metrics:8080"]
# Kubernetes events
- module: kubernetes
metricsets:
- event
in_cluster: true
----

[float]
Expand All @@ -56,7 +62,7 @@ The following metricsets are available:

* <<metricbeat-metricset-kubernetes-container,container>>

* <<metricbeat-metricset-kubernetes-events,events>>
* <<metricbeat-metricset-kubernetes-event,event>>

* <<metricbeat-metricset-kubernetes-node,node>>

Expand All @@ -78,7 +84,7 @@ The following metricsets are available:

include::kubernetes/container.asciidoc[]

include::kubernetes/events.asciidoc[]
include::kubernetes/event.asciidoc[]

include::kubernetes/node.asciidoc[]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
This file is generated! See scripts/docs_collector.py
////

[[metricbeat-metricset-kubernetes-events]]
include::../../../module/kubernetes/events/_meta/docs.asciidoc[]
[[metricbeat-metricset-kubernetes-event]]
include::../../../module/kubernetes/event/_meta/docs.asciidoc[]


==== Fields
Expand All @@ -15,5 +15,5 @@ Here is an example document generated by this metricset:

[source,json]
----
include::../../../module/kubernetes/events/_meta/data.json[]
include::../../../module/kubernetes/event/_meta/data.json[]
----
2 changes: 1 addition & 1 deletion metricbeat/include/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import (
_ "github.com/elastic/beats/metricbeat/module/kibana/status"
_ "github.com/elastic/beats/metricbeat/module/kubernetes"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/container"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/events"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/event"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/node"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/pod"
_ "github.com/elastic/beats/metricbeat/module/kubernetes/state_container"
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/metricbeat.full.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,12 @@ metricbeat.modules:
period: 10s
hosts: ["kube-state-metrics:8080"]

# Kubernetes events
- module: kubernetes
metricsets:
- event
in_cluster: true

#------------------------------ memcached Module -----------------------------
- module: memcached
metricsets: ["stats"]
Expand Down
6 changes: 6 additions & 0 deletions metricbeat/module/kubernetes/_meta/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,9 @@
- state_container
period: 10s
hosts: ["kube-state-metrics:8080"]

# Kubernetes events
- module: kubernetes
metricsets:
- event
in_cluster: true
43 changes: 43 additions & 0 deletions metricbeat/module/kubernetes/event/_meta/data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"@timestamp": "2017-05-15T08:07:12.945Z",
"beat": {
"hostname": "hostname",
"name": "beatname",
"version": "6.0.0-alpha2"
},
"kubernetes": {
"event": {
"count": 1,
"involved_object": {
"api_version": "extensions",
"kind": "ReplicaSet",
"name": "prometheus-2552087900",
"resource_version": "1047038",
"uid": "b2f92f14-2ad5-11e7-8cb8-e687a39f6e48"
},
"message": "Created pod: prometheus-2552087900-9fxh6",
"metadata": {
"generate_name": "",
"name": "prometheus-2552087900.14bf266355fd16e0",
"namespace": "default",
"resource_version": "1047243",
"self_link": "/api/v1/namespaces/default/events/prometheus-2552087900.14bf266355fd16e0",
"timestamp": {
"created": "2017-05-16T10:30:09-07:00",
"deleted": ""
},
"uid": "4f3fe524-3a5d-11e7-b8f2-e687a39f6e48"
},
"reason": "SuccessfulCreate",
"timestamp": {
"first_occurrence": "2017-05-16T17:30:09Z",
"last_occurrence": "2017-05-16T17:30:09Z"
},
"type": "Normal"
}
},
"metricset": {
"module": "kubernetes",
"name": "event"
}
}
3 changes: 3 additions & 0 deletions metricbeat/module/kubernetes/event/_meta/docs.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
=== kubernetes event MetricSet

This is the event metricset of the module kubernetes.
Loading

0 comments on commit 3267969

Please sign in to comment.