Hi all,
i am using a kubernetes daemonset to create metricbeat instances in a K8s cluster.
This seems to work pretty fine and i am able to send system, k8s and docker metrics to elasticsearch . The only thing i am missing is the network metrics that they don't appear in the metrics discovery and of course in visualizations.
Below the daemonset-configmap
Blockquote
apiVersion: v1
kind: ConfigMap
metadata:
name: metricbeat-daemonset-modules
namespace: kube-system
labels:
k8s-app: metricbeat
data:
metricbeat.yml: |-
metricbeat.config.modules:
# Mountedmetricbeat-daemonset-modules
configmap:
path: ${path.config}/modules.d/.yml
# Reload module configs as they change:
reload.enabled: false
# To enable hints based autodiscover uncomment this:
metricbeat.autodiscover:
# providers:
# - type: kubernetes
# host: ${NODE_NAME}
# hints.enabled: true
processors:
- add_cloud_metadata:
output.elasticsearch:
hosts: ['${ELASTICSEARCH_HOST:172.28.162.21}:${ELASTICSEARCH_PORT:9200}']
index: "metricbeat-daemonset-%{+yyyy.MM.dd}"
setup.template:
name: 'metricbeat-daemonset'
pattern: 'metricbeat-daemonset-'
enabled: true
settings:
index.number_of_shards: 1
index.number_of_replicas: 1
tags: ["backend"]
fields:
env: staging
- module: kubernetes
enabled: true
metricsets:
- state_node
- state_deployment
- state_replicaset
- state_statefulset
- state_pod
- state_container
period: 30s
hosts: ["kube-state-metrics:8080"]
- module: docker
enabled: true
metricsets:
- container
- cpu
- diskio
- healthcheck
- info
- memory
- network
hosts: ["unix:///var/run/docker.sock"]
period: 30s
Any help appreciated!