Commit ef0794a6 authored by Nicolas Steinmetz's avatar Nicolas Steinmetz Committed by David McKay

Enforce outputs.health and inputs.internal, fix service as health no longer in config.ouputs.

parent c5828690
...@@ -39,30 +39,6 @@ helm uninstall telegraf ...@@ -39,30 +39,6 @@ helm uninstall telegraf
The command removes all the Kubernetes components associated with the chart and deletes the release. The command removes all the Kubernetes components associated with the chart and deletes the release.
## livenessProve, readinessProbe and health service
Be sure to have at least these inputs and outputs enabled so that readinessProbe and livenessProbe can work as expected and that the health service endpoint is correctly set up:
```yaml
[...]
config:
[...]
outputs:
- health:
service_address: "http://:8888"
compares:
field: buffer_size
lt: 5000.0
contains:
field: buffer_size
[...]
inputs:
- internal:
collect_memstats: false
[...]
```
## Configuration ## Configuration
The default configuration parameters are listed in `values.yaml`. The default configuration parameters are listed in `values.yaml`.
......
...@@ -14,4 +14,13 @@ data: ...@@ -14,4 +14,13 @@ data:
{{ template "processors" .Values.config.processors }} {{ template "processors" .Values.config.processors }}
{{ template "aggregators" .Values.config.aggregators }} {{ template "aggregators" .Values.config.aggregators }}
{{ template "outputs" .Values.config.outputs }} {{ template "outputs" .Values.config.outputs }}
[[outputs.health]]
service_address = "http://:8888"
[[outputs.health.compares]]
field = "buffer_size"
lt = 5000.0
[[outputs.health.contains]]
field = "buffer_size"
{{ template "inputs" .Values.config.inputs -}} {{ template "inputs" .Values.config.inputs -}}
[[inputs.internal]]
collect_memstats = false
...@@ -15,16 +15,9 @@ metadata: ...@@ -15,16 +15,9 @@ metadata:
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
{{- range $objectKey, $objectValue := .Values.config.outputs }} - port: 8888
{{- range $key, $value := . -}} targetPort: 8888
{{- $tp := typeOf $value -}}
{{- if eq $key "health" }}
- port: {{ trimPrefix "http://:" $value.service_address | int64 }}
targetPort: {{ trimPrefix "http://:" $value.service_address | int64 }}
name: "health" name: "health"
{{- end }}
{{- end }}
{{- end }}
{{- range $objectKey, $objectValue := .Values.config.inputs }} {{- range $objectKey, $objectValue := .Values.config.inputs }}
{{- range $key, $value := . -}} {{- range $key, $value := . -}}
{{- $tp := typeOf $value -}} {{- $tp := typeOf $value -}}
......
...@@ -110,20 +110,11 @@ config: ...@@ -110,20 +110,11 @@ config:
problem: 2 problem: 2
critical: 3 critical: 3
outputs: outputs:
- health:
service_address: "http://:8888"
compares:
field: buffer_size
lt: 5000.0
contains:
field: buffer_size
- influxdb: - influxdb:
urls: urls:
- "http://influxdb.monitoring.svc:8086" - "http://influxdb.monitoring.svc:8086"
database: "telegraf" database: "telegraf"
inputs: inputs:
- internal:
collect_memstats: false
- statsd: - statsd:
service_address: ":8125" service_address: ":8125"
percentiles: percentiles:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment