Hi Team,
This is my kubernetes.yml in /etc/metricbeat/modules.d/
Node metrics, from kubelet:
- module: kubernetes
metricsets:- node
- system
- pod
- container
- volume
period: 10s
hosts: ["localhost:10255"]
State metrics from kube-state-metrics service:
- module: kubernetes
enabled: true
metricsets:- state_node
- state_deployment
- state_replicaset
- state_pod
- state_container
period: 10s
hosts: ["kube-state-metrics:8080"]
Kubernetes events
- module: kubernetes
enabled: true
metricsets:- event
Kube-state-metric is running as a deployment and has a pod running on each kubernetes-node.
I am running metricbeat as a service on my each node and getting below error log in kibana
{
"_index": "metricbeat-6.0.0-2017.11.22",
"_type": "doc",
"_id": "N9Y-5F8Bms6Qlv2NuJnd",
"_version": 1,
"_score": null,
"_source": {
"@timestamp": "2017-11-22T15:00:35.698Z",
"metricset": {
"host": "kube-state-metrics:8080",
"rtt": 1472,
"module": "kubernetes",
"name": "state_pod"
},
"error": {
"message": "error making http request: Get http://kube-state-metrics:8080/metrics: lookup kube-state-metrics on 10.98.0.2:53: no such host"
},
"beat": {
"name": "shipdev-node2",
"hostname": "shipdev-node2",
"version": "6.0.0"
},
"kubernetes": {
"state_pod": {}
}
},
"fields": {
"@timestamp": [
"2017-11-22T15:00:35.698Z"
]
},
"highlight": {
"metricset.host": [
"@kibana-highlighted-field@kube-state-metrics:8080@/kibana-highlighted-field@"
]
},
"sort": [
1511362835698
]
}