Skip to content
This repository has been archived by the owner on May 16, 2023. It is now read-only.

Commit

Permalink
[metricbeat] Fix default configuration for kubernetes module
Browse files Browse the repository at this point in the history
This configuration didn't work at all since the nodes localhost is not
reachable from the kubernetes pod. The test has also been fixed up to
make sure that the data coming in actually has proper fields in it. The
test was passing because the events were coming in but just with errors.
  • Loading branch information
Crazybus committed Aug 9, 2019
1 parent e724377 commit b466b62
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
3 changes: 2 additions & 1 deletion metricbeat/examples/default/test/goss-metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ http:
timeout: 2000
body:
- 'metricbeat-7.3.0'
http://elasticsearch-master:9200/_search?q=metricset.name:state_deployment:

'http://elasticsearch-master:9200/_search?q=metricset.name:state_container%20AND%20kubernetes.container.name:metricbeat':
status: 200
timeout: 2000
body:
Expand Down
2 changes: 1 addition & 1 deletion metricbeat/examples/default/test/goss.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ http:
timeout: 2000
body:
- 'metricbeat-7.3.0'
http://elasticsearch-master:9200/_search?q=metricset.name:container:
'http://elasticsearch-master:9200/_search?q=metricset.name:container%20AND%20kubernetes.container.name:metricbeat':
status: 200
timeout: 2000
body:
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/examples/security/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ metricbeatConfig:
- system
- volume
period: 10s
hosts: ["localhost:10255"]
host: "${NODE_NAME}"
hosts: ["${NODE_NAME}:10255"]
processors:
- add_kubernetes_metadata:
in_cluster: true
Expand Down
4 changes: 4 additions & 0 deletions metricbeat/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,10 @@ spec:
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: NODE_NAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
{{- if .Values.extraEnvs }}
{{ toYaml .Values.extraEnvs | indent 8 }}
{{- end }}
Expand Down
3 changes: 2 additions & 1 deletion metricbeat/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ metricbeatConfig:
- system
- volume
period: 10s
hosts: ["localhost:10255"]
host: "${NODE_NAME}"
hosts: ["${NODE_NAME}:10255"]
processors:
- add_kubernetes_metadata:
in_cluster: true
Expand Down

0 comments on commit b466b62

Please sign in to comment.