Comments (8)
Hi @bjethwan,
I don't know, I didn't try it with Prometheus Operator but I'll be glad to have your feedback on this matter!
from couchbase_exporter.
Hello :) To use it in Kubernetes I create a Helm chart with the docker image precise in values.yaml
Helm create blakelead-couchbase_exporter
image:
repository: blakelead/couchbase-exporter
pullPolicy: IfNotPresent
I have some difficulties to field environment variable in values.yaml
extraEnv:
- name: CB_EXPORTER_DB_USER
value: customadmin
- name: CB_EXPORTER_DB_PASSWORD
value: custompasword
- db.uri: http://couchbase:8091 # The db uir take the name of the kubernetes couchbase service
I Try many ways, but once deploy the chart still use default values
kubectl logs blakelead-exporter-couchbase
time="2020-09-18T14:53:55Z" level=info msg="Couchbase Exporter Version: 0.9.0"
time="2020-09-18T14:53:55Z" level=info msg="config.file="
time="2020-09-18T14:53:55Z" level=info msg="web.listen-address=127.0.0.1:9191"
time="2020-09-18T14:53:55Z" level=info msg="web.telemetry-path=/metrics"
time="2020-09-18T14:53:55Z" level=info msg="web.timeout=10s"
**time="2020-09-18T14:53:55Z" level=info msg="db.uri=http://localhost:8091"**
time="2020-09-18T14:53:55Z" level=info msg="db.timeout=10s"
time="2020-09-18T14:53:55Z" level=info msg="tls.skip-insecure=false"
time="2020-09-18T14:53:55Z" level=info msg="tls.ca-cert="
time="2020-09-18T14:53:55Z" level=info msg="tls.enabled=false"
time="2020-09-18T14:53:55Z" level=info msg="tls.client-cert="
time="2020-09-18T14:53:55Z" level=info msg="tls.client-key="
time="2020-09-18T14:53:55Z" level=info msg="log.level=info"
time="2020-09-18T14:53:55Z" level=info msg="log.format=text"
time="2020-09-18T14:53:55Z" level=info msg="scrape.cluster=true"
time="2020-09-18T14:53:55Z" level=info msg="scrape.node=true"
time="2020-09-18T14:53:55Z" level=info msg="scrape.bucket=true"
time="2020-09-18T14:53:55Z" level=info msg="scrape.xdcr=true"
time="2020-09-18T14:53:55Z" level=info msg="Cluster exporter registered"
time="2020-09-18T14:53:55Z" level=info msg="Node exporter registered"
time="2020-09-18T14:53:55Z" level=info msg="Bucket exporter registered"
time="2020-09-18T14:53:55Z" level=info msg="Bucketstats exporter registered"
time="2020-09-18T14:53:55Z" level=info msg="XDCR exporter registered"
time="2020-09-18T14:53:55Z" level=info msg="Started listening at 127.0.0.1:9191"
from couchbase_exporter.
Hi @LilaNKM ,
Could you provide a link to your chart? Or if not possible the values.yaml along with the templates?
Also, could you please create a dedicated issue?
Thanks :)
from couchbase_exporter.
The chart is create with helm create command.
helm create blakelead-exporter
I change 3 files in it.
values.yaml
# Default values for blakelead-exporter.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
image:
repository: blakelead/couchbase-exporter
pullPolicy: IfNotPresent
imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
serviceAccount:
# Specifies whether a service account should be created
create: true
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name:
podSecurityContext: {}
# fsGroup: 2000
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
service:
type: ClusterIP
port: 9191
metricsPort:
name: http
annotations: {}
labels: {}
**extraEnv:
- name: CB_EXPORTER_DB_USER
value: customadmin
- name: CB_EXPORTER_DB_PASSWORD
value: custompasword
- db.uri: http://couchbase:8091**
initialDelaySeconds: 5
ingress:
enabled: false
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths: []
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi
nodeSelector: {}
tolerations: []
affinity: {}
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "blakelead-exporter.fullname" . }}
labels:
{{- include "blakelead-exporter.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "blakelead-exporter.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "blakelead-exporter.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "blakelead-exporter.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
**args:
{{- range $key, $value := .Values.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}**
ports:
- name: http
containerPort: **9191**
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
Chart.yaml
apiVersion: v2
name: blakelead-exporter
description: A Helm chart for Kubernetes
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: latest
helm install test-blakelead-exporter ./blakelead-exporter
from couchbase_exporter.
You don't provide env
attributes in your deployment.yaml
.
You should have something like that (I did not test it):
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "blakelead-exporter.fullname" . }}
labels:
{{- include "blakelead-exporter.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "blakelead-exporter.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "blakelead-exporter.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "blakelead-exporter.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $key, $value := .Values.extraEnv }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
args:
{{- range $key, $value := .Values.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 9191
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
from couchbase_exporter.
I add
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "blakelead-exporter.fullname" . }}
labels:
{{- include "blakelead-exporter.labels" . | nindent 4 }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
{{- include "blakelead-exporter.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "blakelead-exporter.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "blakelead-exporter.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- range $key, $value := .Values.extraEnvs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
args:
{{- range $key, $value := .Values.extraArgs }}
{{- if $value }}
- --{{ $key }}={{ $value }}
{{- else }}
- --{{ $key }}
{{- end }}
{{- end }}
ports:
- name: http
containerPort: 9191
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
And it' still do not take in account extra env values
kubectls logs test-blakelead-exporter-couchbase-7cb79b99bc-6kwsm
time="2020-09-21T15:24:34Z" level=info msg="Couchbase Exporter Version: 0.9.0"
time="2020-09-21T15:24:34Z" level=info msg="config.file="
time="2020-09-21T15:24:34Z" level=info msg="web.listen-address=127.0.0.1:9191"
time="2020-09-21T15:24:34Z" level=info msg="web.telemetry-path=/metrics"
time="2020-09-21T15:24:34Z" level=info msg="web.timeout=10s"
time="2020-09-21T15:24:34Z" level=info msg="db.uri=http://localhost:8091"
time="2020-09-21T15:24:34Z" level=info msg="db.timeout=10s"
time="2020-09-21T15:24:34Z" level=info msg="tls.skip-insecure=false"
time="2020-09-21T15:24:34Z" level=info msg="tls.ca-cert="
time="2020-09-21T15:24:34Z" level=info msg="tls.enabled=false"
time="2020-09-21T15:24:34Z" level=info msg="tls.client-cert="
time="2020-09-21T15:24:34Z" level=info msg="tls.client-key="
time="2020-09-21T15:24:34Z" level=info msg="log.level=info"
time="2020-09-21T15:24:34Z" level=info msg="log.format=text"
time="2020-09-21T15:24:34Z" level=info msg="scrape.cluster=true"
time="2020-09-21T15:24:34Z" level=info msg="scrape.node=true"
time="2020-09-21T15:24:34Z" level=info msg="scrape.bucket=true"
time="2020-09-21T15:24:34Z" level=info msg="scrape.xdcr=true"
time="2020-09-21T15:24:34Z" level=info msg="Cluster exporter registered"
time="2020-09-21T15:24:34Z" level=info msg="Node exporter registered"
time="2020-09-21T15:24:34Z" level=info msg="Bucket exporter registered"
time="2020-09-21T15:24:34Z" level=info msg="Bucketstats exporter registered"
time="2020-09-21T15:24:34Z" level=info msg="XDCR exporter registered"
time="2020-09-21T15:24:34Z" level=info msg="Started listening at 127.0.0.1:9191"
from couchbase_exporter.
Can it be a typo issue ? extraEnv
or extraEnvs
?
from couchbase_exporter.
Hello :)
I don't think it's a typo
with value Values.extraEnv it gives the error below:
helm install blakelead-exporter-couchbase ./blakelead-exporter-couchbase --debug --dry-run
Error: unable to build kubernetes objects from release manifest: error validating "": error validating data: [ValidationError(Deployment.spec.template.spec.containers[0].env[0]): invalid type for io.k8s.api.core.v1.EnvVar: got "string", expected "map", ValidationError(Deployment.spec.template.spec.containers[0].env[1]): invalid type for io.k8s.api.core.v1.EnvVar: got "string", expected "map", ValidationError(Deployment.spec.template.spec.containers[0].env[2]): invalid type for io.k8s.api.core.v1.EnvVar: got "string", expected "map"]
helm.go:76: [debug] error validating "": error validating data: [ValidationError(Deployment.spec.template.spec.containers[0].env[0]): invalid type for io.k8s.api.core.v1.EnvVar: got "string", expected "map", ValidationError(Deployment.spec.template.spec.containers[0].env[1]): invalid type for io.k8s.api.core.v1.EnvVar: got "string", expected "map", ValidationError(Deployment.spec.template.spec.containers[0].env[2]): invalid type for io.k8s.api.core.v1.EnvVar: got "string", expected "map"]
from couchbase_exporter.
Related Issues (20)
- [0.6.0] environment variable for scraping XDCR doesn't work HOT 1
- [examples] Rework Grafana dashboard template
- Change Licence to Apache 2.0 HOT 1
- Cluster configuration HOT 1
- Memcached moxi exporter HOT 2
- Support Couchbase 6.0 HOT 4
- Support for Couchbase Sync-Gateway +2.5 metrics HOT 2
- Multi URI to same cluster
- Switch to using https for connection to Couchbase cluster HOT 10
- json error HOT 7
- Issue with docker image run HOT 4
- Incorrect binary in linux amd64 release HOT 2
- Is TYPE correct for cb_bucket_ep_oom_errors and cb_bucket_ep_tmp_oom_errors ? HOT 9
- couchbase_export build failed HOT 3
- multiple xdcr crashes the exporter HOT 3
- No Binaries added to Release Assets for 0.9.2 HOT 1
- [ci] migrate to Github Actions
- Difference between this and Couchbase Official Prometheus Exporter HOT 3
- Do not force installing exporters on each node in cluster HOT 3
- can't identify some couchbase cluster metrics HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchbase_exporter.