Skip to content

Commit

Permalink
Provide capability to configure StatsD via Helm (#1001)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomkerkhove authored Apr 30, 2020
1 parent a04092f commit 5f0ae39
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 3 deletions.
3 changes: 3 additions & 0 deletions charts/promitor-agent-scraper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ their default values.
| `image.pullPolicy` | Policy to pull image | `Always` |
| `azureAuthentication.appId` | Id of the Azure AD entity to authenticate with | |
| `azureAuthentication.appKey` | Secret of the Azure AD entity to authenticate with | |
| `metricSinks.statsd.host` | DNS name or IP address of StatsD server | |
| `metricSinks.statsd.port` | Port (UDP) address of StatsD server | `8125` |
| `metricSinks.statsd.metricPrefix` | Prefix that will be added to every metric defined in the metric declaration | |
| `prometheus.scrapeEndpointPath` | Path where the scraping endpoint for Prometheus is being exposed | `/metrics` |
| `prometheus.enableMetricTimestamps` | Indication wheter or not to include timestamp | `true` |
| `prometheus.metricUnavailableValue` | Value to report in Prometheus when no metric was found wheter or not to include timestamp | `NaN` |
Expand Down
12 changes: 12 additions & 0 deletions charts/promitor-agent-scraper/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ data:
runtime.yaml: |-
server:
httpPort: {{ .Values.service.targetPort | quote }}
metricSinks:
{{- if .Values.metricSinks.statsd.host }}
statsd:
host: {{ .Values.metricSinks.statsd.host | quote }}
{{- if .Values.metricSinks.statsd.port }}
port: {{ .Values.metricSinks.statsd.port | quote }}
{{- end }}
{{- if .Values.metricSinks.statsd.metricPrefix }}
metricPrefix: {{ .Values.metricSinks.statsd.metricPrefix | quote }}
{{- end }}
{{- end }}
prometheus:
metricUnavailableValue: {{ .Values.prometheus.metricUnavailableValue | quote }}
enableMetricTimestamps: {{ .Values.prometheus.enableMetricTimestamps | quote }}
Expand Down
7 changes: 6 additions & 1 deletion charts/promitor-agent-scraper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ image:
azureAuthentication:
appId: ""
appKey: ""

metricSinks:
useStatsd: false
statsd:
host: ""
port: 8125
metricPrefix: ""
prometheus:
scrapeEndpointPath: /metrics
enableMetricTimestamps: True
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration/v1.x/runtime.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ As of today, we support the follow sinks:

In order to push metrics to a StatsD server, you'll need to configure following:

- `metricSinks.statsd.host` - DNS name or IP address of server.
- `metricSinks.statsd.host` - Port (UDP) address of server. (Default: `8125`)
- `metricSinks.statsd.host` - DNS name or IP address of StatsD server.
- `metricSinks.statsd.host` - Port (UDP) address of StatsD server. (Default: `8125`)
- `metricSinks.statsd.metricPrefix` - Prefix that will be added to every metric
defined in the metric declaration.

Expand Down
5 changes: 5 additions & 0 deletions docs/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,11 @@ azureMetadata:
subscriptionId: "<azure-subscription-id>"

runtime:
metricSinks:
statsd:
host: graphite
port: 8125
metricPrefix: poc.promitor.
prometheus:
scrapeEndpointPath: /metrics
enableMetricTimestamps: True
Expand Down

0 comments on commit 5f0ae39

Please sign in to comment.