diff --git a/charts/promitor-agent-scraper/README.md b/charts/promitor-agent-scraper/README.md index b8943994a..64fa30bc3 100644 --- a/charts/promitor-agent-scraper/README.md +++ b/charts/promitor-agent-scraper/README.md @@ -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` | diff --git a/charts/promitor-agent-scraper/templates/configmap.yaml b/charts/promitor-agent-scraper/templates/configmap.yaml index 27e50ec74..cca69bc61 100644 --- a/charts/promitor-agent-scraper/templates/configmap.yaml +++ b/charts/promitor-agent-scraper/templates/configmap.yaml @@ -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 }} diff --git a/charts/promitor-agent-scraper/values.yaml b/charts/promitor-agent-scraper/values.yaml index ca5ef1094..b0006b25d 100644 --- a/charts/promitor-agent-scraper/values.yaml +++ b/charts/promitor-agent-scraper/values.yaml @@ -14,7 +14,12 @@ image: azureAuthentication: appId: "" appKey: "" - +metricSinks: + useStatsd: false + statsd: + host: "" + port: 8125 + metricPrefix: "" prometheus: scrapeEndpointPath: /metrics enableMetricTimestamps: True diff --git a/docs/configuration/v1.x/runtime.md b/docs/configuration/v1.x/runtime.md index de033c18f..f2b8c276d 100644 --- a/docs/configuration/v1.x/runtime.md +++ b/docs/configuration/v1.x/runtime.md @@ -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. diff --git a/docs/deployment/index.md b/docs/deployment/index.md index e8a74c91e..30f24019c 100644 --- a/docs/deployment/index.md +++ b/docs/deployment/index.md @@ -53,6 +53,11 @@ azureMetadata: subscriptionId: "" runtime: + metricSinks: + statsd: + host: graphite + port: 8125 + metricPrefix: poc.promitor. prometheus: scrapeEndpointPath: /metrics enableMetricTimestamps: True