diff --git a/.gitignore b/.gitignore index e8ec15a..72d9643 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,6 @@ .DS_Store telegraf/manifests/*.tmp.yaml -influxdb/manifests/*.tmp.yaml chronograf/manifests/*.tmp.yaml grafana/manifests/*.tmp.yaml rootfs/usr/bin/telegraf diff --git a/.travis.yml b/.travis.yml index 4ef52d1..05197e4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,6 @@ services: - docker script: - cd grafana && make test && cd .. - - cd influxdb && make test && cd .. - cd telegraf && make test && cd .. notifications: slack: diff --git a/README.md b/README.md index 28eef94..e0f42be 100644 --- a/README.md +++ b/README.md @@ -10,14 +10,12 @@ For more information about the Drycc Workflow, please visit the main project pag We welcome your input! If you have feedback, please [submit an issue][issues]. If you'd like to participate in development, please read the "Development" section below and [submit a pull request][prs]. # About -This repository aims to contain all the necessary components for a production quality monitoring solution that runs on top of the kubernetes cluster scheduler. It provides part of the [TICK](https://influxdata.com/time-series-platform/) stack which is produced by the influxdata team. +This repository aims to contain the necessary components for a production quality monitoring solution that runs on top of the kubernetes cluster scheduler. It provides part of the [TICK](https://influxdata.com/time-series-platform/) stack which is produced by the influxdata team. ## Current State -Currently this repo provides only 3 components (Influxdb, Telegraf, and Grafana). Telegraf is the metrics collection agent that runs using the daemon set API. For more infomation please read [this](telegraf/README.md). +Currently this repo provides only 2 components (Telegraf, and Grafana). Telegraf is the metrics collection agent that runs using the daemon set API. For more infomation please read [this](telegraf/README.md). -Also provided is an Influxdb container which only runs 1 instance of the database. It also does not write any data to the host filesystem so it is not a durable system right now. For more information please read [this](influxdb/README.md) - -Lastly, Grafana is a stand alone graphing application. It natively supports Influxdb as a datasource and provides a robust engine for creating dashboards on top of timeseries data. We provide a few out of the box dashboards for monitoring Drycc Workflow and Kubernetes but please feel free to use them as a starting point for creating your own dashboards. +Grafana is a stand alone graphing application. It natively supports Influxdb as a datasource and provides a robust engine for creating dashboards on top of timeseries data. We provide a few out of the box dashboards for monitoring Drycc Workflow and Kubernetes but please feel free to use them as a starting point for creating your own dashboards. # Architecture Diagram diff --git a/charts/monitor/templates/monitor-grafana-deployment.yaml b/charts/monitor/templates/monitor-grafana-deployment.yaml index fc623c1..54333dc 100644 --- a/charts/monitor/templates/monitor-grafana-deployment.yaml +++ b/charts/monitor/templates/monitor-grafana-deployment.yaml @@ -60,7 +60,7 @@ spec: key: password {{- else }} - name: "INFLUXDB_URLS" - value: http://$(DRYCC_MONITOR_INFLUXDB_SERVICE_HOST):$(DRYCC_MONITOR_INFLUXDB_SERVICE_PORT_TRANSPORT) + value: http://$(DRYCC_INFLUXDB_SERVICE_HOST):$(DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT) {{- end }} - name: "BIND_PORT" value: "3500" diff --git a/charts/monitor/templates/monitor-influxdb-certificate.yaml b/charts/monitor/templates/monitor-influxdb-certificate.yaml deleted file mode 100644 index 65d1701..0000000 --- a/charts/monitor/templates/monitor-influxdb-certificate.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{ if .Values.global.cert_manager_enabled }} -apiVersion: cert-manager.io/v1alpha2 -kind: Certificate -metadata: - name: drycc-monitor-influxdb -spec: - secretName: drycc-monitor-influxdb-auto-tls - issuerRef: - name: drycc-cluster-issuer - kind: ClusterIssuer - dnsNames: - - drycc-monitor-influxdb.{{ .Values.global.platform_domain }} - privateKey: - rotationPolicy: Always -{{- end }} diff --git a/charts/monitor/templates/monitor-influxdb-creds-secret.yaml b/charts/monitor/templates/monitor-influxdb-creds-secret.yaml deleted file mode 100644 index 64f25ca..0000000 --- a/charts/monitor/templates/monitor-influxdb-creds-secret.yaml +++ /dev/null @@ -1,14 +0,0 @@ -{{- if eq .Values.global.influxdb_location "off-cluster" }} -apiVersion: v1 -kind: Secret -metadata: - name: influxdb-creds - labels: - heritage: drycc -type: Opaque -data: - url: {{ .Values.influxdb.url | b64enc }} - database: {{ .Values.influxdb.database | b64enc }} - user: {{ .Values.influxdb.user | b64enc }} - password: {{ .Values.influxdb.password | b64enc }} -{{- end }} diff --git a/charts/monitor/templates/monitor-influxdb-deployment.yaml b/charts/monitor/templates/monitor-influxdb-deployment.yaml deleted file mode 100644 index 930daa9..0000000 --- a/charts/monitor/templates/monitor-influxdb-deployment.yaml +++ /dev/null @@ -1,69 +0,0 @@ -{{- if eq .Values.global.influxdb_location "on-cluster" }} -apiVersion: apps/v1 -kind: Deployment -metadata: - name: drycc-monitor-influxdb - labels: - heritage: drycc - annotations: - component.drycc.cc/version: {{ .Values.influxdb.docker_tag }} -spec: - replicas: 1 - strategy: - type: Recreate - selector: - matchLabels: - app: drycc-monitor-influxdb - template: - metadata: - labels: - app: drycc-monitor-influxdb - spec: - containers: - - name: drycc-monitor-influxdb - image: {{.Values.influxdb.docker_registry}}{{.Values.influxdb.org}}/influxdb:{{.Values.influxdb.docker_tag}} - imagePullPolicy: {{.Values.influxdb.pull_policy}} -{{- if or (.Values.influxdb.limits_cpu) (.Values.influxdb.limits_memory)}} - resources: - limits: -{{- if (.Values.influxdb.limits_cpu) }} - cpu: {{.Values.influxdb.limits_cpu}} -{{- end}} -{{- if (.Values.influxdb.limits_memory) }} - memory: {{.Values.influxdb.limits_memory}} -{{- end}} -{{- end}} - ports: - - containerPort: 8083 - name: admin - - containerPort: 8086 - name: transport - protocol: TCP - - containerPort: 8084 - name: ssltransport - protocol: TCP - livenessProbe: - httpGet: - path: /ping - port: 8086 - initialDelaySeconds: 1 - timeoutSeconds: 1 - readinessProbe: - httpGet: - path: /ping - port: 8086 - initialDelaySeconds: 1 - timeoutSeconds: 1 -{{- if .Values.influxdb.persistence.enabled }} - volumeMounts: - - name: influxdb-data - mountPath: /data - # Allow user influxdb to write to /data - securityContext: - fsGroup: 1001 - volumes: - - name: influxdb-data - persistentVolumeClaim: - claimName: drycc-monitor-influxdb -{{- end }} -{{- end }} diff --git a/charts/monitor/templates/monitor-influxdb-ingress.yaml b/charts/monitor/templates/monitor-influxdb-ingress.yaml deleted file mode 100644 index 21aef28..0000000 --- a/charts/monitor/templates/monitor-influxdb-ingress.yaml +++ /dev/null @@ -1,33 +0,0 @@ -apiVersion: networking.k8s.io/v1beta1 -kind: Ingress -metadata: - name: "drycc-monitor-influxdb" - labels: - app: "drycc-monitor-influxdb" - chart: "{{ .Chart.Name }}-{{ .Chart.Version }}" - release: "{{ .Release.Name }}" - heritage: "{{ .Release.Service }}" - annotations: - kubernetes.io/tls-acme: "true" - {{- if not (eq .Values.global.ingress_class "") }} - kubernetes.io/ingress.class: "{{ .Values.global.ingress_class }}" - {{ end }} -spec: - rules: - - host: drycc-monitor-influxdb.{{ .Values.global.platform_domain }} - http: - paths: - {{- if eq .Values.global.ingress_class "gce" "alb" }} - - path: /* - {{- else }}{{/* Has annotations but ingress class is not "gce" nor "alb" */}} - - path: / - {{- end }} - backend: - serviceName: drycc-monitor-influxdb - servicePort: 80 - {{ if .Values.global.cert_manager_enabled }} - tls: - - secretName: drycc-monitor-influxdb-auto-tls - hosts: - - drycc-monitor-influxdb.{{ .Values.global.platform_domain }} - {{- end }} diff --git a/charts/monitor/templates/monitor-influxdb-pvc.yaml b/charts/monitor/templates/monitor-influxdb-pvc.yaml deleted file mode 100644 index 72ad511..0000000 --- a/charts/monitor/templates/monitor-influxdb-pvc.yaml +++ /dev/null @@ -1,24 +0,0 @@ -{{- if .Values.influxdb.persistence.enabled }} -kind: PersistentVolumeClaim -apiVersion: v1 -metadata: - name: drycc-monitor-influxdb - labels: - heritage: drycc -spec: - accessModes: - - {{ .Values.influxdb.persistence.accessMode | quote }} - resources: - requests: - storage: {{ .Values.influxdb.persistence.size | quote }} -{{- if .Values.influxdb.persistence.storageClass }} -{{- if (eq "-" .Values.influxdb.persistence.storageClass) }} - storageClassName: "" -{{- else }} - storageClassName: "{{ .Values.influxdb.persistence.storageClass }}" -{{- end }} -{{- end }} -{{- if .Values.influxdb.persistence.volumeName }} - volumeName: "{{ .Values.influxdb.persistence.volumeName }}" -{{- end }} -{{- end }} diff --git a/charts/monitor/templates/monitor-influxdb-svc.yaml b/charts/monitor/templates/monitor-influxdb-svc.yaml deleted file mode 100644 index 210eb86..0000000 --- a/charts/monitor/templates/monitor-influxdb-svc.yaml +++ /dev/null @@ -1,16 +0,0 @@ -{{- if eq .Values.global.influxdb_location "on-cluster" }} -apiVersion: v1 -kind: Service -metadata: - name: drycc-monitor-influxdb - labels: - heritage: drycc - app: drycc-monitor-influxdb -spec: - ports: - - port: 80 - name: transport - targetPort: transport - selector: - app: drycc-monitor-influxdb -{{- end }} diff --git a/charts/monitor/templates/monitor-telegraf-daemon.yaml b/charts/monitor/templates/monitor-telegraf-daemon.yaml index 606d86c..4107fa0 100644 --- a/charts/monitor/templates/monitor-telegraf-daemon.yaml +++ b/charts/monitor/templates/monitor-telegraf-daemon.yaml @@ -62,7 +62,7 @@ spec: key: password {{- else }} - name: "INFLUXDB_URLS" - value: "\"http://$(DRYCC_MONITOR_INFLUXDB_SERVICE_HOST):$(DRYCC_MONITOR_INFLUXDB_SERVICE_PORT_TRANSPORT)\"" + value: "\"http://$(DRYCC_INFLUXDB_SERVICE_HOST):$(DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT)\"" {{- end }} - name: "HOST_PROC" value: "/rootfs/proc" diff --git a/charts/monitor/templates/monitor-telegraf-deployment.yaml b/charts/monitor/templates/monitor-telegraf-deployment.yaml index 222e1dd..38eca7d 100644 --- a/charts/monitor/templates/monitor-telegraf-deployment.yaml +++ b/charts/monitor/templates/monitor-telegraf-deployment.yaml @@ -65,9 +65,9 @@ spec: key: password {{- else }} - name: "INFLUXDB_URLS" - value: "\"http://$(DRYCC_MONITOR_INFLUXDB_SERVICE_HOST):$(DRYCC_MONITOR_INFLUXDB_SERVICE_PORT_TRANSPORT)\"" + value: "\"http://$(DRYCC_INFLUXDB_SERVICE_HOST):$(DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT)\"" - name: "INFLUXDB_INPUT_URLS" - value: "\"http://$(DRYCC_MONITOR_INFLUXDB_SERVICE_HOST):$(DRYCC_MONITOR_INFLUXDB_SERVICE_PORT_TRANSPORT)/debug/vars\"" + value: "\"http://$(DRYCC_INFLUXDB_SERVICE_HOST):$(DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT)/debug/vars\"" - name: "ENABLE_INFLUXDB_INPUT" value: "true" {{- end }} diff --git a/charts/monitor/values.yaml b/charts/monitor/values.yaml index 55ce041..74fbb76 100644 --- a/charts/monitor/values.yaml +++ b/charts/monitor/values.yaml @@ -14,21 +14,6 @@ grafana: # this is usually a non required setting. environment: ALLOW_SIGN_UP: false -influxdb: - org: "drycc" - pull_policy: "Always" - docker_tag: "canary" - docker_registry: "" - # limits_cpu: "100m" - # limits_memory: "50Mi" - url: "my.influx.url" - database: "kubernetes" - user: "user" - password: "password" - persistence: - enabled: false - accessMode: ReadWriteOnce - size: 20Gi telegraf: org: "drycc" pull_policy: "Always" diff --git a/default.mk b/default.mk index 03fd4ab..1cfbfbb 100644 --- a/default.mk +++ b/default.mk @@ -32,10 +32,8 @@ test-style: build-all: docker build ${DOCKER_BUILD_FLAGS} -t ${DRYCC_REGISTRY}${IMAGE_PREFIX}/grafana:${VERSION} ../grafana/rootfs - docker build ${DOCKER_BUILD_FLAGS} -t ${DRYCC_REGISTRY}${IMAGE_PREFIX}/influxdb:${VERSION} ../influxdb/rootfs docker build ${DOCKER_BUILD_FLAGS} -t ${DRYCC_REGISTRY}${IMAGE_PREFIX}/telegraf:${VERSION} ../telegraf/rootfs push-all: docker push ${DRYCC_REGISTRY}${IMAGE_PREFIX}/grafana:${VERSION} - docker push ${DRYCC_REGISTRY}${IMAGE_PREFIX}/influxdb:${VERSION} docker push ${DRYCC_REGISTRY}${IMAGE_PREFIX}/telegraf:${VERSION} diff --git a/deploy.mk b/deploy.mk index 9244524..f857153 100644 --- a/deploy.mk +++ b/deploy.mk @@ -1,9 +1,9 @@ install: - helm upgrade monitor ../charts/monitor --install --namespace drycc --set grafana.org=${IMAGE_PREFIX},grafana.docker_tag=${VERSION},influxdb.org=${IMAGE_PREFIX},influxdb.docker_tag=${VERSION},telegraf.org=${IMAGE_PREFIX},telegraf.docker_tag=${VERSION} + helm upgrade monitor ../charts/monitor --install --namespace drycc --set grafana.org=${IMAGE_PREFIX},grafana.docker_tag=${VERSION},telegraf.org=${IMAGE_PREFIX},telegraf.docker_tag=${VERSION} upgrade: - helm upgrade monitor ../charts/monitor --namespace drycc --set grafana.org=${IMAGE_PREFIX},grafana.docker_tag=${VERSION},telegraf.org=${IMAGE_PREFIX},telegraf.docker_tag=${VERSION},influxdb.org=${IMAGE_PREFIX},influxdb.docker_tag=${VERSION} + helm upgrade monitor ../charts/monitor --namespace drycc --set grafana.org=${IMAGE_PREFIX},grafana.docker_tag=${VERSION},telegraf.org=${IMAGE_PREFIX},telegraf.docker_tag=${VERSION} uninstall: - helm delete monitor --purge \ No newline at end of file + helm delete monitor \ No newline at end of file diff --git a/grafana/rootfs/Dockerfile b/grafana/rootfs/Dockerfile index 63fc250..1160da0 100644 --- a/grafana/rootfs/Dockerfile +++ b/grafana/rootfs/Dockerfile @@ -1,10 +1,8 @@ -FROM alpine:3.12 +FROM grafana/grafana:7.3.4 COPY . / -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk add --update bash fontconfig curl grafana \ - && curl -fsSL -o /usr/share/grafana/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ +RUN curl -fsSL -o /usr/share/grafana/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ && chmod +x /usr/share/grafana/envtpl \ && chmod +x /usr/share/grafana/start-grafana \ && chmod 644 /usr/share/grafana/grafana.ini.tpl diff --git a/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json b/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json index faa6fe0..de47398 100644 --- a/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json +++ b/grafana/rootfs/usr/share/grafana/api/dashboards/drycc_component_health.json @@ -1709,7 +1709,7 @@ { "key": "container_name", "operator": "=", - "value": "drycc-monitor-influxdb" + "value": "drycc-influxdb" } ] } @@ -1834,7 +1834,7 @@ { "key": "container_name", "operator": "=", - "value": "drycc-monitor-influxdb" + "value": "drycc-influxdb" } ] } diff --git a/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json b/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json index 08c1c66..2f3c730 100644 --- a/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json +++ b/grafana/rootfs/usr/share/grafana/api/dashboards/influx.json @@ -335,7 +335,7 @@ { "key": "container_name", "operator": "=", - "value": "drycc-monitor-influxdb" + "value": "drycc-influxdb" } ] } diff --git a/grafana/rootfs/usr/share/grafana/start-grafana b/grafana/rootfs/usr/share/grafana/start-grafana index 3497749..dfe27d6 100755 --- a/grafana/rootfs/usr/share/grafana/start-grafana +++ b/grafana/rootfs/usr/share/grafana/start-grafana @@ -8,8 +8,8 @@ GRAFANA_USER=${DEFAULT_USER:-admin} GRAFANA_PASSWD=${DEFAULT_USER_PASSWORD:-admin} GRAFANA_PORT=${BIND_PORT:-3000} -INFLUXDB_HOST=${DRYCC_MONITOR_INFLUXDB_SERVICE_HOST:-"drycc-monitor-influxdb.drycc.svc.${KUBERNETES_CLUSTER_DOMAIN}"} -INFLUXDB_PORT=${DRYCC_MONITOR_INFLUXDB_SERVICE_PORT_TRANSPORT:-8086} +INFLUXDB_HOST=${DRYCC_INFLUXDB_SERVICE_HOST:-"drycc-influxdb.drycc.svc.${KUBERNETES_CLUSTER_DOMAIN}"} +INFLUXDB_PORT=${DRYCC_INFLUXDB_SERVICE_PORT_TRANSPORT:-8086} INFLUXDB_DATABASE=${INFLUXDB_DATABASE:-kubernetes} INFLUXDB_USER=${INFLUXDB_USER:-admin} INFLUXDB_PASSWORD=${INFLUXDB_PASSWORD:-admin} diff --git a/influxdb/Makefile b/influxdb/Makefile deleted file mode 100644 index 31d983c..0000000 --- a/influxdb/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -SHORT_NAME ?= influxdb -SHELL_SCRIPTS = rootfs/home/influxdb/start-influx - -include ../default.mk diff --git a/influxdb/README.md b/influxdb/README.md deleted file mode 100644 index 41f2be0..0000000 --- a/influxdb/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# InfluxDB - -## Configuration -Right now the configuration is completely static but eventually I hope to use the [envtpl](https://github.com/arschles/envtpl) project to help provide a more robust solution. - -## Development -The provided `Makefile` has various targets to help support building and publishing new images into a kubernetes cluster. - -### Environment variables -There are a few key environment variables you should be aware of when interacting with the `make` targets. - -* `BUILD_TAG` - The tag provided to the docker image when it is built (defaults to the git-sha) -* `SHORT_NAME` - The name of the image (defaults to `grafana`) -* `DRYCC_REGISTRY` - This is the registry you are using (default `dockerhub`) -* `IMAGE_PREFIX` - This is the account for the registry you are using (default `drycc`) - -### Make targets - -* `make build` - Build docker image -* `make push` - Push docker image to a registry -* `make upgrade` - Replaces the running grafana instance with a new one - -The typical workflow will look something like this - `DRYCC_REGISTRY= IMAGE_PREFIX=foouser make build push upgrade` - -### Accessing Admin UI -Included is a proxy pod that proxies the UI ports so they are accessible when doing local development. These ports are `8086` and `8083`. You can access the UI by going to the `http://:8083`. diff --git a/influxdb/rootfs/Dockerfile b/influxdb/rootfs/Dockerfile deleted file mode 100644 index 1d2a20c..0000000 --- a/influxdb/rootfs/Dockerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM alpine:3.12 - -COPY . / - -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/community" >> /etc/apk/repositories \ - && apk add --update bash fontconfig curl influxdb \ - && curl -SL -o /home/influxdb/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ - && chmod +x /home/influxdb/envtpl \ - && mkdir -p /data \ - && chmod +x /home/influxdb/start-influx - -VOLUME /data - -WORKDIR /home/influxdb -CMD ["./start-influx"] - -# Expose the ssl http api port -EXPOSE 8084 -# Expose the http api port -EXPOSE 8086 diff --git a/influxdb/rootfs/home/influxdb/config.toml.tpl b/influxdb/rootfs/home/influxdb/config.toml.tpl deleted file mode 100644 index 091f2b4..0000000 --- a/influxdb/rootfs/home/influxdb/config.toml.tpl +++ /dev/null @@ -1,110 +0,0 @@ -reporting-disabled = {{ default false .REPORTING_DISABLED }} -dir = {{ default "" .DIR | quote }} -bind-address = {{ default ":8088" .BIND_ADDRESS | quote }} - -[meta] - enabled = {{ default true .META_ENABLED }} - dir = {{ default "/data/meta" .META_DIR | quote }} - bind-address = {{ default ":8088" .META_BIND_ADDRESS | quote }} - http-bind-address = {{ default ":8091" .META_HTTP_BIND_ADDRESS | quote }} - https-enabled = {{ default false .META_HTTPS_ENABLED }} - https-certificate = {{ default "" .META_HTTPS_CERTIFICATE | quote }} - retention-autocreate = {{ default true .META_RETENTION_AUTOCREATE }} - election-timeout = {{ default "1s" .META_ELECTION_TIMEOUT | quote }} - heartbeat-timeout = {{ default "1s" .META_HEARTBEAT_TIMEOUT | quote }} - leader-lease-timeout = {{ default "500ms" .META_LEADER_LEASE_TIMEOUT | quote }} - commit-timeout = {{ default "50ms" .META_COMMIT_TIMEOUT | quote }} - cluster-tracing = {{ default false .META_CLUSTER_TRACING }} - raft-promotion-enabled = {{ default true .META_RAFT_PROMOTION_ENABLED }} - logging-enabled = {{ default false .META_LOGGING.ENABLED }} - pprof-enabled = {{ default false .META_PPROF_ENABLED }} - lease-duration = {{ default "1m0s" .META_LEASE_DURATION | quote }} - -[data] - enabled = {{ default true .DATA_ENABLED }} - dir = {{ default "/data/db" .DATA_DIR | quote }} - engine = {{ default "tsm1" .DATA_ENGINE | quote }} - max-wal-size = {{ default 104857600 .DATA_MAX_WAL_SIZE }} - wal-flush-interval = {{ default "10m0s" .DATA_WAL_FLUSH_INTERVAL | quote }} - wal-partition-flush-delay = {{ default "2s" .DATA_WAL_PARTITION_FLUSH_DELAY | quote }} - wal-dir = {{ default "/data/db/wal" .DATA_WAL_DIR | quote }} - wal-logging-enabled = {{ default false .DATA_WAL_LOGGING_ENABLED }} - wal-ready-series-size = {{ default 30720 .DATA_WAL_READY_SERIES_SIZE }} - wal-compaction-threshold = {{ default 0.5 .DATA_WAL_COMPACTION_THRESHOLD }} - wal-max-series-size = {{ default 1048576 .DATA_WAL_MAX_SERIES_SIZE }} - wal-flush-cold-interval = {{ default "5s" .DATA_WAL_FLUSH_COLD_INTERVAL | quote }} - wal-partition-size-threshold = {{ default 52428800 .DATA_WAL_PARTITION_SIZE_THRESHOLD }} - query-log-enabled = {{ default false .DATA_QUERY_LOG_ENABLED }} - cache-max-memory-size = {{ default 1048576000 .DATA_CACHE_MAX_MEMORY_SIZE }} - cache-snapshot-memory-size = {{ default 26214400 .DATA_CACHE_SNAPSHOT_MEMORY_SIZE }} - cache-snapshot-write-cold-duration = {{ default "10m0s" .DATA_CACHE_SNAPSHOT_WRITE_COLD_DURATION | quote }} - compact-full-write-cold-duration = {{ default "4h0m0s" .DATA_COMPACT_FULL_WRITE_COLD_DURATION | quote }} - max-points-per-block = {{ default 0 .DATA_MAX_POINTS_PER_BLOCK }} - data-logging-enabled = {{ default false .DATA_LOGGING_ENABLED }} - -[coordinator] - force-remote-mapping = {{ default false .CLUSTER_FORCE_REMOTE_MAPPING }} - write-timeout = {{ default "5s" .CLUSTER_WRITE_TIMEOUT | quote }} - shard-writer-timeout = {{ default "5s" .CLUSTER_SHARD_WRITER_TIMEOUT | quote }} - shard-mapper-timeout = {{ default "5s" .CLUSTER_SHARD_MAPPER_TIMEOUT | quote }} - -[retention] - enabled = {{ default true .RETENTION_ENABLED }} - check-interval = {{ default "30m0s" .CHECK_INTERVAL | quote }} - -[shard-precreation] - enabled = {{ default true .SHARD_PRECREATION_ENABLED }} - check-interval = {{ default "10m0s" .SHARD_PRECREATION_CHECK_INTERVAL | quote }} - advance-period = {{ default "30m0s" .SHARD_PRECREATION_ADVANCE_PERIOD | quote }} - -[monitor] - store-enabled = {{ default true .MONITOR_STORE_ENABLED }} - store-database = {{ default "_internal" .MONITOR_STORE_DATABASE | quote }} - store-interval = {{ default "10s" .MONITOR_STORE_INTERVAL | quote }} - -[subscriber] - enabled = {{ default true .SUBSCRIBER_ENABLED }} - -[http] - enabled = {{ default true .HTTP_ENABLED }} - bind-address = {{ default ":8086" .HTTP_BIND_ADDRESS | quote }} - auth-enabled = {{ default false .HTTP_AUTH_ENABLED }} - log-enabled = {{ default false .HTTP_LOG_ENABLED }} - write-tracing = {{ default false .HTTP_WRITE_TRACING }} - pprof-enabled = {{ default false .HTTP_PPROF_ENABLED }} - https-enabled = {{ default false .HTTP_HTTPS_ENABLED }} - https-certificate = {{ default "/etc/ssl/influxdb.pem" .HTTP_HTTPS_CERTIFICATE | quote }} - - -[continuous_queries] - log-enabled = {{ default false .CONTINUOUS_QUERIES_LOG_ENABLED }} - enabled = {{ default true .CONTINUOUS_QUERIES_ENABLED }} - run-interval = {{ default "1s" .CONTINUOUS_QUERIES_RUN_INTERVAL | quote }} - -[hinted-handoff] - enabled = {{ default true .HINTED_HANDOFF_ENABLED}} - dir = {{ default "/home/influxdb/.influxdb/hh" .HINTED_HANDOFF_DIR | quote }} - max-size = {{ default 1073741824 .HINTED_HANDOFF_MAX_SIZE }} - max-age = {{ default "168h0m0s" .HINTED_HANDOFF_MAX_AGE | quote }} - retry-rate-limit = {{ default 0 .HINTED_HANDOFF_RETRY_RATE_LIMIT }} - retry-interval = {{ default "1s" .HINTED_HANDOFF_RETRY_INTERVAL | quote }} - retry-max-interval = {{ default "1m0s" .HINTED_HANDOFF_RETRY_MAX_INTERVAL | quote }} - purge-interval = {{ default "1h0m0s" .HINTED_HANDOFF_PURGE_INTERVAL | quote }} - -[[graphite]] - enabled = {{ default false .GRAPHITE_ENABLED }} - bind-address = {{ default ":2003" .GRAPHITE_BIND_ADDRESS | quote }} - protocol = {{ default "tcp" .GRAPHITE_PROTOCOL | quote }} - consistency-level = {{ default "one" .GRAPHITE_CONSISTENCY_LEVEL | quote }} - separator = {{ default "." .GRAPHITE_SEPERATOR | quote }} - {{ if .GRAPHITE_TAGS }}tags = [{{ .GRAPHITE_TAGS | quote }}]{{end}} - {{ if .GRAPHITE_TEMPLATES }}templates = [{{ .GRAPHITE_TEMPLATES | quote }}]{{end}} - -[[udp]] - enabled = {{ default false .UDP_ENABLED }} - bind-address = {{ default ":8089" .GRAPHITE_BIND_ADDRESS | quote }} - database = {{ default "udp" .UDP_DATABASE | quote }} - batch-size = {{ default "1000" .UDP_BATCH_SIZE }} - batch-timeout = {{ default "1s" .UDP_BATCH_TIMEOUT | quote }} - batch-pending = {{ default "5" .UDP_BATCH_PENDING }} - read-buffer ={{ default "0" .UDP_READ_BUFFER }} diff --git a/influxdb/rootfs/home/influxdb/start-influx b/influxdb/rootfs/home/influxdb/start-influx deleted file mode 100755 index fff475c..0000000 --- a/influxdb/rootfs/home/influxdb/start-influx +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -echo "Building config.toml!" -./envtpl -in config.toml.tpl >> config.toml -echo "Finished building toml..." -echo "###########################################" -echo "###########################################" -cat config.toml -echo "###########################################" -echo "###########################################" -exec influxd -config config.toml diff --git a/telegraf/rootfs/Dockerfile b/telegraf/rootfs/Dockerfile index 8a1c103..50b867e 100644 --- a/telegraf/rootfs/Dockerfile +++ b/telegraf/rootfs/Dockerfile @@ -1,10 +1,8 @@ -FROM alpine:3.12 +FROM telegraf:1.16.2 COPY . / -RUN echo "https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \ - && apk add --update bash fontconfig curl telegraf \ - && curl -fSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ +RUN curl -fSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ && chmod +x /usr/bin/envtpl \ && curl -fSL -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64 \ && chmod +x /usr/bin/jq