Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide capability to configure StatsD via Helm #1001

Merged
merged 1 commit into from
Apr 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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