-
Notifications
You must be signed in to change notification settings - Fork 448
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate kubernetes module #70
Conversation
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@exekias @mtojek this one seems to be completed in terms of "package migration". Would love your feedback here. Manual testing is also possible already (using https://github.com/elastic/integrations-dev/issues/58) in order to verify that data are being collected and Dashboards work ok. We still need to verify what will happen with Agent's side regarding docs and manifests around the Deployment strategies on k8s. |
I think you can convert it to ordinary pull-request. Thanks for the contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Didn't test it, but it looks good. I think we need to improve docs, left a comment on that regard
@@ -0,0 +1,38 @@ | |||
title: Kubernetes apiserver metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: Kubernetes apiserver metrics | |
title: Kubernetes API Server metrics |
title: Kubernetes apiserver metrics | ||
description: Collect Kubernetes apiserver metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
title: Kubernetes apiserver metrics | |
description: Collect Kubernetes apiserver metrics | |
title: Kubernetes API Server metrics | |
description: Collect Kubernetes API Server metrics |
|
||
This integration is used to collect metrics from | ||
[Kubernetes clusters](https://kubernetes.io/). | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm missing many of the explanations that we have here: https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html
It would be nice to provide good understanding on the variety of datasets that we have and how they need to be configured
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch! Added!
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Updated the Docs and changed the sample json events with new ones according to the new indexing approach. |
@@ -0,0 +1,2 @@ | |||
- name: kubernetes | |||
type: group |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that according to latest changes in import-beat
, pushed by @kaiyan-sheng , this empty file is not required.
@@ -0,0 +1,2 @@ | |||
- name: kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same here
@@ -0,0 +1 @@ | |||
metricsets: ["event"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it need any configuration options? There is even no "period" defined hence wondering.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the configuration manually in the manifest.yml
and missed that. 👍
@@ -0,0 +1,44 @@ | |||
title: Kubernetes Node metrics | |||
release: experimental |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please adjusts all release fields. We will release all new packages as "beta".
show_user: true | ||
default: | ||
- kube-state-metrics:8080 | ||
title: Kubernetes state_resourcequota metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you can update the title to a pleasant, human-readable form (no underscore).
packages/kubernetes/manifest.yml
Outdated
format_version: 1.0.0 | ||
name: kubernetes | ||
title: Kubernetes | ||
version: 0.0.1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
version: 0.1.0
packages/kubernetes/manifest.yml
Outdated
requirement: | ||
kibana: | ||
versions: '>=7.3.0 <8.0.0' | ||
elasticsearch: {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field (elasticsearch) can be removed.
packages/kubernetes/manifest.yml
Outdated
categories: | ||
- metrics | ||
release: beta | ||
removable: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This field too.
packages/kubernetes/manifest.yml
Outdated
description: Collect metrics from Kubernetes | ||
inputs: | ||
- type: kubernetes/metrics | ||
title: Collect Kubernetes API Server, Container, Controller Manager, Event, Node, Pod, Proxy, Scheduler, state_container, state_cronjob, state_deployment, state_node, state_persistentvolume, state_persistentvolumeclaim, state_pod, state_replicaset, state_resourcequota, state_service, state_statefulset, state_storageclass, System and Volume metrics |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you can shorten this one :D
simply - Collect Kubernetes metrics?
packages/kubernetes/manifest.yml
Outdated
inputs: | ||
- type: kubernetes/metrics | ||
title: Collect Kubernetes API Server, Container, Controller Manager, Event, Node, Pod, Proxy, Scheduler, state_container, state_cronjob, state_deployment, state_node, state_persistentvolume, state_persistentvolumeclaim, state_pod, state_replicaset, state_resourcequota, state_service, state_statefulset, state_storageclass, System and Volume metrics | ||
description: Collecting API Server, Container, Controller Manager, Event, Node, Pod, Proxy, Scheduler, state_container, state_cronjob, state_deployment, state_node, state_persistentvolume, state_persistentvolumeclaim, state_pod, state_replicaset, state_resourcequota, state_service, state_statefulset, state_storageclass, System and Volume metrics from Kubernetes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that all captions, descriptions, etc. should present names which are human readable (no underscores).
Just noticed on screenshots, please improve case sensitivity on screenshots. |
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Thanks for the review @mtojek! Comments should be addressed now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job, Christos!
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
@exekias @andresrc this integration is completed. Tested manually using testing/environments/kubernetes. Let me know if we can merge/ship it already or we want to wait for a |
++ Let's get this in. I think it would be nice to follow up with docs on the Agent side on how to deploy in Kubernetes Merging this on behalf of @ChrsMark, as he is off |
* Add automated files Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Add README placeholder Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * release beta Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Add k8s manifests to deploy stack along with Agent Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Fix manifests Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Unify hosts & add overview screenshot Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Fix icon name Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Add ReadMe.md Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Add more content in DEADME.md Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * final README.md Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Improve docs Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Add more docs Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Update data.jon in READMEs Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Remove empty package-fields files Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * fix Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Fix release fields Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Fix version Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * More review changes Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Fix screenshots Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Remove leftover k8s manifests Signed-off-by: ChrsMark <chrismarkou92@gmail.com> * Minor descritpion fix Signed-off-by: ChrsMark <chrismarkou92@gmail.com>
Implementing Kubernetes package migration
Important Notes:
container
,system
,node
,pod
,volume
metricsets require access to the Kubelet API. Usually these are enabled when Metricbeat is deployed as Daemonset on k8s nodes.state_*
metricsets require the deploymentkube-state-metrics
on the k8s cluster in order to retrieve metrics from it.apiserver
,scheduler
,proxy
andcontrollermanager
require access to each component of the k8s cluster accordingly.Wondering how all these would be possible in combination with
agent
. Do we need to define how agent will run in k8s (deployment, daemonset) in order to make it work? @exekias do you have anything in mind about this?Docs: https://www.elastic.co/guide/en/beats/metricbeat/master/metricbeat-module-kubernetes.html
Migration Steps:
docker-compose -f snapshot.yml -f local.yml up --force-recreate
PACKAGES=kubernetes mage ImportBeats
docs/README.md
Screenshots
Manual Testing