I am getting 400 bad request while trying to configure metricbeat for monitoring kubernetes cluster deployed along with IBM API Connect.
System information is displaying , but no kubernetes info ,
We need to monitor transaction time/ Execution time for API's deployed
Below is the file we are using
Module: kubernetes
Docs: https://www.elastic.co/guide/en/beats/metricbeat/7.7/metricbeat-module-kubernetes.html
Node metrics, from kubelet:
- module: kubernetes
#metricsets:- node
- system
- pod
- container
- volume
period: 10s
hosts: ["localhost:10250"]
#bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
ssl.certificate_authorities:- /var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt
- /etc/kubernetes/pki/ca.crt
username: "admin"
password: "???"
ssl.verification_mode: "none"
Enriching parameters:
add_metadata: true
#labels.dedot: true
#annotations.dedot: trueWhen used outside the cluster:
#host: node_nameIf kube_config is not set, KUBECONFIG environment variable will be checked
and if not present it will fall back to InCluster
#kube_config: ~/.kube/config
kube_config: /etc/kubernetes/admin.conf
State metrics from kube-state-metrics service:
#- module: kubernetes
metricsets:
- state_node
- state_deployment
- state_replicaset
- state_statefulset
- state_pod
- state_container
- state_cronjob
- state_resourcequota
- state_service
- state_persistentvolume
- state_persistentvolumeclaim
- state_storageclass
period: 10s
hosts: ["kube-state-metrics:8080"]
add_metadata: true
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: metricbeat
labels:
k8s-app: metricbeat
rules:
- nonResourceURLs:
- /metrics
verbs:
- get
Kubernetes events
#- module: kubernetes