From aeb03af0e24459b0dfaec7b08a10ab129d1122c2 Mon Sep 17 00:00:00 2001 From: Pierre Tessier Date: Fri, 8 Nov 2019 12:54:52 -0500 Subject: [PATCH] stable/wavefront - update to use 1.0.x based wavefront collector (#18690) * Update to use 1.0.x based collector Signed-off-by: Pierre Tessier * Fixed lint failures Signed-off-by: Pierre Tessier --- stable/wavefront/Chart.yaml | 8 +- stable/wavefront/OWNERS | 2 - stable/wavefront/README.md | 13 +- .../examples/discovery-config-values.yaml | 194 ++++++++++++++++++ stable/wavefront/requirements.lock | 6 +- stable/wavefront/requirements.yaml | 2 +- stable/wavefront/templates/_helpers.tpl | 6 - .../templates/collector-cluster-role.yaml | 11 + .../wavefront/templates/collector-config.yaml | 140 ++++++++++++- .../templates/collector-daemonset.yaml | 77 +++++++ .../templates/collector-deployment.yaml | 39 +--- .../wavefront/templates/proxy-deployment.yaml | 9 - stable/wavefront/values.yaml | 162 ++++++++------- 13 files changed, 536 insertions(+), 133 deletions(-) create mode 100644 stable/wavefront/examples/discovery-config-values.yaml create mode 100644 stable/wavefront/templates/collector-daemonset.yaml diff --git a/stable/wavefront/Chart.yaml b/stable/wavefront/Chart.yaml index 9b401f17fc..84b4af8457 100644 --- a/stable/wavefront/Chart.yaml +++ b/stable/wavefront/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 name: wavefront description: Wavefront Kubernetes collector -appVersion: 0.9.7 -version: 1.0.0 +appVersion: 1.0.3 +version: 1.1.0 keywords: - metric - monitoring @@ -10,12 +10,10 @@ keywords: - alerting home: https://www.wavefront.com sources: -- https://github.com/wavefrontHQ/wavefront-kubernetes-collector +- https://github.com/wavefrontHQ/wavefront-collector-for-kubernetes - https://github.com/wavefrontHQ/java/tree/master/proxy maintainers: - name: vikramraman email: rvikram@vmware.com - name: puckpuck email: pierre@wavefront.com -- name: krisclarkdev - email: clarkk@vmware.com diff --git a/stable/wavefront/OWNERS b/stable/wavefront/OWNERS index 3f9c7c810f..b56f6599fa 100644 --- a/stable/wavefront/OWNERS +++ b/stable/wavefront/OWNERS @@ -1,8 +1,6 @@ approvers: - vikramraman - puckpuck -- krisclarkdev reviewers: - vikramraman - puckpuck -- krisclarkdev diff --git a/stable/wavefront/README.md b/stable/wavefront/README.md index 9d01eda2e4..54cf695f4f 100644 --- a/stable/wavefront/README.md +++ b/stable/wavefront/README.md @@ -1,13 +1,13 @@ -# Wavefront Kubenetes collector +# Wavefront Collector for Kubernetes [Wavefront](https://wavefront.com) is a cloud-native monitoring and analytics platform that provides three dimensional microservices observability with metrics, histograms and OpenTracing-compatible distributed tracing. ## Introduction -This chart will deploy the Wavefront Kubernetes collector and Wavefront Proxy to your +This chart will deploy the Wavefront Collector for Kubernetes and Wavefront Proxy to your Kubernetes cluster. You can use this chart to install multiple Wavefront Proxy releases, -though only one Wavefront Kubernetes collector per cluster should be used. +though only one Wavefront Collector for Kubernetes per cluster should be used. You can learn more about the Wavefront and Kubernetes integration [here](https://docs.wavefront.com/wavefront_kubernetes.html) @@ -18,3 +18,10 @@ options for this chart. The **requried** options are `clusterName`, `wavefront.url` and `wavefront.token`. You will need to provide values for those options for a successful installation of the chart. + + +## Upgrading +### Upgrading from 1.0 +Openshift support has been removed from the helm chart. Use the Wavefront Openshift operator available [here](https://github.com/wavefrontHQ/wavefront-collector-for-kubernetes/tree/master/deploy/openshift) instead. + +The `collector.kubernetesSource` parameter has been replaced with the `collector.useReadOnlyPort` option. diff --git a/stable/wavefront/examples/discovery-config-values.yaml b/stable/wavefront/examples/discovery-config-values.yaml new file mode 100644 index 0000000000..eb2663ef75 --- /dev/null +++ b/stable/wavefront/examples/discovery-config-values.yaml @@ -0,0 +1,194 @@ +## Discovery configuration examples +## Use the sections below in your values file to enable auto-discovery +## Some of these will require you to sepcify some details specific to your environment such as user/passwords + +## Ensure you include the following object structure (collector.discovery.config), +## then copy / paste the appropriate snippets you need below +collector: + discovery: + config: + + + # activemq + - name: activemq + type: telegraf/activemq + selectors: + images: + - "*activemq*" + conf: | + server = "${host}" + port = 8161 + username = "admin" + password = "admin" + webadmin = "admin" + + # apache httpd + - name: apache + type: telegraf/apache + selectors: + images: + - 'httpd*' + - '*httpd*' + port: 80 + conf: | + urls = ["http://${host}:${port}/server-status?auto"] + + # consul + - name: consul + type: telegraf/consul + selectors: + images: + - 'consul*' + port: 8500 + conf: | + address = "${host}:${port}" + scheme = "http" + + # couchbase + - name: couchbase + type: telegraf/couchbase + selectors: + images: + - 'couchbase/server:enterprise-6.0.1' + port: 8091 + conf: | + servers = ["http://Administrator:password@${host}:${port}"] + + # couchdb + - name: couchdb + type: telegraf/couchdb + selectors: + images: + - '*couchdb*' + port: 5984 + conf: | + hosts = ["http://admin:password@${host}:${port}/_node/_local/_stats"] + + # elasticsearch + - name: elasticsearch + type: telegraf/elasticsearch + selectors: + images: + - '*elastic*' + port: 9200 + conf: | + servers = ["http://${host}:${port}"] + local = false + cluster_health = true + cluster_stats = true + + # haProxy + - name: haproxy + type: telegraf/haproxy + selectors: + images: + - "*haproxy*" + port: 8181 + conf: | + servers = ["http://username:password@${host}:${port}/haproxy?stats"] + + # memcached + - name: memcached + type: telegraf/memcached + selectors: + images: + - 'memcached:*' + port: 11211 + conf: | + servers = ["${host}:${port}"] + + # mongodb + - name: mongodb + type: telegraf/mongodb + selectors: + images: + - 'mongo*' + port: 27017 + conf: | + servers = ["mongodb://main_admin:abc123@${host}:${port}"] + + # mysql + - name: mysql + type: telegraf/mysql + selectors: + images: + - "*sql*" + collection: + interval: "180s" + port: 3306 + conf: | + servers = ["root:password@tcp(${host}:${port})/?tls=false"] + perf_events_statements_digest_text_limit = 120 + perf_events_statements_limit = 250 + perf_events_statements_time_limit = 86400 + table_schema_databases = [] + gather_process_list = true + gather_table_io_waits = true + gather_table_lock_waits = true + gather_index_io_waits = true + gather_event_waits = true + gather_file_events_stats = true + interval_slow = "30m" + + # nginx + - name: nginx + type: telegraf/nginx + selectors: + images: + - 'nginx*' + port: 80 + conf: | + urls = ["http://${host}:${port}/metrics"] + + # nginx_plus + - name: nginx_plus + type: telegraf/nginx_plus + selectors: + images: + - 'nginxplus*' + conf: | + urls = ["http://${host}/api"] + + # rabbitmq + - name: rabbitmq + type: telegraf/rabbitmq + selectors: + images: + - 'rabbitmq*' + conf: | + url = "http://${host}:15672" + username = "guest" + password = "guest" + + # redis master and slaves + - name: redis + type: telegraf/redis + selectors: + images: + - 'redis:*' + - '*redis*' + port: 6379 + scheme: "tcp" + conf: | + servers = ["${server}"] + + # riak + - name: riak + type: telegraf/riak + selectors: + images: + - 'riak-kv:*' + - '*riak-kv:*' + port: 8098 + conf: | + servers = ["http://${host}:${port}"] + + # zookeeper + - name: zookeeper + type: telegraf/zookeeper + selectors: + images: + - '*zookeeper' + port: 2181 + conf: | + servers = ["${host}:${port}"] diff --git a/stable/wavefront/requirements.lock b/stable/wavefront/requirements.lock index 97d58d90dd..763d6fef97 100644 --- a/stable/wavefront/requirements.lock +++ b/stable/wavefront/requirements.lock @@ -1,6 +1,6 @@ dependencies: - name: kube-state-metrics repository: https://kubernetes-charts.storage.googleapis.com/ - version: 0.13.0 -digest: sha256:a009e6781117de69f26b9ac1e72267407f5f598642fd20043b88ad815915391c -generated: 2019-01-17T23:00:41.957053-05:00 + version: 2.3.1 +digest: sha256:6a42b6ed0c45affe9a5f5c88db2fa3223ea2cf1648bf59861308aac709471169 +generated: 2019-08-25T19:41:26.435664-04:00 diff --git a/stable/wavefront/requirements.yaml b/stable/wavefront/requirements.yaml index 173d06d00a..d0ac90a384 100644 --- a/stable/wavefront/requirements.yaml +++ b/stable/wavefront/requirements.yaml @@ -1,5 +1,5 @@ dependencies: - name: kube-state-metrics - version: ^0.8.0 + version: ^2.2.1 repository: https://kubernetes-charts.storage.googleapis.com/ condition: kubeStateMetrics.enabled diff --git a/stable/wavefront/templates/_helpers.tpl b/stable/wavefront/templates/_helpers.tpl index f41c7f95b4..5bb6ab48e2 100644 --- a/stable/wavefront/templates/_helpers.tpl +++ b/stable/wavefront/templates/_helpers.tpl @@ -58,10 +58,4 @@ Create the name of the service account to use {{- end -}} {{- end -}} -{{/* -Create template used as options for Wavefront sink in collector -*/}} -{{- define "wavefront.collector.sinkOptions" -}} -{{- printf "&clusterName=%s&includeLabels=%t&includeContainers=%t&prefix=%s" .Values.clusterName (default .Values.collector.includeLabels true) (default .Values.collector.includeContainers true) (default .Values.collector.prefix "kubernetes.") -}} -{{- end -}} diff --git a/stable/wavefront/templates/collector-cluster-role.yaml b/stable/wavefront/templates/collector-cluster-role.yaml index 36f821d51a..f679b785a9 100644 --- a/stable/wavefront/templates/collector-cluster-role.yaml +++ b/stable/wavefront/templates/collector-cluster-role.yaml @@ -26,6 +26,14 @@ rules: - get - list - watch +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - update + - create - apiGroups: - extensions resources: @@ -34,4 +42,7 @@ rules: - get - list - watch +- nonResourceURLs: ["/metrics"] + verbs: + - get {{- end }} diff --git a/stable/wavefront/templates/collector-config.yaml b/stable/wavefront/templates/collector-config.yaml index 28a7738f2b..89eb859fc3 100644 --- a/stable/wavefront/templates/collector-config.yaml +++ b/stable/wavefront/templates/collector-config.yaml @@ -1,4 +1,4 @@ -{{- if and .Values.collector.discovery.enabled .Values.collector.discovery.config }} +{{- if .Values.collector.enabled }} apiVersion: v1 kind: ConfigMap metadata: @@ -10,5 +10,141 @@ metadata: app.kubernetes.io/component: collector name: {{ template "wavefront.collector.fullname" . }}-config data: -{{ tpl (toYaml .Values.collector.discovery.config) . | indent 2 }} + config.yaml: | + clusterName: {{ .Values.clusterName }} + enableDiscovery: {{ .Values.collector.discovery.enabled }} + defaultCollectionInterval: {{ .Values.collector.interval | default "60s" }} + flushInterval: {{ .Values.collector.flushInterval | default "10s" }} + sinkExportDataTimeout: {{ .Values.collector.sinkDelay | default "20s" }} + + sinks: + {{- if .Values.collector.useProxy }} + {{- if .Values.collector.proxyAddress }} + - proxyAddress: {{ .Values.collector.proxyAddress }} + {{- else }} + - proxyAddress: {{ template "wavefront.proxy.fullname" . }}:{{ .Values.proxy.port }} + {{- end }} + {{- else }} + - server: {{ .Values.wavefront.url }} + token: {{ .Values.wavefront.token }} + {{- end }} + {{- if .Values.collector.tags }} + tags: +{{ tpl (toYaml .Values.collector.tags) . | indent 8 }} + {{- end }} + filters: + # Filter out infrequently used kube-state-metrics. + metricBlacklist: + - 'kube.configmap.annotations.gauge' + - 'kube.configmap.metadata.resource.version.gauge' + - 'kube.endpoint.*' + - 'kube.job.owner.gauge' + - 'kube.job.labels.gauge' + - 'kube.job.spec.completions.gauge' + - 'kube.job.spec.parallelism.gauge' + - 'kube.job.status.start.time.gauge' + - 'kube.limitrange.*' + - 'kube.namespace.annotations.gauge' + - 'kube.persistentvolume.*' + - 'kube.persistentvolumeclaim.*' + - 'kube.pod.container.resource.limits.*' + - 'kube.pod.container.*.reason.gauge' + - 'kube.pod.owner.gauge' + - 'kube.pod.start.time.gauge' + - 'kube.pod.status.scheduled.gauge' + - 'kube.pod.status.scheduled.time.gauge' + - 'kube.replicationcontroller.created.gauge' + - 'kube.replicationcontroller.metadata.generation.gauge' + - 'kube.replicationcontroller.spec.replicas.gauge' + - 'kube.resourcequota.*' + - 'kube.secret.*' + - 'kube.statefulset.*' + - 'kube.storageclass.*' + # Filter out generated labels + tagExclude: + - 'label?controller?revision*' + - 'label?pod?template*' + + sources: + kubernetes_source: + {{- if .Values.collector.useReadOnlyPort }} + url: + kubeletPort: 10255 + kubeletHttps: false + {{- else }} + url: https://kubernetes.default.svc + kubeletPort: 10250 + kubeletHttps: true + {{- end }} + {{- if .Values.serviceAccount.create }} + useServiceAccount: true + {{- else }} + useServiceAccount: false + {{- end }} + insecure: true + prefix: kubernetes. + filters: + metricBlacklist: + - 'kubernetes.sys_container.*' + - 'kubernetes.node.ephemeral_storage.*' + + internal_stats_source: + prefix: kubernetes. + + telegraf_sources: + - plugins: [] + + {{- if .Values.collector.apiServerMetrics }} + # Kubernetes API Server + prometheus_sources: + - url: https://kubernetes.default.svc.cluster.local:443/metrics + httpConfig: + bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token + tls_config: + ca_file: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt + insecure_skip_verify: true + prefix: kube.apiserver. + filters: + metricWhitelist: + - 'kube.apiserver.apiserver.*' + - 'kube.apiserver.etcd.*' + - 'kube.apiserver.process.*' + {{- end }} + + {{- if .Values.collector.discovery.enabled }} + + discovery: + {{- if .Values.collector.discovery.annotationPrefix }} + annotation_prefix: {{ .Values.collector.discovery.annotationPrefix | quote }} + {{- end }} + plugins: + + + # auto-discover kube DNS + - name: kube-dns-discovery + type: prometheus + selectors: + labels: + k8s-app: + - kube-dns + port: 10054 + path: /metrics + scheme: http + prefix: kube.dns. + filters: + metricWhitelist: + - 'kube.dns.http.request.duration.microseconds' + - 'kube.dns.http.request.size.bytes' + - 'kube.dns.http.requests.total.counter' + - 'kube.dns.http.response.size.bytes' + - 'kube.dns.kubedns.dnsmasq.*' + - 'kube.dns.process.*' + + {{- if .Values.collector.discovery.config }} + + # user supplied discovery config +{{ tpl (toYaml .Values.collector.discovery.config) . | indent 6 }} + {{- end }} + {{- end }} + {{- end }} diff --git a/stable/wavefront/templates/collector-daemonset.yaml b/stable/wavefront/templates/collector-daemonset.yaml new file mode 100644 index 0000000000..246a321cc9 --- /dev/null +++ b/stable/wavefront/templates/collector-daemonset.yaml @@ -0,0 +1,77 @@ +{{- if and .Values.collector.enabled .Values.collector.useDaemonset }} +apiVersion: apps/v1 +kind: DaemonSet +metadata: + labels: + app.kubernetes.io/name : {{ template "wavefront.fullname" . }} + helm.sh/chart: {{ template "wavefront.chart" . }} + app.kubernetes.io/managed-by: {{ .Release.Service | quote }} + app.kubernetes.io.instance: {{ .Release.Name | quote }} + app.kubernetes.io/component: collector + name: {{ template "wavefront.collector.fullname" . }} +spec: + selector: + matchLabels: + app.kubernetes.io/name : {{ template "wavefront.fullname" .}} + app.kubernetes.io/component: collector + template: + metadata: + labels: + app.kubernetes.io/name : {{ template "wavefront.fullname" .}} + app.kubernetes.io/component: collector + spec: + tolerations: + - effect: NoSchedule + key: node.alpha.kubernetes.io/role + operator: Exists + - effect: NoSchedule + key: node-role.kubernetes.io/master + operator: Exists + serviceAccountName: {{ template "wavefront.collector.serviceAccountName" . }} + containers: + - name: wavefront-collector + image: {{ .Values.collector.image.repository }}:{{ .Values.collector.image.tag }} + imagePullPolicy: {{ .Values.collector.image.pullPolicy }} + command: + - /wavefront-collector + - --daemon=true + - --config-file=/etc/collector/config.yaml + {{- if .Values.collector.maxProcs }} + - --max-procs={{ .Values.collector.maxProcs }} + {{- end }} + {{- if .Values.collector.logLevel }} + - --log-level={{ .Values.collector.logLevel }} + {{- end }} + env: + - name: HOST_PROC + value: /host/proc + - name: POD_NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: POD_NAMESPACE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + ports: + - containerPort: 8088 + protocol: TCP + resources: +{{ toYaml .Values.collector.resources | indent 10 }} + volumeMounts: + - name: procfs + mountPath: /host/proc + readOnly: true + - name: config + mountPath: /etc/collector/ + readOnly: true + volumes: + - name: procfs + hostPath: + path: /proc + - name: config + configMap: + name: {{ template "wavefront.collector.fullname" . }}-config +{{- end }} diff --git a/stable/wavefront/templates/collector-deployment.yaml b/stable/wavefront/templates/collector-deployment.yaml index 2c9a396302..1f129770f5 100644 --- a/stable/wavefront/templates/collector-deployment.yaml +++ b/stable/wavefront/templates/collector-deployment.yaml @@ -1,4 +1,5 @@ {{- if .Values.collector.enabled }} +{{- if not .Values.collector.useDaemonset }} apiVersion: apps/v1 kind: Deployment metadata: @@ -28,57 +29,29 @@ spec: imagePullPolicy: {{ .Values.collector.image.pullPolicy }} command: - /wavefront-collector - - --source={{ .Values.collector.kubernetesSource | default "kubernetes.summary_api:''" }} - {{- if and (.Values.kubeStateMetrics.enabled) (not .Values.collector.discovery.enabled) }} - - --source=prometheus:''?url=http://{{ .Release.Name }}-kube-state-metrics:{{ index .Values "kube-state-metrics" "service" "port" }}/metrics - {{- end }} - {{- if .Values.collector.useProxy }} - {{- if .Values.collector.proxyAddress }} - - --sink=wavefront:?proxyAddress={{ .Values.collector.proxyAddress }}{{ template "wavefront.collector.sinkOptions" . }} - {{- else }} - - --sink=wavefront:?proxyAddress={{ template "wavefront.proxy.fullname" . }}:{{ .Values.proxy.port }}{{ template "wavefront.collector.sinkOptions" . }} - {{- end }} - {{- else }} - - --sink=wavefront:?server={{ .Values.wavefront.url }}&token={{ .Values.wavefront.token }}{{ template "wavefront.collector.sinkOptions" . }} - {{- end }} - - --enable-discovery={{ .Values.collector.discovery.enabled }} - {{- if and .Values.collector.discovery.enabled .Values.collector.discovery.config }} - - --discovery-config=/etc/collector/config.yaml - {{- end }} + - --daemon=false + - --config-file=/etc/collector/config.yaml {{- if .Values.collector.maxProcs }} - --max-procs={{ .Values.collector.maxProcs }} {{- end }} - {{- if .Values.collector.interval }} - - --metric-resolution={{ .Values.collector.interval }} - {{- end }} - {{- if .Values.collector.sinkDelay }} - - --sink-export-data-timeout={{ .Values.collector.sinkDelay }} - {{- end }} - {{- if .Values.collector.logVerbosity }} - - --v={{ .Values.collector.logVerbosity }} + {{- if .Values.collector.logLevel }} + - --log-level={{ .Values.collector.logLevel }} {{- end }} resources: {{ toYaml .Values.collector.resources | indent 10 }} volumeMounts: - {{- if and .Values.collector.discovery.enabled .Values.collector.discovery.config }} - name: config mountPath: /etc/collector/ readOnly: true - {{- end }} - {{- if not .Values.openshift.enabled }} - name: ssl-certs mountPath: /etc/ssl/certs readOnly: true - {{- end }} volumes: - {{- if and .Values.collector.discovery.enabled .Values.collector.discovery.config }} - name: config configMap: name: {{ template "wavefront.collector.fullname" . }}-config - {{- end }} - {{- if not .Values.openshift.enabled }} - name: ssl-certs hostPath: path: /etc/ssl/certs - {{- end }} +{{- end }} {{- end }} diff --git a/stable/wavefront/templates/proxy-deployment.yaml b/stable/wavefront/templates/proxy-deployment.yaml index 158a4572cb..e6eb639929 100644 --- a/stable/wavefront/templates/proxy-deployment.yaml +++ b/stable/wavefront/templates/proxy-deployment.yaml @@ -67,19 +67,10 @@ spec: - name: preprocessor mountPath: /etc/wavefront/wavefront-proxy/preprocessor {{- end }} - {{- if .Values.openshift.enabled }} - - name: spool - mountPath: /var/spool/wavefront-proxy - {{- end }} volumes: {{- if .Values.proxy.preprocessor }} - name: preprocessor configMap: name: {{ template "wavefront.proxy.fullname" . }}-preprocessor {{- end }} - {{- if .Values.openshift.enabled }} - - name: spool - persistentVolumeClaim: - claimName: {{ .Values.openshift.pvcName | quote }} - {{- end }} {{- end }} diff --git a/stable/wavefront/values.yaml b/stable/wavefront/values.yaml index d2e1d43a50..0244a2ae61 100644 --- a/stable/wavefront/values.yaml +++ b/stable/wavefront/values.yaml @@ -20,9 +20,33 @@ collector: enabled: true image: repository: wavefronthq/wavefront-kubernetes-collector - tag: 0.9.7 + tag: 1.0.3 pullPolicy: IfNotPresent + ## If set to true, DaemonSet will be used for the collector. + ## If set to false, Deployment will be used for the collector. + ## Setting this to true is strongly recommended + useDaemonset: true + + ## max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores) + # maxProcs: 0 + + ## log level one of: info, debug, or trace. (default info) + # logLevel: info + + ## The resolution at which the collector will retain metrics. (default 60s) + # interval: 60s + + ## How often collected data is flushed (default 10s) + # flushInterval: 10s + + ## Timeout for exporting data (default 20s) + # sinkDelay: 20s + + ## If set to true, will use the unauthenticated real only port for the kubelet + ## If set to false, will use the encrypted full access port for the kubelet (default false) + # useReadOnlyPort: false + ## If set to true, metrics will be sent to Wavefront via a Wavefront Proxy. ## When true you must either specify a value for `collector.proxyAddress` or set `proxy.enabled` to true ## If set to false, metrics will be sent to Wavefront via the Direct Ingestion API @@ -33,57 +57,64 @@ collector: ## Required if `collector.useProxy` is true and `proxy.enabled` is false # proxyAddress: wavefront-proxy:2878 - ## This is the Kubelet summary api endpoint and options. - ## Ref: https://github.com/wavefrontHQ/wavefront-kubernetes-collector/blob/master/docs/configuration.md#kubernetes-source - # kubernetesSource: kubernetes.summary_api:'' - ## If using Openshift (see below to enable) use the following for kubernetesSource - # kubernetesSource: kubernetes.summary_api:${MASTER_URL}?useServiceAccount=true&kubeletHttps=true&kubeletPort=10250 + ## If set to true Kubernetes API Server will also be scraped for metrics (default false) + # apiServerMetrics: false - ## If set to true, any Kubernetes labels will be applied to metrics as tags. Defaults to false. - includeLabels: true + ## Map of tags to apply to all metrics collected by the collector (default empty) + # tags: + ## sample tags to include (env, region) + # env: production + # region: us-west-2 - ## If set to true, all container metrics will be sent to Wavefront. - ## When set to false, container level metrics are skipped (pod level and above are still sent to Wavefront). Defaults to true. - # includeContainers: true - - ## The global prefix to be added for Kubernetes metrics. Defaults to `kubernetes.`. - ## This does not apply to other sources. Use source level prefixes for sources other than the Kubernetes source. - # prefix: kubernetes. - - ## max number of CPUs that can be used simultaneously. Less than 1 for default (number of cores) - # maxProcs: 0 - - ## The resolution at which the collector will retain metrics. (default 1m) - # interval: 1m - - ## Timeout for exporting data (default 20s) - # sinkDelay: 20s - - ## log level. Uses V logs (glog) - # logVerbosity: 0 - - ## Discovery capabilities of Wavefront Collector + ## Rules based discovery configuration + ## Ref: https://github.com/wavefrontHQ/wavefront-kubernetes-collector/blob/master/docs/discovery.md discovery: enabled: true - ## Rules based discovery collection configuration - ## Ref: https://github.com/wavefrontHQ/wavefront-kubernetes-collector/blob/master/docs/discovery.md#rules-based-discovery + ## When specified, this replaces `prometheus.io` as the prefix for annotations used to + ## auto-discover Prometheus endpoints + # annotationPrefix: "wavefront.com" + + ## Can be used to add additional discovery rules # config: - # config.yaml: | - # global: - # discovery_interval: 10m - # prom_configs: - # - name: kube-dns-discovery - # labels: - # k8s-app: kube-dns - # port: 10055 - # path: /metrics - # scheme: http - # source: kube-dns - # prefix: kube.dns. - # tags: - # env: prod - # collector: wavefront-collector + ## auto-discover a sample prometheus application + # - name: prom-example + # type: prometheus + # selectors: + # labels: + # k8s-app: + # - prom-example + # port: 8080 + # path: /metrics + # prefix: kube.prom-example. + # tags: + # alt_name: sample-app + ## auto-discover mongodb pods (replace USER:PASSWORD) + # - name: mongodb + # type: telegraf/mongodb + # selectors: + # images: + # - '*mongodb:*' + # port: 27017 + # conf: | + # servers = ["mongodb://USER:PASSWORD${host}:${port}"] + # gather_perdb_stats = true + # filters: + # metricBlacklist: + # - 'mongodb.member.status' + # - 'mongodb.state' + # - 'mongodb.db.stats.type' + ## auto-discover rabbitmq pods (replace USER and PASSWORD) + # - name: rabbitmq + # type: telegraf/rabbitmq + # selectors: + # images: + # - '*rabbitmq:*' + # port: 15672 + # conf: | + # url = "http://${host}:${port}" + # username = "USER" + # password = "PASSWORD" ## Wavefront Collector resource requests and limits ## Make sure to keep requests and limits equal to keep the pods in the Guaranteed QoS class @@ -107,7 +138,7 @@ proxy: enabled: true image: repository: wavefronthq/proxy - tag: 4.35 + tag: 4.38 pullPolicy: IfNotPresent ## The port number the proxy will listen on for metrics in Wavefront data format. @@ -149,16 +180,21 @@ proxy: ## through the proxy. You can configure the rules here. By default a rule to drop Kubernetes ## generated labels is applied to remove unecessary and often noisy tags. ## Ref: https://docs.wavefront.com/proxies_preprocessor_rules.html - preprocessor: - rules.yaml: | - '2878': - - rule : drop-generated-label-tags - action : dropTag - tag : label\.(controller-revision-hash|pod-template-.*|.*kubernetes\.io.*) - # - rule : add-cluster-tag - # action : addTag - # tag : cluster - # value : {{ .Values.clusterName | quote }} + # preprocessor: + # rules.yaml: | + # '2878': + # # fix %2F to be a / instead. May be required on EKS. + # - rule : fix-forward-slash + # action : replaceRegex + # scope : pointLine + # search : "%2F" + # replace : "/" + # # replace bad characters ("&", "$", "!", "@") with underscores in the entire point line string + # - rule : replace-badchars + # action : replaceRegex + # scope : pointLine + # search : "[&\\$!@]" + # replace : "_" ## Specifies whether RBAC resources should be created @@ -180,15 +216,3 @@ serviceAccount: ## will be configured to capture metrics. kubeStateMetrics: enabled: true - - -## Openshift integration can be enabled here -## If enabled is true, you must specify `collector.kubernetesSource` to be a valid -## summary api endpoint within your Openshift environment. -openshift: - enabled: false - - ## Wavefront proxy requires a persistent volume claim for its metrics buffers in Openshift - ## If `proxy.enabled` is true, this must be set to the name of a persistent volume claim - ## that the proxy can use for its buffers. - # pvcName: wavefront-storage