From f11b4d47a93ee3110500696fad212b8a4bef0996 Mon Sep 17 00:00:00 2001 From: Anton Frolov Date: Tue, 7 Feb 2023 13:03:52 +0000 Subject: [PATCH] Add graphitePort, graphiteDelimiters and graphiteFormat to proxy options. See https://docs.wavefront.com/proxies_configuring.html#general-configuration-properties for more info --- wavefront/README.md | 3 +++ wavefront/templates/proxy-deployment.yaml | 7 +++++++ wavefront/templates/proxy-service.yaml | 5 +++++ wavefront/values.yaml | 11 +++++++++++ 4 files changed, 26 insertions(+) diff --git a/wavefront/README.md b/wavefront/README.md index 8ef36221..ea21a9fd 100644 --- a/wavefront/README.md +++ b/wavefront/README.md @@ -108,6 +108,9 @@ The following tables lists the configurable parameters of the Wavefront chart an | `proxy.histogramHourPort` | Port to accumulate 1-hour based histograms on Wavefront data format (usually 40002) | `nil` | | `proxy.histogramDayPort` | Port to accumulate 1-day based histograms on Wavefront data format (usually 40003) | `nil` | | `proxy.deltaCounterPort` | Port to accumulate 1-minute delta counters on Wavefront data format (usually 50000) | `nil` | +| `proxy.graphitePort` | Port for metrics in Graphite data format (usually 2003) | `nil` | +| `proxy.graphiteDelimiters` | Characters that should be replaced by dots in Graphite data. | `nil` | +| `proxy.graphiteFormat` | Indexes of fields within Graphite and collectd metric names that correspond to a hostname. | `nil` | | `proxy.args` | Additional Wavefront proxy properties to be passed as command line arguments in the `-- ` format. Multiple properties can be specified. [See more](https://docs.wavefront.com/proxies_configuring.html) | `nil` | | `proxy.heap` | Wavefront proxy Java heap maximum usage (java -Xmx command line option) | `nil` | | `proxy.preprocessor.rules.yaml` | YAML configuraiton for Wavefront proxy preprocessor rules. [See more](https://docs.wavefront.com/proxies_preprocessor_rules.html) | `nil` | diff --git a/wavefront/templates/proxy-deployment.yaml b/wavefront/templates/proxy-deployment.yaml index 9b1bf0d7..ec6534bf 100644 --- a/wavefront/templates/proxy-deployment.yaml +++ b/wavefront/templates/proxy-deployment.yaml @@ -57,6 +57,9 @@ spec: {{- if .Values.proxy.httpProxyPort }} --proxyPort {{ .Values.proxy.httpProxyPort }}{{- end -}} {{- if .Values.proxy.httpProxyUser }} --proxyUser {{ .Values.proxy.httpProxyUser }}{{- end -}} {{- if .Values.proxy.httpProxyPassword }} --proxyPassword {{ .Values.proxy.httpProxyPassword }}{{- end -}} + {{- if .Values.proxy.graphitePort }} --graphitePorts {{ .Values.proxy.graphitePort }}{{- end -}} + {{- if .Values.proxy.graphiteDelimiters }} --graphiteDelimiters {{ .Values.proxy.graphiteDelimiters }}{{- end -}} + {{- if .Values.proxy.graphiteFormat }} --graphiteFormat {{ .Values.proxy.graphiteFormat }}{{- end -}} {{- if .Values.proxy.heap }} - name: JAVA_HEAP_USAGE value: {{ .Values.proxy.heap | quote }} @@ -104,6 +107,10 @@ spec: - containerPort: {{ .Values.proxy.deltaCounterPort }} protocol: TCP {{- end }} + {{- if .Values.proxy.graphitePort }} + - containerPort: {{ .Values.proxy.graphitePort }} + protocol: TCP + {{- end }} resources: {{ toYaml .Values.proxy.resources | trim | indent 10 }} securityContext: diff --git a/wavefront/templates/proxy-service.yaml b/wavefront/templates/proxy-service.yaml index d4df8948..7ac4082e 100644 --- a/wavefront/templates/proxy-service.yaml +++ b/wavefront/templates/proxy-service.yaml @@ -59,6 +59,11 @@ spec: port: {{ .Values.proxy.deltaCounterPort }} protocol: TCP {{- end }} + {{- if .Values.proxy.graphitePort }} + - name: graphite + port: {{ .Values.proxy.graphitePort }} + protocol: TCP + {{- end }} selector: app.kubernetes.io/name : {{ template "wavefront.fullname" .}} app.kubernetes.io/component: proxy diff --git a/wavefront/values.yaml b/wavefront/values.yaml index ab60ad5e..e6bebcda 100644 --- a/wavefront/values.yaml +++ b/wavefront/values.yaml @@ -330,6 +330,17 @@ proxy: ## This is usually 50000 # deltaCounterPort: 50000 + ## The port number the proxy will listen on for metrics in Graphite data format. + ## This is usually 2003 + # graphitePort: 2003 + + ## Characters that should be replaced by dots, in case they were escaped within Graphite and collectd before sending. + ## A common delimiter is underscore + # graphiteDelimiters: _ + + ## Indexes of fields within Graphite and collectd metric names that correspond to a hostname. + # graphiteFormat: 4,2,5 + ## Any configuration property can be passed to the proxy via command line args in ## in the format: `-- `. Multiple properties can be specified ## separated by whitespace.