Configuring metricbeat to collect Kubernetes metrics

Hi Everyone I am configuring metric beat to collect Kubernetes logs ,
I am using below config
apiVersion: v1
kind: ConfigMap
name: metricbeat-config
namespace: kube-system
app: metricbeat
metricbeat.yml: |-

Mounted metricbeat-daemonset-modules configmap:

path: ${path.config}/modules.d/*.yml

Reload module configs as they change:

reload.enabled: false

  • add_cloud_metadata:
    hosts: [""]
    setup.dashboards.enabled: true [""]
    #setup.kibana.protocol: "https"
    index.number_of_shards: 5
    index.number_of_replicas: 1
    index.number_of_routing_shards: 30

And I am getting bellow error
eror: error validating "metricbeat-config.yaml": error validating data: [ValidationError( invalid type for io.k8s.api.core.v1.ConfigMap.d
ata: got "array", expected "string", unknown object type "nil" in, unknown object type "nil" in
lasticsearch, ValidationError( invalid type for got "array", expected "string", ValidationError(Co invalid type for got "array", expected "string", unknown object type "nil" in
.setup.template.settings]; if you choose to ignore these errors, turn validation off with --validate=false

Please help me out I am new to k8s

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.