48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: metricbeat-deployment-config
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: metricbeat
|
|
data:
|
|
metricbeat.yml: |-
|
|
metricbeat.config.modules:
|
|
# Mounted `metricbeat-daemonset-modules` configmap:
|
|
path: ${path.config}/modules.d/*.yml
|
|
# Reload module configs as they change:
|
|
reload.enabled: false
|
|
|
|
processors:
|
|
- add_cloud_metadata:
|
|
|
|
cloud.id: ${ELASTIC_CLOUD_ID}
|
|
cloud.auth: ${ELASTIC_CLOUD_AUTH}
|
|
|
|
output.elasticsearch:
|
|
hosts: ['${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}']
|
|
username: ${ELASTICSEARCH_USERNAME}
|
|
password: ${ELASTICSEARCH_PASSWORD}
|
|
---
|
|
apiVersion: v1
|
|
kind: ConfigMap
|
|
metadata:
|
|
name: metricbeat-deployment-modules
|
|
namespace: kube-system
|
|
labels:
|
|
k8s-app: metricbeat
|
|
data:
|
|
# This module requires `kube-state-metrics` up and running under `kube-system` namespace
|
|
kubernetes.yml: |-
|
|
- module: kubernetes
|
|
metricsets:
|
|
- state_node
|
|
- state_deployment
|
|
- state_replicaset
|
|
- state_pod
|
|
- state_container
|
|
# Uncomment this to get k8s events:
|
|
#- event
|
|
period: 10s
|
|
host: ${NODE_NAME}
|
|
hosts: ["kube-state-metrics:8080"]
|