# Monitor APIC on kubernetes using metricbeat

**URL:** https://discuss.elastic.co/t/monitor-apic-on-kubernetes-using-metricbeat/261465
**Category:** Beats
**Tags:** metricbeat
**Created:** [January 18, 2021, 7:37pm UTC](https://discuss.elastic.co/t/monitor-apic-on-kubernetes-using-metricbeat/261465 "2021-01-18T19:37:58Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Sagar\_Naik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagar_naik/32/69664_2.png) [@Sagar\_Naik](https://discuss.elastic.co/u/Sagar_Naik)
#### Post date: [January 18, 2021, 7:37pm UTC](https://discuss.elastic.co/t/monitor-apic-on-kubernetes-using-metricbeat/261465/1 "2021-01-18T19:37:59Z")

</div>

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](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: true
# When used outside the cluster:
#host: node\_name
# If 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](http://rbac.authorization.k8s.io/v1)

# kind: ClusterRole

# metadata:

# name: metricbeat

# labels:

# k8s-app: metricbeat

# rules:

# - nonResourceURLs:

# - /metrics

# verbs:

# - get

# Kubernetes events

#- module: kubernetes

# metricsets:

# - event

# apiVersion: [rbac.authorization.k8s.io/v1](http://rbac.authorization.k8s.io/v1)

# kind: ClusterRole

# metadata:

# name: metricbeat

# labels:

# k8s-app: metricbeat

# rules:

# - apiGroups:

# - "extensions"

# - "apps"

# - "v1"

# - ""

# resources:

# - nodes

# verbs:

# - get

# - list

# - watch

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [January 19, 2021, 2:24am UTC](https://discuss.elastic.co/t/monitor-apic-on-kubernetes-using-metricbeat/261465/2 "2021-01-19T02:24:37Z")

</div>

Welcome to our community! 😃

Please format your code/logs/config using the `</>` button, or markdown style back ticks. It helps to make things easy to read which helps us help you 🙂

---

<div class="post-metadata">

### Author: ![Sagar\_Naik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sagar_naik/32/69664_2.png) [@Sagar\_Naik](https://discuss.elastic.co/u/Sagar_Naik)
#### Post date: [January 29, 2021, 9:10am UTC](https://discuss.elastic.co/t/monitor-apic-on-kubernetes-using-metricbeat/261465/4 "2021-01-29T09:10:49Z")

</div>

```
# 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: true

# When used outside the cluster:

#host: node_name

# If 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](http://rbac.authorization.k8s.io/v1)

# kind: ClusterRole

# metadata:

# name: metricbeat

# labels:

# k8s-app: metricbeat

# rules:

# - nonResourceURLs:

# - /metrics

# verbs:

# - get

# Kubernetes events

#- module: kubernetes

# metricsets:

# - event

# apiVersion: [rbac.authorization.k8s.io/v1](http://rbac.authorization.k8s.io/v1)

# kind: ClusterRole

# metadata:

# name: metricbeat

# labels:

# k8s-app: metricbeat

# rules:

# - apiGroups:

# - "extensions"

# - "apps"

# - "v1"

# - ""

# resources:

# - nodes

# verbs:

# - get

# - list

# - watch
```

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 26, 2021, 9:10am UTC](https://discuss.elastic.co/t/monitor-apic-on-kubernetes-using-metricbeat/261465/5 "2021-02-26T09:10:56Z")

</div>

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