├── .gitignore ├── LICENSE ├── README.md ├── charts └── monitor │ ├── Chart.yaml │ ├── charts │ ├── grafana │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── monitor-grafana-deployment.yaml │ │ │ ├── monitor-grafana-pvc.yaml │ │ │ └── monitor-grafana-svc.yaml │ ├── influxdb │ │ ├── Chart.yaml │ │ └── templates │ │ │ ├── monitor-influxdb-api-svc.yaml │ │ │ ├── monitor-influxdb-creds-secret.yaml │ │ │ ├── monitor-influxdb-deployment.yaml │ │ │ ├── monitor-influxdb-pvc.yaml │ │ │ └── monitor-influxdb-ui-svc.yaml │ └── telegraf │ │ ├── Chart.yaml │ │ └── templates │ │ ├── monitor-telegraf-daemon.yaml │ │ ├── monitor-telegraf-role.yaml │ │ ├── monitor-telegraf-rolebinding.yaml │ │ └── monitor-telegraf-service-account.yaml │ ├── templates │ └── _helpers.tmpl │ └── values.yaml ├── default.mk ├── deploy.mk ├── grafana ├── Makefile ├── README.md └── rootfs │ ├── Dockerfile │ └── usr │ └── share │ └── grafana │ ├── api │ └── dashboards │ │ ├── deis_component_health.json │ │ ├── deis_router.json │ │ ├── influx.json │ │ ├── kube_health.json │ │ ├── nsq_health.json │ │ └── redis.json │ ├── grafana.ini.tpl │ └── start-grafana ├── includes.mk ├── influxdb ├── Makefile ├── README.md └── rootfs │ ├── Dockerfile │ └── home │ └── influxdb │ ├── config.toml.tpl │ └── start-influx ├── telegraf ├── Makefile ├── README.md └── rootfs │ ├── Dockerfile │ ├── config.toml.tpl │ └── start-telegraf └── versioning.mk /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | *.swp 3 | *.swo 4 | .DS_Store 5 | 6 | telegraf/manifests/*.tmp.yaml 7 | influxdb/manifests/*.tmp.yaml 8 | chronograf/manifests/*.tmp.yaml 9 | grafana/manifests/*.tmp.yaml 10 | rootfs/usr/bin/telegraf 11 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) Microsoft Corporation. All rights reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | |![](https://upload.wikimedia.org/wikipedia/commons/thumb/1/17/Warning.svg/156px-Warning.svg.png) | Deis Workflow is no longer maintained.
Please [read the announcement](https://deis.com/blog/2017/deis-workflow-final-release/) for more detail. | 3 | |---:|---| 4 | | 09/07/2017 | Deis Workflow [v2.18][] final release before entering maintenance mode | 5 | | 03/01/2018 | End of Workflow maintenance: critical patches no longer merged | 6 | | | [Hephy](https://github.com/teamhephy/workflow) is a fork of Workflow that is actively developed and accepts code contributions. | 7 | 8 | # Deis Monitor v2 9 | [![Build Status](https://ci.deis.io/job/monitor/badge/icon)](https://ci.deis.io/job/monitor) 10 | [![Docker Repository on Quay](https://quay.io/repository/deisci/grafana/status "Docker Repository on Quay")](https://quay.io/repository/deisci/grafana) 11 | [![Docker Repository on Quay](https://quay.io/repository/deisci/influxdb/status "Docker Repository on Quay")](https://quay.io/repository/deisci/influxdb) 12 | [![Docker Repository on Quay](https://quay.io/repository/deisci/telegraf/status "Docker Repository on Quay")](https://quay.io/repository/deisci/telegraf) 13 | 14 | Deis (pronounced DAY-iss) Workflow is an open source Platform as a Service (PaaS) that adds a developer-friendly layer to any [Kubernetes](http://kubernetes.io) cluster, making it easy to deploy and manage applications on your own servers. 15 | 16 | For more information about the Deis Workflow, please visit the main project page at https://github.com/deis/workflow. 17 | 18 | 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]. 19 | 20 | # About 21 | 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. 22 | 23 | ## Current State 24 | 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). 25 | 26 | 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) 27 | 28 | 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 Deis Workflow and Kubernetes but please feel free to use them as a starting point for creating your own dashboards. 29 | 30 | # Architecture Diagram 31 | 32 | ``` 33 | ┌────────┐ 34 | │ Router │ ┌────────┐ 35 | └────────┘ │ Logger │ 36 | │ └────────┘ 37 | Log file │ 38 | │ │ 39 | ▼ ▼ 40 | ┌────────┐ ┌─────────┐ logs/metrics ┌─────┐ 41 | │App Logs│──Log File──▶│ fluentd │───────topics─────▶│ NSQ │ 42 | └────────┘ └─────────┘ └─────┘ 43 | │ 44 | │ 45 | ┌─────────────┐ │ 46 | │ HOST │ ▼ 47 | │ Telegraf │───┐ ┌────────┐ 48 | └─────────────┘ │ │Telegraf│ 49 | │ └────────┘ 50 | ┌─────────────┐ │ │ 51 | │ HOST │ │ ┌───────────┐ │ 52 | │ Telegraf │───┼───▶│ InfluxDB │◀────Wire ─────────┘ 53 | └─────────────┘ │ └───────────┘ Protocol 54 | │ ▲ 55 | ┌─────────────┐ │ │ 56 | │ HOST │ │ ▼ 57 | │ Telegraf │───┘ ┌──────────┐ 58 | └─────────────┘ │ Grafana │ 59 | └──────────┘ 60 | ``` 61 | 62 | [k8s-home]: http://kubernetes.io/ 63 | [issues]: https://github.com/deis/monitor/issues 64 | [prs]: https://github.com/deis/monitor/pulls 65 | [v2.18]: https://github.com/deis/workflow/releases/tag/v2.18.0 66 | 67 | -------------------------------------------------------------------------------- /charts/monitor/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: monitor 2 | home: https://github.com/deis/monitor 3 | version: 4 | description: Monitoring for Deis Workflow. 5 | maintainers: 6 | - name: Deis Team 7 | email: engineering@deis.com 8 | -------------------------------------------------------------------------------- /charts/monitor/charts/grafana/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: grafana 2 | home: https://github.com/deis/monitor/tree/master/grafana 3 | version: 4 | description: Monitoring for Deis Workflow. 5 | maintainers: 6 | - name: Deis Team 7 | email: engineering@deis.com 8 | -------------------------------------------------------------------------------- /charts/monitor/charts/grafana/templates/monitor-grafana-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.global.grafana_location "on-cluster" }} 2 | apiVersion: extensions/v1beta1 3 | kind: Deployment 4 | metadata: 5 | name: deis-monitor-grafana 6 | labels: 7 | heritage: deis 8 | annotations: 9 | component.deis.io/version: {{ .Values.docker_tag }} 10 | spec: 11 | replicas: 1 12 | strategy: 13 | rollingUpdate: 14 | maxSurge: 1 15 | maxUnavailable: 0 16 | type: RollingUpdate 17 | selector: 18 | matchLabels: 19 | app: deis-monitor-grafana 20 | template: 21 | metadata: 22 | labels: 23 | app: deis-monitor-grafana 24 | spec: 25 | containers: 26 | - name: deis-monitor-grafana 27 | image: quay.io/{{.Values.org}}/grafana:{{.Values.docker_tag}} 28 | imagePullPolicy: {{.Values.pull_policy}} 29 | {{- if or (.Values.limits_cpu) (.Values.limits_memory)}} 30 | resources: 31 | limits: 32 | {{- if (.Values.limits_cpu) }} 33 | cpu: {{.Values.limits_cpu}} 34 | {{- end}} 35 | {{- if (.Values.limits_memory) }} 36 | memory: {{.Values.limits_memory}} 37 | {{- end}} 38 | {{- end}} 39 | env: 40 | {{- if eq .Values.global.influxdb_location "off-cluster" }} 41 | - name: "INFLUXDB_SERVICE_URL" 42 | valueFrom: 43 | secretKeyRef: 44 | name: influxdb-creds 45 | key: url 46 | - name: "INFLUXDB_DATABASE" 47 | valueFrom: 48 | secretKeyRef: 49 | name: influxdb-creds 50 | key: database 51 | - name: "INFLUXDB_USER" 52 | valueFrom: 53 | secretKeyRef: 54 | name: influxdb-creds 55 | key: user 56 | - name: "INFLUXDB_PASSWORD" 57 | valueFrom: 58 | secretKeyRef: 59 | name: influxdb-creds 60 | key: password 61 | {{- else }} 62 | - name: "INFLUXDB_URLS" 63 | value: http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT) 64 | {{- end }} 65 | - name: "BIND_PORT" 66 | value: "3500" 67 | - name: "DEFAULT_USER" 68 | value: {{.Values.user}} 69 | - name: "DEFAULT_USER_PASSWORD" 70 | value: {{.Values.password}} 71 | - name: "ALLOW_SIGN_UP" 72 | value: {{.Values.allow_sign_up | quote}} 73 | ports: 74 | - containerPort: 3500 75 | name: ui 76 | {{- if .Values.persistence.enabled }} 77 | volumeMounts: 78 | - name: grafana-data 79 | mountPath: /var/lib/grafana 80 | volumes: 81 | - name: grafana-data 82 | persistentVolumeClaim: 83 | claimName: deis-monitor-grafana 84 | {{- end }} 85 | {{- end }} 86 | -------------------------------------------------------------------------------- /charts/monitor/charts/grafana/templates/monitor-grafana-pvc.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.persistence.enabled }} 2 | kind: PersistentVolumeClaim 3 | apiVersion: v1 4 | metadata: 5 | name: deis-monitor-grafana 6 | labels: 7 | heritage: deis 8 | annotations: 9 | {{- if .Values.persistence.storageClass }} 10 | volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} 11 | {{- else }} 12 | volume.alpha.kubernetes.io/storage-class: default 13 | {{- end }} 14 | spec: 15 | accessModes: 16 | - {{ .Values.persistence.accessMode | quote }} 17 | resources: 18 | requests: 19 | storage: {{ .Values.persistence.size | quote }} 20 | {{- end }} 21 | -------------------------------------------------------------------------------- /charts/monitor/charts/grafana/templates/monitor-grafana-svc.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.global.grafana_location "on-cluster" }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: deis-monitor-grafana 6 | labels: 7 | heritage: deis 8 | app: deis-monitor-grafana 9 | router.deis.io/routable: "true" 10 | annotations: 11 | router.deis.io/domains: grafana 12 | router.deis.io/connectTimeout: "10" 13 | router.deis.io/tcpTimeout: "1200" 14 | spec: 15 | ports: 16 | - port: 80 17 | name: ui 18 | targetPort: ui 19 | selector: 20 | app: deis-monitor-grafana 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/monitor/charts/influxdb/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: influxdb 2 | home: https://github.com/deis/monitor/tree/master/influxdb 3 | version: 4 | description: Monitoring for Deis Workflow. 5 | maintainers: 6 | - name: Deis Team 7 | email: engineering@deis.com 8 | -------------------------------------------------------------------------------- /charts/monitor/charts/influxdb/templates/monitor-influxdb-api-svc.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.global.influxdb_location "on-cluster" }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: deis-monitor-influxapi 6 | labels: 7 | heritage: deis 8 | app: deis-monitor-influxapi 9 | router.deis.io/routable: "true" 10 | annotations: 11 | router.deis.io/domains: influxapi 12 | router.deis.io/connectTimeout: "10" 13 | router.deis.io/tcpTimeout: "1200" 14 | spec: 15 | ports: 16 | - port: 80 17 | name: transport 18 | targetPort: transport 19 | selector: 20 | app: deis-monitor-influxdb 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/monitor/charts/influxdb/templates/monitor-influxdb-creds-secret.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.global.influxdb_location "off-cluster" }} 2 | apiVersion: v1 3 | kind: Secret 4 | metadata: 5 | name: influxdb-creds 6 | labels: 7 | heritage: deis 8 | type: Opaque 9 | data: 10 | url: {{ .Values.url | b64enc }} 11 | database: {{ .Values.database | b64enc }} 12 | user: {{ .Values.user | b64enc }} 13 | password: {{ .Values.password | b64enc }} 14 | {{- end }} 15 | -------------------------------------------------------------------------------- /charts/monitor/charts/influxdb/templates/monitor-influxdb-deployment.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.global.influxdb_location "on-cluster" }} 2 | apiVersion: extensions/v1beta1 3 | kind: Deployment 4 | metadata: 5 | name: deis-monitor-influxdb 6 | labels: 7 | heritage: deis 8 | annotations: 9 | component.deis.io/version: {{ .Values.docker_tag }} 10 | spec: 11 | replicas: 1 12 | strategy: 13 | type: Recreate 14 | selector: 15 | matchLabels: 16 | app: deis-monitor-influxdb 17 | template: 18 | metadata: 19 | labels: 20 | app: deis-monitor-influxdb 21 | spec: 22 | containers: 23 | - name: deis-monitor-influxdb 24 | image: quay.io/{{.Values.org}}/influxdb:{{.Values.docker_tag}} 25 | imagePullPolicy: {{.Values.pull_policy}} 26 | {{- if or (.Values.limits_cpu) (.Values.limits_memory)}} 27 | resources: 28 | limits: 29 | {{- if (.Values.limits_cpu) }} 30 | cpu: {{.Values.limits_cpu}} 31 | {{- end}} 32 | {{- if (.Values.limits_memory) }} 33 | memory: {{.Values.limits_memory}} 34 | {{- end}} 35 | {{- end}} 36 | ports: 37 | - containerPort: 8083 38 | name: admin 39 | - containerPort: 8086 40 | name: transport 41 | protocol: TCP 42 | - containerPort: 8084 43 | name: ssltransport 44 | protocol: TCP 45 | livenessProbe: 46 | httpGet: 47 | path: /ping 48 | port: 8086 49 | initialDelaySeconds: 1 50 | timeoutSeconds: 1 51 | readinessProbe: 52 | httpGet: 53 | path: /ping 54 | port: 8086 55 | initialDelaySeconds: 1 56 | timeoutSeconds: 1 57 | {{- if .Values.persistence.enabled }} 58 | volumeMounts: 59 | - name: influxdb-data 60 | mountPath: /data 61 | # Allow user influxdb to write to /data 62 | securityContext: 63 | fsGroup: 1001 64 | volumes: 65 | - name: influxdb-data 66 | persistentVolumeClaim: 67 | claimName: deis-monitor-influxdb 68 | {{- end }} 69 | {{- end }} 70 | -------------------------------------------------------------------------------- /charts/monitor/charts/influxdb/templates/monitor-influxdb-pvc.yaml: -------------------------------------------------------------------------------- 1 | {{- if .Values.persistence.enabled }} 2 | kind: PersistentVolumeClaim 3 | apiVersion: v1 4 | metadata: 5 | name: deis-monitor-influxdb 6 | labels: 7 | heritage: deis 8 | annotations: 9 | {{- if .Values.persistence.storageClass }} 10 | volume.beta.kubernetes.io/storage-class: {{ .Values.persistence.storageClass | quote }} 11 | {{- else }} 12 | volume.alpha.kubernetes.io/storage-class: default 13 | {{- end }} 14 | spec: 15 | accessModes: 16 | - {{ .Values.persistence.accessMode | quote }} 17 | resources: 18 | requests: 19 | storage: {{ .Values.persistence.size | quote }} 20 | {{- end }} 21 | -------------------------------------------------------------------------------- /charts/monitor/charts/influxdb/templates/monitor-influxdb-ui-svc.yaml: -------------------------------------------------------------------------------- 1 | {{- if eq .Values.global.influxdb_location "on-cluster" }} 2 | apiVersion: v1 3 | kind: Service 4 | metadata: 5 | name: deis-monitor-influxui 6 | labels: 7 | heritage: deis 8 | app: deis-monitor-influxui 9 | router.deis.io/routable: "true" 10 | annotations: 11 | router.deis.io/domains: influx 12 | router.deis.io/connectTimeout: "10" 13 | router.deis.io/tcpTimeout: "1200" 14 | spec: 15 | ports: 16 | - port: 80 17 | name: admin 18 | targetPort: admin 19 | selector: 20 | app: deis-monitor-influxdb 21 | {{- end }} 22 | -------------------------------------------------------------------------------- /charts/monitor/charts/telegraf/Chart.yaml: -------------------------------------------------------------------------------- 1 | name: telegraf 2 | home: https://github.com/deis/monitor/tree/master/telegraf 3 | version: 4 | description: Monitoring for Deis Workflow. 5 | maintainers: 6 | - name: Deis Team 7 | email: engineering@deis.com 8 | -------------------------------------------------------------------------------- /charts/monitor/charts/telegraf/templates/monitor-telegraf-daemon.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: extensions/v1beta1 2 | kind: DaemonSet 3 | metadata: 4 | name: deis-monitor-telegraf 5 | labels: 6 | heritage: deis 7 | annotations: 8 | component.deis.io/version: {{ .Values.docker_tag }} 9 | spec: 10 | {{- if ge .Capabilities.KubeVersion.Minor "6" }} 11 | updateStrategy: 12 | type: RollingUpdate 13 | {{- end }} 14 | template: 15 | metadata: 16 | labels: 17 | app: deis-monitor-telegraf 18 | spec: 19 | serviceAccount: deis-monitor-telegraf 20 | containers: 21 | - name: deis-monitor-telegraf 22 | image: quay.io/{{.Values.org}}/telegraf:{{.Values.docker_tag}} 23 | imagePullPolicy: {{.Values.pull_policy}} 24 | {{- if or (.Values.limits_cpu) (.Values.limits_memory)}} 25 | resources: 26 | limits: 27 | {{- if (.Values.limits_cpu) }} 28 | cpu: {{.Values.limits_cpu}} 29 | {{- end}} 30 | {{- if (.Values.limits_memory) }} 31 | memory: {{.Values.limits_memory}} 32 | {{- end}} 33 | {{- end}} 34 | env: 35 | - name: POD_NAMESPACE 36 | valueFrom: 37 | fieldRef: 38 | fieldPath: metadata.namespace 39 | {{- if eq .Values.global.influxdb_location "off-cluster" }} 40 | - name: "INFLUXDB_URLS" 41 | valueFrom: 42 | secretKeyRef: 43 | name: influxdb-creds 44 | key: url 45 | - name: "INFLUXDB_DATABASE" 46 | valueFrom: 47 | secretKeyRef: 48 | name: influxdb-creds 49 | key: database 50 | - name: "INFLUXDB_USERNAME" 51 | valueFrom: 52 | secretKeyRef: 53 | name: influxdb-creds 54 | key: user 55 | - name: "INFLUXDB_PASSWORD" 56 | valueFrom: 57 | secretKeyRef: 58 | name: influxdb-creds 59 | key: password 60 | {{- else }} 61 | - name: "INFLUXDB_URLS" 62 | value: "\"http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)\"" 63 | - name: "INFLUXDB_INPUT_URLS" 64 | value: "\"http://$(DEIS_MONITOR_INFLUXAPI_SERVICE_HOST):$(DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT)/debug/vars\"" 65 | - name: "ENABLE_INFLUXDB_INPUT" 66 | value: "true" 67 | {{- end }} 68 | - name: "HOST_PROC" 69 | value: "/rootfs/proc" 70 | - name: "HOST_SYS" 71 | value: "/rootfs/sys" 72 | - name: "AGENT_QUIET" 73 | value: "true" 74 | - name: "AGENT_BUFFER_LIMIT" 75 | value: "100000" 76 | - name: "ENABLE_KUBERNETES" 77 | value: "true" 78 | - name: "NSQ_CONSUMER_SERVER" 79 | value: "$(DEIS_NSQD_SERVICE_HOST):$(DEIS_NSQD_SERVICE_PORT_TRANSPORT)" 80 | - name: "NSQ_CONSUMER_TOPIC" 81 | value: "metrics" 82 | - name: "NSQ_ENDPOINTS" 83 | value: "\"http://$(DEIS_NSQD_SERVICE_HOST):$(DEIS_NSQD_SERVICE_PORT_HTTP)\"" 84 | {{- if ne .Values.global.logger_redis_location "off-cluster" }} 85 | - name: DEIS_LOGGER_REDIS_PASSWORD 86 | valueFrom: 87 | secretKeyRef: 88 | name: logger-redis-creds 89 | key: password 90 | - name: "REDIS_SERVERS" 91 | value: "\"tcp://:$(DEIS_LOGGER_REDIS_PASSWORD)@$(DEIS_LOGGER_REDIS_SERVICE_HOST):$(DEIS_LOGGER_REDIS_SERVICE_PORT)\"" 92 | {{- end }} 93 | volumeMounts: 94 | - mountPath: /var/run/docker.sock 95 | name: docker-socket 96 | - name: sysro 97 | mountPath: /rootfs/sys 98 | readOnly: true 99 | - name: procro 100 | mountPath: /rootfs/proc 101 | readOnly: true 102 | - name: varrunutmpro 103 | mountPath: /var/run/utmp 104 | readOnly: true 105 | - name: logger-redis-creds 106 | mountPath: /var/run/secrets/deis/redis/creds 107 | volumes: 108 | - name: docker-socket 109 | hostPath: 110 | path: /var/run/docker.sock 111 | - name: sysro 112 | hostPath: 113 | path: /sys 114 | - name: procro 115 | hostPath: 116 | path: /proc 117 | - name: varrunutmpro 118 | hostPath: 119 | path: /var/run/utmp 120 | - name: logger-redis-creds 121 | secret: 122 | secretName: logger-redis-creds 123 | -------------------------------------------------------------------------------- /charts/monitor/charts/telegraf/templates/monitor-telegraf-role.yaml: -------------------------------------------------------------------------------- 1 | {{- if (.Values.global.use_rbac) -}} 2 | {{- if (.Capabilities.APIVersions.Has (include "rbacAPIVersion" .)) -}} 3 | kind: Role 4 | apiVersion: {{ template "rbacAPIVersion" . }} 5 | metadata: 6 | name: deis-monitor-telegraf 7 | labels: 8 | app: deis-monitor-telegraf 9 | heritage: deis 10 | rules: 11 | - apiGroups: [""] 12 | resources: ["pods"] 13 | verbs: ["get"] 14 | {{- end -}} 15 | {{- end -}} 16 | -------------------------------------------------------------------------------- /charts/monitor/charts/telegraf/templates/monitor-telegraf-rolebinding.yaml: -------------------------------------------------------------------------------- 1 | {{- if (.Values.global.use_rbac) -}} 2 | {{- if (.Capabilities.APIVersions.Has (include "rbacAPIVersion" .)) -}} 3 | kind: RoleBinding 4 | apiVersion: {{ template "rbacAPIVersion" . }} 5 | metadata: 6 | name: deis-monitor-telegraf 7 | labels: 8 | app: deis-monitor-telegraf 9 | heritage: deis 10 | roleRef: 11 | apiGroup: rbac.authorization.k8s.io 12 | kind: Role 13 | name: deis-monitor-telegraf 14 | subjects: 15 | - kind: ServiceAccount 16 | name: deis-monitor-telegraf 17 | {{- end -}} 18 | {{- end -}} 19 | -------------------------------------------------------------------------------- /charts/monitor/charts/telegraf/templates/monitor-telegraf-service-account.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: ServiceAccount 3 | metadata: 4 | name: deis-monitor-telegraf 5 | labels: 6 | heritage: deis 7 | -------------------------------------------------------------------------------- /charts/monitor/templates/_helpers.tmpl: -------------------------------------------------------------------------------- 1 | {{/* 2 | Set apiVersion based on Kubernetes version 3 | */}} 4 | {{- define "rbacAPIVersion" -}} 5 | {{- if ge .Capabilities.KubeVersion.Minor "6" -}} 6 | rbac.authorization.k8s.io/v1beta1 7 | {{- else -}} 8 | rbac.authorization.k8s.io/v1alpha1 9 | {{- end -}} 10 | {{- end -}} 11 | -------------------------------------------------------------------------------- /charts/monitor/values.yaml: -------------------------------------------------------------------------------- 1 | grafana: 2 | org: "deisci" 3 | pull_policy: "Always" 4 | docker_tag: canary 5 | allow_sign_up: "true" 6 | # limits_cpu: "100m" 7 | # limits_memory: "50Mi" 8 | persistence: 9 | enabled: false 10 | accessMode: ReadWriteOnce 11 | size: 5Gi 12 | influxdb: 13 | org: "deisci" 14 | pull_policy: "Always" 15 | docker_tag: canary 16 | # limits_cpu: "100m" 17 | # limits_memory: "50Mi" 18 | url: "my.influx.url" 19 | database: "kubernetes" 20 | user: "user" 21 | password: "password" 22 | persistence: 23 | enabled: false 24 | accessMode: ReadWriteOnce 25 | size: 20Gi 26 | telegraf: 27 | org: "deisci" 28 | pull_policy: "Always" 29 | docker_tag: canary 30 | # limits_cpu: "100m" 31 | # limits_memory: "50Mi" 32 | 33 | global: 34 | # Set the location of Workflow's influxdb cluster 35 | # 36 | # Valid values are: 37 | # - on-cluster: Run Influxdb within the Kubernetes cluster 38 | # - off-cluster: Influxdb is running outside of the cluster and credentials and connection information will be provided. 39 | influxdb_location: "on-cluster" 40 | # Set the location of Workflow's grafana instance 41 | # 42 | # Valid values are: 43 | # - on-cluster: Run Grafana within the Kubernetes cluster 44 | # - off-cluster: Grafana is running outside of the cluster 45 | grafana_location: "on-cluster" 46 | # Set the location of Workflow's logger-specific Redis instance 47 | # 48 | # Valid values are: 49 | # - on-cluster: Run Redis within the Kubernetes cluster 50 | # - off-cluster: Run Redis outside the Kubernetes cluster (configure in loggerRedis section) 51 | logger_redis_location: "on-cluster" 52 | # Role-Based Access Control for Kubernetes >= 1.5 53 | use_rbac: false 54 | -------------------------------------------------------------------------------- /default.mk: -------------------------------------------------------------------------------- 1 | SHELL := /bin/bash 2 | 3 | # all monitor components share/use the following targets/exports 4 | DOCKER_HOST = $(shell echo $$DOCKER_HOST) 5 | BUILD_TAG ?= git-$(shell git rev-parse --short HEAD) 6 | DEIS_REGISTRY ?= ${DEV_REGISTRY} 7 | IMAGE_PREFIX ?= deis 8 | 9 | include ../includes.mk 10 | include ../versioning.mk 11 | include ../deploy.mk 12 | 13 | TEST_ENV_PREFIX := docker run --rm -v ${CURDIR}:/bash -w /bash quay.io/deis/shell-dev 14 | 15 | build: docker-build 16 | push: docker-push 17 | deploy: check-kubectl docker-build docker-push install 18 | 19 | docker-build: 20 | docker build ${DOCKER_BUILD_FLAGS} -t ${IMAGE} rootfs 21 | docker tag ${IMAGE} ${MUTABLE_IMAGE} 22 | 23 | clean: check-docker 24 | docker rmi $(IMAGE) 25 | 26 | test: test-style 27 | 28 | test-style: 29 | ${TEST_ENV_PREFIX} shellcheck $(SHELL_SCRIPTS) 30 | 31 | .PHONY: build push docker-build clean upgrade deploy test test-style 32 | 33 | build-all: 34 | docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}${IMAGE_PREFIX}/grafana:${VERSION} ../grafana/rootfs 35 | docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}${IMAGE_PREFIX}/influxdb:${VERSION} ../influxdb/rootfs 36 | docker build ${DOCKER_BUILD_FLAGS} -t ${DEIS_REGISTRY}${IMAGE_PREFIX}/telegraf:${VERSION} ../telegraf/rootfs 37 | 38 | push-all: 39 | docker push ${DEIS_REGISTRY}${IMAGE_PREFIX}/grafana:${VERSION} 40 | docker push ${DEIS_REGISTRY}${IMAGE_PREFIX}/influxdb:${VERSION} 41 | docker push ${DEIS_REGISTRY}${IMAGE_PREFIX}/telegraf:${VERSION} -------------------------------------------------------------------------------- /deploy.mk: -------------------------------------------------------------------------------- 1 | install: 2 | helm upgrade monitor ../charts/monitor --install --namespace deis --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} 3 | 4 | 5 | upgrade: 6 | helm upgrade monitor ../charts/monitor --namespace deis --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} 7 | 8 | uninstall: 9 | helm delete monitor --purge -------------------------------------------------------------------------------- /grafana/Makefile: -------------------------------------------------------------------------------- 1 | SHORT_NAME ?= grafana 2 | SHELL_SCRIPTS = rootfs/usr/share/grafana/start-grafana 3 | 4 | include ../default.mk 5 | -------------------------------------------------------------------------------- /grafana/README.md: -------------------------------------------------------------------------------- 1 | # Grafana 2 | [![Docker Repository on Quay](https://quay.io/repository/deisci/grafana/status "Docker Repository on Quay")](https://quay.io/repository/deisci/grafana) 3 | 4 | ## Description 5 | [Grafana](https://grafana.org/) is a graphing application built for time series data. It natively supports influxdb and provides great dashboarding support. This project is focused on provided a grafana installation that can be run within a kubernetes installation. The grafana application is agnostic to [Workflow](https://github.com/deis/workflow) and can be installed as a stand alone system with the monitoring suite. 6 | 7 | ## Configuration 8 | | ENV Var | Default Value | Description | 9 | |---------|---------------|-------------| 10 | | [APP_MODE](#app_mode) | development | Has two possible values (production or development). | 11 | | [DATA_PATH](#data_path) | /var/lib/grafana | Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used). | 12 | | [LOG_PATH](#log_path) | /var/log | Directory where grafana can store logs. | 13 | | [SERVER_PROTOCOL](#server_protocol) | http | Protocol (http or https). | 14 | | [BIND_ADDRESS](#bind_address) | `""` | The ip address to bind to, empty will bind to all interfaces | 15 | | [BIND_PORT](#bind_port) | 3000 | The http port to use | 16 | | [DOMAIN](#domain) | localhost | The public facing domain name used to access grafana from a browser | 17 | | [ENFORCE_DOMAIN](#enforce_domain) | false | Redirect to correct domain if host header does not match domain. Prevents DNS rebinding attacks | 18 | | [ROOT_URL](#root_url) | `"%(protocol)s://%(domain)s:%(http_port)s/"` | The full public facing url | 19 | | [ROUTER_LOGGING](#router_logging) | false | Log web requests | 20 | | [STATIC_ROOT_PATH](#static_root_path) | public | the path relative working path | 21 | | [ENABLE_GZIP](#enable_gzip) | false | enable gzip | 22 | | [CERT_FILE](#cert_file) | no default | https certs | 23 | | [CERT_KEY](#cert_key) | no default | https certs key | 24 | | [DATABASE_TYPE](#database_type) | no default | Potential values: mysql, postgres, sqlite3 | 25 | | [DATABASE_HOST](#database_host) | no default | Address to external database host | 26 | | [DATABASE_NAME](#database_name) | no default | Name of database to store information | 27 | | [DATABASE_USER](#database_user) | no default | User to log into the database with | 28 | | [DATABASE_PASSWORD](#database_password) | no default | Database password | 29 | | [DATABASE_SSL_MODE](#database_ssl_mode) | no default | For "postgres" only, either "disable", "require" or "verify-full" | 30 | | [DATABASE_PATH](#database_path) | no default | For "sqlite3" only, path relative to data_path setting | 31 | | [SESSION_PROVIDER](#session_provider) | file | Either "memory", "file", "redis", "mysql", "postgres", default is "file" | 32 | | [SESSION_PROVIDER_CONFIG](#session_provider_config) | no default | Provider config options
`memory: not have any config yet`
`file: session dir path, is relative to grafana data_path`
`redis: addr=127.0.0.1:6379,pool_size=100,db=grafana`
`mysql: user:password@tcp(127.0.0.1:3306)/database_name`
`postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable` | 33 | | [SESSION_COOKIE_NAME](#session_cookie_name) | grafana_sess | Session cookie name | 34 | | [SESSION_LIFE_TIME](#session_life_time) | 86400 | Session life time, default is 86400 | 35 | | [GRAFANA_REPORTING](#grafana_reporting) | false | Server reporting, sends usage counters to stats.grafana.org every 24 hours. No ip addresses are being tracked, only simple counters to track running instances, dashboard and error counts. It is very helpful to us. Change this option to false to disable reporting. | 36 | | [GOOGLE_ANALYTICS_UA_ID](#google_analytics_ua_id) | no default | Google Analytics universal tracking code, only enabled if you specify an id here | 37 | | [DEFAULT_USER](#default_user) | admin | default admin user, created on startup | 38 | | [DEFAULT_USER_PASSWORD](#default_user_password) | admin | default admin password, can be changed before first start of grafana, or in profile settings | 39 | | [SECRET_KEY](#secret_key) | SW2YcwTIb9zpOOhoPsMm | used for signing | 40 | | [LOGIN_REMEMBER_DAYS](#login_remember_day) | 7 | Auto-login remember days | 41 | | [COOKIE_USERNAME](#cookie_username) | grafana_user | | 42 | | [COOKIE_REMEMBER_NAME](#cookie_remember_name) | grafana_remember | | 43 | | [DISABLE_GRAVATAR](#disable_gravatar) | false | disable gravatar profile images | 44 | | [DATASOURCE_PROXY_WHITELIST](#datasource_proxy_whitelist) | no default | data source proxy whitelist (ip_or_domain:port seperated by spaces) | 45 | | [ALLOW_SIGN_UP](#allow_sign_up) | true | allow user signup / registration | 46 | | [ALLOW_ORG_CREATE](#allow_org_create) | true | Allow non admin users to create organizations | 47 | | [AUTO_ASSIGN_ORG](#auto_assign_org) | true | Set to true to automatically assign new users to the default organization (id 1) | 48 | | [AUTO_ASSIGN_ORG_ROLE](#auto_assign_org_role) | Viewer | Default role new users will be automatically assigned (if disabled above is set to true) | 49 | | [LOGIN_HINT](#login_hint) | email or username | Background text for the user field on the login page | 50 | | [ANON_ACCESS](#anon_access) | false | enable anonymous access | 51 | | [ORG_NAME](#org_name) | Main Org. | specify organization name that should be used for unauthenticated users | 52 | | [UNAUTHED_USER_ORG_ROLE](#unauthed_user_org_role) | Viewer | specify role for unauthenticated users | 53 | | [GITHUB_AUTH](#github_auth) | no default | Enable Github Auth (true/false) | 54 | | [GITHUB_AUTH_ALLOW_SIGN_UP](#github_auth_allow_sign_up) | false | Allow signup with github auth | 55 | | [GITHUB_AUTH_CLIENT_ID](#github_auth_client_id) | no default | Github Client Auth | 56 | | [GITHUB_AUTH_CLIENT_SECRET](#github_auth_client_secret) | no default | Github Auth client secret | 57 | | [GITHUB_AUTH_SCOPES](#github_auth_scopes) | user:email,read:org | Github Auth Scopes | 58 | | [GITHUB_AUTH_URL](#github_auth_url) | https://github.com/login/oauth/authorize | Github authorization URL | 59 | | [GITHUB_AUTH_TOKEN_URL](#github_auth_token_url) | https://github.com/login/oauth/access_token | Github Auth Token URL | 60 | | [GITHUB_AUTH_API_URL](#github_auth_api_url) | https://api.github.com/user | Github Auth API URL | 61 | | [GITHUB_AUTH_TEAM_IDS](#github_auth_team_ids) | "" | Team IDs to use for Github Auth | 62 | | [GITHUB_AUTH_ALLOWED_ORGS](#github_auth_allowed_orgs) | "" | Allowed ORGs for Github Auth | 63 | | [GOOGLE_AUTH](#google_auth) | no default | Enable Google Auth for login (true/false) | 64 | | [GOOGLE_AUTH_ALLOW_SIGN_UP](#google_auth_allow_sign_up) | false | Allow people to sign up using Google Auth | 65 | | [GOOGLE_AUTH_CLIENT_ID](#google_auth_client_id) | no default | Google Auth Client ID | 66 | | [GOOGLE_AUTH_CLIENT_SECRET](#google_auth_client_secret) | no default | Google Auth Client Secret | 67 | | [GOOGLE_AUTH_SCOPES](#google_auth_scopes) | https://www.googleapis.com/auth/userinfo.profile
https://www.googleapis.com/auth/userinfo.email | Google Auth Scopes | 68 | | [GOOGLE_AUTH_URL](#google_auth_url) | https://accounts.google.com/o/oauth2/auth | Google Auth URL | 69 | | [GOOGLE_AUTH_TOKEN_URL](#google_auth_token_url) | https://accounts.google.com/o/oauth2/token | Google Auth Token URL | 70 | | [GOOGLE_AUTH_API_URL](#google_auth_api_url) | https://www.googleapis.com/oauth2/v1/userinfo | Google Auth API URL | 71 | | [GOOGLE_AUTH_ALLOWED_DOMAINS](#google_auth_allowed_domains) | "" | Google Auth allowed domains | 72 | | [AUTH_PROXY](#auth_proxy) | no default | If enabled use an authorization proxy | 73 | | [AUTH_HEADER_NAME](#auth_header_name) | X-WEBAUTH-USER | Header to use for authorization | 74 | | [AUTH_HEADER_PROPERTY](#auth_header_property) | username | Property to use in Authorization Header | 75 | | [AUTH_AUTO_SIGN_UP](#auth_auto_sign_up) | true | Auto Signup user with data passed from Authorization Header| 76 | | [BASIC_AUTH](#basic_auth) | true | Enable Basic Auth | 77 | | [LDAP_AUTH](#ldap_auth) | no default | Enable LDAP Auth | 78 | | [LDAP_AUTH_CONFIG_FILE](#ldap_auth_config_file) | /etc/grafana/ldap.toml | Config file to use for LDAP Auth | 79 | | [SMTP](#smtp) | no default | Enable SMTP/Emailing | 80 | | [SMTP_HOST](#smtp_host) | no default | SMTP Host | 81 | | [SMTP_USER](#smtp_user) | no default | User for SMTP | 82 | | [SMTP_PASSWORD](#smtp_password) | no default | Password for SMTP | 83 | | [SMTP_CERT_FILE](#smtp_cert_file) | no default | Cert file for SMTP HTTPS | 84 | | [SMTP_KEY_FILE](#smtp_key_file) | no default | Key file for SMTP HTTPS | 85 | | [SMTP_SKIP_VERIFY](#smtp_skip_verify) | false | Skip HTTPS verify | 86 | | [SMTP_FROM_ADDRESS](#smtp_from_address) | admin@grafana.localhost | From address to use when sending emails | 87 | | [WELCOME_EMAIL](#welcome_email) | false | Send welcome email on sign up | 88 | | [LOG_MODE](#log_mode) | console | Either "console", "file", default is "console" Use comma to separate multiple modes, e.g. "console, file" | 89 | | [BUFFER_LENGTH](#buffer_length) | 10000 | Buffer length of channel, keep it as it is if you don't know what it is. | 90 | | [LOG_LEVEL](#log_level) | Info | Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" | 91 | | [LOG_LEVEL_CONSOLE](#log_level_console) | Info | For "console" mode only | 92 | | [LOG_LEVEL_FILE](#log_level_file) | Info | For "file" mode only | 93 | | [LOG_ROTATE](#log_rotate) | true | This enables automated log rotate(switch of following options), default is true | 94 | | [LOG_MAX_LINES](#log_max_lines) | 1000000 | Max line number of single file | 95 | | [LOG_MAX_LINES_SHIFT](#log_max_lines_shift) | 28 | Max size shift of single file, default is 28 means 1 << 28, 256MB | 96 | | [LOG_DAILY_ROTATE](#log_daily_rotate) | true | Segment log daily, default is true | 97 | | [LOG_MAX_DAYS](#log_max_days) | 7 | Expired days of log file(delete after max days) | 98 | | [AMQP_PUBLISHER](#amqp_publisher) | no default | Publish Events to AMQP | 99 | | [AMQP_PUBLISHER_HOST](#amqp_publisher_host) | no default | RabbitMQ URL | 100 | | [AMQP_PUBLISHER_EXCHANGE](#amqp_publisher_exchange) | no default | AMQP Publisher Exchange | 101 | | [DASHBOARD_JSON](#dashboard_json) | true | Poll a location for json files that contain dashboards | 102 | | [DASHBOARD_JSON_PATH](#dashboard_json_path) | /usr/share/grafana/dashboards | Location to scan for json dashboards | 103 | | [PLUGINS_PATH](#plugins_path) | /var/lib/grafana/plugins | Path to where grafana can install plugins | 104 | | [GF_INSTALL_PLUGINS](#gf_install_plugins) | no default | Pass the plugins as a comma seperated list | 105 | 106 | ## Development 107 | The provided `Makefile` has various targets to help support building and publishing new images into a kubernetes cluster. 108 | 109 | ### Environment variables 110 | There are a few key environment variables you should be aware of when interacting with the `make` targets. 111 | 112 | * `BUILD_TAG` - The tag provided to the docker image when it is built (defaults to the git-sha) 113 | * `SHORT_NAME` - The name of the image (defaults to `grafana`) 114 | * `DEIS_REGISTRY` - This is the registry you are using (default `dockerhub`) 115 | * `IMAGE_PREFIX` - This is the account for the registry you are using (default `deis`) 116 | 117 | ### Make targets 118 | 119 | * `make build` - Build docker image 120 | * `make push` - Push docker image to a registry 121 | * `make upgrade` - Replaces the running grafana instance with a new one 122 | 123 | The typical workflow will look something like this - `DEIS_REGISTRY=quay.io/ IMAGE_PREFIX=foouser make build push upgrade` 124 | -------------------------------------------------------------------------------- /grafana/rootfs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/deis/base:v0.3.6 2 | 3 | COPY . / 4 | 5 | RUN apt-get update && \ 6 | apt-get install -y libfontconfig && \ 7 | curl -fsSL -o /usr/share/grafana/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 && \ 8 | chmod +x /usr/share/grafana/envtpl && \ 9 | curl -fsSo /tmp/grafana.deb https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana_4.3.2_amd64.deb && \ 10 | dpkg -i /tmp/grafana.deb && \ 11 | rm /tmp/grafana.deb && \ 12 | rm /etc/grafana/grafana.ini && \ 13 | chmod +x /usr/share/grafana/start-grafana && \ 14 | chmod 644 /usr/share/grafana/grafana.ini.tpl && \ 15 | # cleanup 16 | apt-get autoremove -y && \ 17 | apt-get clean -y && \ 18 | # package up license files if any by appending to existing tar 19 | COPYRIGHT_TAR='/usr/share/copyrights.tar'; \ 20 | gunzip -f $COPYRIGHT_TAR.gz; tar -rf $COPYRIGHT_TAR /usr/share/doc/*/copyright; gzip $COPYRIGHT_TAR && \ 21 | rm -rf \ 22 | /usr/share/doc \ 23 | /usr/share/man \ 24 | /usr/share/info \ 25 | /usr/share/locale \ 26 | /var/lib/apt/lists/* \ 27 | /var/log/* \ 28 | /var/cache/debconf/* \ 29 | /etc/systemd \ 30 | /lib/lsb \ 31 | /lib/udev \ 32 | /usr/lib/x86_64-linux-gnu/gconv/IBM* \ 33 | /usr/lib/x86_64-linux-gnu/gconv/EBC* && \ 34 | bash -c "mkdir -p /usr/share/man/man{1..8}" 35 | 36 | WORKDIR /usr/share/grafana 37 | CMD ["./start-grafana"] 38 | EXPOSE 3000 39 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/api/dashboards/deis_router.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": { 3 | "id": null, 4 | "title": "Deis Router", 5 | "tags": [ 6 | "deis" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": false, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "250px", 18 | "panels": [ 19 | { 20 | "cacheTimeout": null, 21 | "colorBackground": false, 22 | "colorValue": false, 23 | "colors": [ 24 | "rgba(245, 54, 54, 0.9)", 25 | "rgba(237, 129, 40, 0.89)", 26 | "rgba(50, 172, 45, 0.97)" 27 | ], 28 | "datasource": null, 29 | "editable": true, 30 | "error": false, 31 | "format": "bytes", 32 | "gauge": { 33 | "maxValue": 100, 34 | "minValue": 0, 35 | "show": false, 36 | "thresholdLabels": false, 37 | "thresholdMarkers": true 38 | }, 39 | "id": 10, 40 | "interval": null, 41 | "isNew": true, 42 | "links": [], 43 | "mappingType": 1, 44 | "mappingTypes": [ 45 | { 46 | "name": "value to text", 47 | "value": 1 48 | }, 49 | { 50 | "name": "range to text", 51 | "value": 2 52 | } 53 | ], 54 | "maxDataPoints": 100, 55 | "nullPointMode": "connected", 56 | "nullText": null, 57 | "postfix": "", 58 | "postfixFontSize": "50%", 59 | "prefix": "", 60 | "prefixFontSize": "50%", 61 | "rangeMaps": [ 62 | { 63 | "from": "null", 64 | "text": "N/A", 65 | "to": "null" 66 | } 67 | ], 68 | "span": 6, 69 | "sparkline": { 70 | "fillColor": "rgba(31, 118, 189, 0.18)", 71 | "full": false, 72 | "lineColor": "rgb(31, 120, 193)", 73 | "show": false 74 | }, 75 | "targets": [ 76 | { 77 | "dsType": "influxdb", 78 | "groupBy": [ 79 | { 80 | "params": [ 81 | "$interval" 82 | ], 83 | "type": "time" 84 | }, 85 | { 86 | "params": [ 87 | "null" 88 | ], 89 | "type": "fill" 90 | } 91 | ], 92 | "measurement": "kubernetes_pod_container", 93 | "policy": "default", 94 | "refId": "A", 95 | "resultFormat": "time_series", 96 | "select": [ 97 | [ 98 | { 99 | "params": [ 100 | "memory_usage_bytes" 101 | ], 102 | "type": "field" 103 | }, 104 | { 105 | "params": [], 106 | "type": "last" 107 | } 108 | ] 109 | ], 110 | "tags": [ 111 | { 112 | "key": "container_name", 113 | "operator": "=", 114 | "value": "deis-router" 115 | } 116 | ] 117 | } 118 | ], 119 | "thresholds": "", 120 | "title": "Memory", 121 | "type": "singlestat", 122 | "valueFontSize": "200%", 123 | "valueMaps": [ 124 | { 125 | "op": "=", 126 | "text": "N/A", 127 | "value": "null" 128 | } 129 | ], 130 | "valueName": "current" 131 | }, 132 | { 133 | "cacheTimeout": null, 134 | "colorBackground": false, 135 | "colorValue": false, 136 | "colors": [ 137 | "rgba(245, 54, 54, 0.9)", 138 | "rgba(237, 129, 40, 0.89)", 139 | "rgba(50, 172, 45, 0.97)" 140 | ], 141 | "datasource": null, 142 | "editable": true, 143 | "error": false, 144 | "format": "none", 145 | "gauge": { 146 | "maxValue": 100, 147 | "minValue": 0, 148 | "show": false, 149 | "thresholdLabels": false, 150 | "thresholdMarkers": true 151 | }, 152 | "id": 11, 153 | "interval": null, 154 | "isNew": true, 155 | "links": [], 156 | "mappingType": 1, 157 | "mappingTypes": [ 158 | { 159 | "name": "value to text", 160 | "value": 1 161 | }, 162 | { 163 | "name": "range to text", 164 | "value": 2 165 | } 166 | ], 167 | "maxDataPoints": 100, 168 | "nullPointMode": "connected", 169 | "nullText": null, 170 | "postfix": "", 171 | "postfixFontSize": "50%", 172 | "prefix": "", 173 | "prefixFontSize": "50%", 174 | "rangeMaps": [ 175 | { 176 | "from": "null", 177 | "text": "N/A", 178 | "to": "null" 179 | } 180 | ], 181 | "span": 6, 182 | "sparkline": { 183 | "fillColor": "rgba(31, 118, 189, 0.18)", 184 | "full": false, 185 | "lineColor": "rgb(31, 120, 193)", 186 | "show": true 187 | }, 188 | "targets": [ 189 | { 190 | "dsType": "influxdb", 191 | "groupBy": [ 192 | { 193 | "params": [ 194 | "$interval" 195 | ], 196 | "type": "time" 197 | }, 198 | { 199 | "params": [ 200 | "null" 201 | ], 202 | "type": "fill" 203 | } 204 | ], 205 | "measurement": "kubernetes_pod_container", 206 | "policy": "default", 207 | "refId": "A", 208 | "resultFormat": "time_series", 209 | "select": [ 210 | [ 211 | { 212 | "params": [ 213 | "cpu_usage_nanocores" 214 | ], 215 | "type": "field" 216 | }, 217 | { 218 | "params": [], 219 | "type": "last" 220 | }, 221 | { 222 | "params": [ 223 | " /1000000" 224 | ], 225 | "type": "math" 226 | } 227 | ] 228 | ], 229 | "tags": [ 230 | { 231 | "key": "container_name", 232 | "operator": "=", 233 | "value": "deis-router" 234 | } 235 | ] 236 | } 237 | ], 238 | "thresholds": "", 239 | "title": "CPU Usage (Millicores)", 240 | "type": "singlestat", 241 | "valueFontSize": "200%", 242 | "valueMaps": [ 243 | { 244 | "op": "=", 245 | "text": "N/A", 246 | "value": "null" 247 | } 248 | ], 249 | "valueName": "avg" 250 | } 251 | ], 252 | "title": "New row" 253 | }, 254 | { 255 | "collapse": false, 256 | "editable": true, 257 | "height": "250px", 258 | "panels": [ 259 | { 260 | "aliasColors": {}, 261 | "bars": false, 262 | "datasource": null, 263 | "editable": true, 264 | "error": false, 265 | "fill": 1, 266 | "grid": { 267 | "threshold1": null, 268 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 269 | "threshold2": null, 270 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 271 | }, 272 | "id": 1, 273 | "interval": "1s", 274 | "isNew": true, 275 | "legend": { 276 | "avg": false, 277 | "current": false, 278 | "max": false, 279 | "min": false, 280 | "show": false, 281 | "total": false, 282 | "values": false 283 | }, 284 | "lines": true, 285 | "linewidth": 2, 286 | "links": [], 287 | "nullPointMode": "connected", 288 | "percentage": false, 289 | "pointradius": 5, 290 | "points": false, 291 | "renderer": "flot", 292 | "seriesOverrides": [], 293 | "span": 6, 294 | "stack": false, 295 | "steppedLine": false, 296 | "targets": [ 297 | { 298 | "alias": "$tag_app", 299 | "dsType": "influxdb", 300 | "groupBy": [ 301 | { 302 | "params": [ 303 | "$interval" 304 | ], 305 | "type": "time" 306 | }, 307 | { 308 | "params": [ 309 | "app" 310 | ], 311 | "type": "tag" 312 | }, 313 | { 314 | "params": [ 315 | "null" 316 | ], 317 | "type": "fill" 318 | } 319 | ], 320 | "measurement": "deis_router_response_time_ms", 321 | "policy": "default", 322 | "query": "SELECT last(\"value\") FROM \"deis_router_request_time\" WHERE $timeFilter GROUP BY time($interval), \"app\" fill(null)", 323 | "refId": "A", 324 | "resultFormat": "time_series", 325 | "select": [ 326 | [ 327 | { 328 | "params": [ 329 | "value" 330 | ], 331 | "type": "field" 332 | }, 333 | { 334 | "params": [], 335 | "type": "mean" 336 | } 337 | ] 338 | ], 339 | "tags": [] 340 | } 341 | ], 342 | "timeFrom": null, 343 | "timeShift": null, 344 | "title": "Upstream Response Time", 345 | "tooltip": { 346 | "msResolution": false, 347 | "shared": true, 348 | "sort": 0, 349 | "value_type": "cumulative" 350 | }, 351 | "type": "graph", 352 | "xaxis": { 353 | "show": true 354 | }, 355 | "yaxes": [ 356 | { 357 | "format": "s", 358 | "logBase": 1, 359 | "max": null, 360 | "min": null, 361 | "show": true 362 | }, 363 | { 364 | "format": "short", 365 | "logBase": 1, 366 | "max": null, 367 | "min": null, 368 | "show": true 369 | } 370 | ] 371 | }, 372 | { 373 | "aliasColors": {}, 374 | "bars": false, 375 | "datasource": null, 376 | "editable": true, 377 | "error": false, 378 | "fill": 1, 379 | "grid": { 380 | "threshold1": null, 381 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 382 | "threshold2": null, 383 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 384 | }, 385 | "id": 9, 386 | "interval": "1s", 387 | "isNew": true, 388 | "legend": { 389 | "avg": false, 390 | "current": false, 391 | "max": false, 392 | "min": false, 393 | "show": false, 394 | "total": false, 395 | "values": false 396 | }, 397 | "lines": true, 398 | "linewidth": 2, 399 | "links": [], 400 | "nullPointMode": "connected", 401 | "percentage": false, 402 | "pointradius": 5, 403 | "points": false, 404 | "renderer": "flot", 405 | "seriesOverrides": [], 406 | "span": 6, 407 | "stack": false, 408 | "steppedLine": false, 409 | "targets": [ 410 | { 411 | "alias": "99th", 412 | "dsType": "influxdb", 413 | "groupBy": [ 414 | { 415 | "params": [ 416 | "$interval" 417 | ], 418 | "type": "time" 419 | }, 420 | { 421 | "params": [ 422 | "null" 423 | ], 424 | "type": "fill" 425 | } 426 | ], 427 | "hide": false, 428 | "measurement": "deis_router_response_time_ms", 429 | "policy": "default", 430 | "refId": "B", 431 | "resultFormat": "time_series", 432 | "select": [ 433 | [ 434 | { 435 | "params": [ 436 | "value" 437 | ], 438 | "type": "field" 439 | }, 440 | { 441 | "params": [ 442 | "99" 443 | ], 444 | "type": "percentile" 445 | } 446 | ] 447 | ], 448 | "tags": [] 449 | }, 450 | { 451 | "alias": "min", 452 | "dsType": "influxdb", 453 | "groupBy": [ 454 | { 455 | "params": [ 456 | "$interval" 457 | ], 458 | "type": "time" 459 | }, 460 | { 461 | "params": [ 462 | "null" 463 | ], 464 | "type": "fill" 465 | } 466 | ], 467 | "hide": false, 468 | "measurement": "deis_router_response_time_ms", 469 | "policy": "default", 470 | "refId": "C", 471 | "resultFormat": "time_series", 472 | "select": [ 473 | [ 474 | { 475 | "params": [ 476 | "value" 477 | ], 478 | "type": "field" 479 | }, 480 | { 481 | "params": [], 482 | "type": "min" 483 | } 484 | ] 485 | ], 486 | "tags": [] 487 | }, 488 | { 489 | "alias": "max", 490 | "dsType": "influxdb", 491 | "groupBy": [ 492 | { 493 | "params": [ 494 | "$interval" 495 | ], 496 | "type": "time" 497 | }, 498 | { 499 | "params": [ 500 | "null" 501 | ], 502 | "type": "fill" 503 | } 504 | ], 505 | "hide": false, 506 | "measurement": "deis_router_response_time_ms", 507 | "policy": "default", 508 | "refId": "D", 509 | "resultFormat": "time_series", 510 | "select": [ 511 | [ 512 | { 513 | "params": [ 514 | "value" 515 | ], 516 | "type": "field" 517 | }, 518 | { 519 | "params": [], 520 | "type": "max" 521 | } 522 | ] 523 | ], 524 | "tags": [] 525 | }, 526 | { 527 | "alias": "mean", 528 | "dsType": "influxdb", 529 | "groupBy": [ 530 | { 531 | "params": [ 532 | "$interval" 533 | ], 534 | "type": "time" 535 | }, 536 | { 537 | "params": [ 538 | "null" 539 | ], 540 | "type": "fill" 541 | } 542 | ], 543 | "hide": false, 544 | "measurement": "deis_router_response_time_ms", 545 | "policy": "default", 546 | "refId": "A", 547 | "resultFormat": "time_series", 548 | "select": [ 549 | [ 550 | { 551 | "params": [ 552 | "value" 553 | ], 554 | "type": "field" 555 | }, 556 | { 557 | "params": [], 558 | "type": "mean" 559 | } 560 | ] 561 | ], 562 | "tags": [] 563 | } 564 | ], 565 | "timeFrom": null, 566 | "timeShift": null, 567 | "title": "Upstream Response Times (Aggregate)", 568 | "tooltip": { 569 | "msResolution": false, 570 | "shared": true, 571 | "sort": 0, 572 | "value_type": "cumulative" 573 | }, 574 | "type": "graph", 575 | "xaxis": { 576 | "show": true 577 | }, 578 | "yaxes": [ 579 | { 580 | "format": "s", 581 | "label": null, 582 | "logBase": 1, 583 | "max": null, 584 | "min": null, 585 | "show": true 586 | }, 587 | { 588 | "format": "short", 589 | "label": null, 590 | "logBase": 1, 591 | "max": null, 592 | "min": null, 593 | "show": true 594 | } 595 | ] 596 | } 597 | ], 598 | "title": "Row" 599 | }, 600 | { 601 | "collapse": false, 602 | "editable": true, 603 | "height": "250px", 604 | "panels": [ 605 | { 606 | "aliasColors": {}, 607 | "bars": false, 608 | "datasource": null, 609 | "editable": true, 610 | "error": false, 611 | "fill": 2, 612 | "grid": { 613 | "threshold1": null, 614 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 615 | "threshold2": null, 616 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 617 | }, 618 | "id": 2, 619 | "interval": "1s", 620 | "isNew": true, 621 | "legend": { 622 | "avg": false, 623 | "current": false, 624 | "max": false, 625 | "min": false, 626 | "show": false, 627 | "total": false, 628 | "values": false 629 | }, 630 | "lines": true, 631 | "linewidth": 2, 632 | "links": [], 633 | "nullPointMode": "connected", 634 | "percentage": false, 635 | "pointradius": 5, 636 | "points": false, 637 | "renderer": "flot", 638 | "seriesOverrides": [ 639 | { 640 | "alias": "/Aggregate/", 641 | "color": "#890F02", 642 | "linewidth": 3 643 | }, 644 | { 645 | "alias": "/.*/", 646 | "fill": 0 647 | } 648 | ], 649 | "span": 6, 650 | "stack": false, 651 | "steppedLine": false, 652 | "targets": [ 653 | { 654 | "alias": "$tag_app", 655 | "dsType": "influxdb", 656 | "groupBy": [ 657 | { 658 | "params": [ 659 | "$interval" 660 | ], 661 | "type": "time" 662 | }, 663 | { 664 | "params": [ 665 | "app" 666 | ], 667 | "type": "tag" 668 | }, 669 | { 670 | "params": [ 671 | "null" 672 | ], 673 | "type": "fill" 674 | } 675 | ], 676 | "hide": false, 677 | "measurement": "deis_router_response_time_ms", 678 | "policy": "default", 679 | "query": "SELECT last(\"value\") FROM \"deis_router_request_count\" WHERE $timeFilter GROUP BY time($interval) fill(null)", 680 | "refId": "A", 681 | "resultFormat": "time_series", 682 | "select": [ 683 | [ 684 | { 685 | "params": [ 686 | "value" 687 | ], 688 | "type": "field" 689 | }, 690 | { 691 | "params": [], 692 | "type": "count" 693 | }, 694 | { 695 | "params": [ 696 | 10 697 | ], 698 | "type": "moving_average" 699 | } 700 | ] 701 | ], 702 | "tags": [] 703 | }, 704 | { 705 | "alias": "Aggregate", 706 | "dsType": "influxdb", 707 | "groupBy": [ 708 | { 709 | "params": [ 710 | "$interval" 711 | ], 712 | "type": "time" 713 | }, 714 | { 715 | "params": [ 716 | "null" 717 | ], 718 | "type": "fill" 719 | } 720 | ], 721 | "hide": false, 722 | "measurement": "deis_router_response_time_ms", 723 | "policy": "default", 724 | "query": "SELECT last(\"value\") FROM \"deis_router_request_count\" WHERE $timeFilter GROUP BY time($interval) fill(null)", 725 | "refId": "B", 726 | "resultFormat": "time_series", 727 | "select": [ 728 | [ 729 | { 730 | "params": [ 731 | "value" 732 | ], 733 | "type": "field" 734 | }, 735 | { 736 | "params": [], 737 | "type": "count" 738 | }, 739 | { 740 | "params": [ 741 | 10 742 | ], 743 | "type": "moving_average" 744 | } 745 | ] 746 | ], 747 | "tags": [] 748 | } 749 | ], 750 | "timeFrom": null, 751 | "timeShift": null, 752 | "title": "Request Per Second", 753 | "tooltip": { 754 | "msResolution": false, 755 | "shared": true, 756 | "sort": 0, 757 | "value_type": "individual" 758 | }, 759 | "type": "graph", 760 | "xaxis": { 761 | "show": true 762 | }, 763 | "yaxes": [ 764 | { 765 | "format": "ops", 766 | "label": "req/sec", 767 | "logBase": 1, 768 | "max": null, 769 | "min": null, 770 | "show": true 771 | }, 772 | { 773 | "format": "short", 774 | "logBase": 1, 775 | "max": null, 776 | "min": null, 777 | "show": false 778 | } 779 | ] 780 | }, 781 | { 782 | "aliasColors": {}, 783 | "bars": false, 784 | "datasource": null, 785 | "editable": true, 786 | "error": false, 787 | "fill": 1, 788 | "grid": { 789 | "threshold1": null, 790 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 791 | "threshold2": null, 792 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 793 | }, 794 | "id": 8, 795 | "interval": "1s", 796 | "isNew": true, 797 | "legend": { 798 | "avg": false, 799 | "current": false, 800 | "max": false, 801 | "min": false, 802 | "show": true, 803 | "total": false, 804 | "values": false 805 | }, 806 | "lines": true, 807 | "linewidth": 2, 808 | "links": [], 809 | "nullPointMode": "connected", 810 | "percentage": false, 811 | "pointradius": 2, 812 | "points": false, 813 | "renderer": "flot", 814 | "seriesOverrides": [], 815 | "span": 6, 816 | "stack": false, 817 | "steppedLine": false, 818 | "targets": [ 819 | { 820 | "alias": "2xx", 821 | "dsType": "influxdb", 822 | "groupBy": [ 823 | { 824 | "params": [ 825 | "$interval" 826 | ], 827 | "type": "time" 828 | }, 829 | { 830 | "params": [ 831 | "none" 832 | ], 833 | "type": "fill" 834 | } 835 | ], 836 | "measurement": "deis_router_response_time_ms", 837 | "policy": "default", 838 | "refId": "A", 839 | "resultFormat": "time_series", 840 | "select": [ 841 | [ 842 | { 843 | "params": [ 844 | "value" 845 | ], 846 | "type": "field" 847 | }, 848 | { 849 | "params": [], 850 | "type": "count" 851 | }, 852 | { 853 | "params": [ 854 | 10 855 | ], 856 | "type": "moving_average" 857 | } 858 | ] 859 | ], 860 | "tags": [ 861 | { 862 | "key": "status_code", 863 | "operator": "=~", 864 | "value": "/2\\d\\d/" 865 | } 866 | ] 867 | }, 868 | { 869 | "alias": "3xx", 870 | "dsType": "influxdb", 871 | "groupBy": [ 872 | { 873 | "params": [ 874 | "$interval" 875 | ], 876 | "type": "time" 877 | }, 878 | { 879 | "params": [ 880 | "none" 881 | ], 882 | "type": "fill" 883 | } 884 | ], 885 | "measurement": "deis_router_response_time_ms", 886 | "policy": "default", 887 | "refId": "B", 888 | "resultFormat": "time_series", 889 | "select": [ 890 | [ 891 | { 892 | "params": [ 893 | "value" 894 | ], 895 | "type": "field" 896 | }, 897 | { 898 | "params": [], 899 | "type": "count" 900 | }, 901 | { 902 | "params": [ 903 | 10 904 | ], 905 | "type": "moving_average" 906 | } 907 | ] 908 | ], 909 | "tags": [ 910 | { 911 | "key": "status_code", 912 | "operator": "=~", 913 | "value": "/3\\d\\d/" 914 | } 915 | ] 916 | }, 917 | { 918 | "alias": "4xx", 919 | "dsType": "influxdb", 920 | "groupBy": [ 921 | { 922 | "params": [ 923 | "$interval" 924 | ], 925 | "type": "time" 926 | }, 927 | { 928 | "params": [ 929 | "none" 930 | ], 931 | "type": "fill" 932 | } 933 | ], 934 | "measurement": "deis_router_response_time_ms", 935 | "policy": "default", 936 | "refId": "C", 937 | "resultFormat": "time_series", 938 | "select": [ 939 | [ 940 | { 941 | "params": [ 942 | "value" 943 | ], 944 | "type": "field" 945 | }, 946 | { 947 | "params": [], 948 | "type": "count" 949 | }, 950 | { 951 | "params": [ 952 | 10 953 | ], 954 | "type": "moving_average" 955 | } 956 | ] 957 | ], 958 | "tags": [ 959 | { 960 | "key": "status_code", 961 | "operator": "=~", 962 | "value": "/4\\d\\d/" 963 | } 964 | ] 965 | }, 966 | { 967 | "alias": "5xx", 968 | "dsType": "influxdb", 969 | "groupBy": [ 970 | { 971 | "params": [ 972 | "$interval" 973 | ], 974 | "type": "time" 975 | }, 976 | { 977 | "params": [ 978 | "none" 979 | ], 980 | "type": "fill" 981 | } 982 | ], 983 | "measurement": "deis_router_response_time_ms", 984 | "policy": "default", 985 | "refId": "D", 986 | "resultFormat": "time_series", 987 | "select": [ 988 | [ 989 | { 990 | "params": [ 991 | "value" 992 | ], 993 | "type": "field" 994 | }, 995 | { 996 | "params": [], 997 | "type": "count" 998 | }, 999 | { 1000 | "params": [ 1001 | 10 1002 | ], 1003 | "type": "moving_average" 1004 | } 1005 | ] 1006 | ], 1007 | "tags": [ 1008 | { 1009 | "key": "status_code", 1010 | "operator": "=~", 1011 | "value": "/5\\d\\d/" 1012 | } 1013 | ] 1014 | } 1015 | ], 1016 | "timeFrom": null, 1017 | "timeShift": null, 1018 | "title": "Status Codes (Aggregate)", 1019 | "tooltip": { 1020 | "msResolution": false, 1021 | "shared": true, 1022 | "sort": 0, 1023 | "value_type": "cumulative" 1024 | }, 1025 | "type": "graph", 1026 | "xaxis": { 1027 | "show": true 1028 | }, 1029 | "yaxes": [ 1030 | { 1031 | "format": "short", 1032 | "label": null, 1033 | "logBase": 1, 1034 | "max": null, 1035 | "min": null, 1036 | "show": true 1037 | }, 1038 | { 1039 | "format": "short", 1040 | "label": null, 1041 | "logBase": 1, 1042 | "max": null, 1043 | "min": null, 1044 | "show": true 1045 | } 1046 | ] 1047 | } 1048 | ], 1049 | "title": "New row" 1050 | } 1051 | ], 1052 | "time": { 1053 | "from": "now-3h", 1054 | "to": "now" 1055 | }, 1056 | "timepicker": { 1057 | "now": true, 1058 | "refresh_intervals": [ 1059 | "5s", 1060 | "10s", 1061 | "30s", 1062 | "1m", 1063 | "5m", 1064 | "15m", 1065 | "30m", 1066 | "1h", 1067 | "2h", 1068 | "1d" 1069 | ], 1070 | "time_options": [ 1071 | "5m", 1072 | "15m", 1073 | "1h", 1074 | "6h", 1075 | "12h", 1076 | "24h", 1077 | "2d", 1078 | "7d", 1079 | "30d" 1080 | ] 1081 | }, 1082 | "templating": { 1083 | "list": [] 1084 | }, 1085 | "annotations": { 1086 | "list": [] 1087 | }, 1088 | "refresh": "5s", 1089 | "schemaVersion": 12, 1090 | "version": 0, 1091 | "links": [], 1092 | "gnetId": null 1093 | } 1094 | } 1095 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/api/dashboards/influx.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": { 3 | "id": null, 4 | "title": "Influx", 5 | "tags": [ 6 | "deis" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": false, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "100px", 18 | "panels": [ 19 | { 20 | "cacheTimeout": null, 21 | "colorBackground": false, 22 | "colorValue": false, 23 | "colors": [ 24 | "rgba(245, 54, 54, 0.9)", 25 | "rgba(237, 129, 40, 0.89)", 26 | "rgba(50, 172, 45, 0.97)" 27 | ], 28 | "datasource": null, 29 | "editable": true, 30 | "error": false, 31 | "format": "none", 32 | "gauge": { 33 | "maxValue": 100, 34 | "minValue": 0, 35 | "show": false, 36 | "thresholdLabels": false, 37 | "thresholdMarkers": true 38 | }, 39 | "id": 2, 40 | "interval": null, 41 | "isNew": true, 42 | "links": [], 43 | "mappingType": 1, 44 | "mappingTypes": [ 45 | { 46 | "name": "value to text", 47 | "value": 1 48 | }, 49 | { 50 | "name": "range to text", 51 | "value": 2 52 | } 53 | ], 54 | "maxDataPoints": 100, 55 | "nullPointMode": "connected", 56 | "nullText": null, 57 | "postfix": "", 58 | "postfixFontSize": "50%", 59 | "prefix": "", 60 | "prefixFontSize": "50%", 61 | "rangeMaps": [ 62 | { 63 | "from": "null", 64 | "text": "N/A", 65 | "to": "null" 66 | } 67 | ], 68 | "span": 6, 69 | "sparkline": { 70 | "fillColor": "rgba(31, 118, 189, 0.18)", 71 | "full": false, 72 | "lineColor": "rgb(31, 120, 193)", 73 | "show": false 74 | }, 75 | "targets": [ 76 | { 77 | "alias": "", 78 | "dsType": "influxdb", 79 | "groupBy": [ 80 | { 81 | "params": [ 82 | "$interval" 83 | ], 84 | "type": "time" 85 | }, 86 | { 87 | "params": [ 88 | "null" 89 | ], 90 | "type": "fill" 91 | } 92 | ], 93 | "measurement": "influxdb_database", 94 | "policy": "default", 95 | "refId": "A", 96 | "resultFormat": "time_series", 97 | "select": [ 98 | [ 99 | { 100 | "params": [ 101 | "numMeasurements" 102 | ], 103 | "type": "field" 104 | }, 105 | { 106 | "params": [], 107 | "type": "last" 108 | } 109 | ] 110 | ], 111 | "tags": [] 112 | } 113 | ], 114 | "thresholds": "", 115 | "title": "Number of Measurements", 116 | "type": "singlestat", 117 | "valueFontSize": "200%", 118 | "valueMaps": [ 119 | { 120 | "op": "=", 121 | "text": "N/A", 122 | "value": "null" 123 | } 124 | ], 125 | "valueName": "avg" 126 | }, 127 | { 128 | "cacheTimeout": null, 129 | "colorBackground": false, 130 | "colorValue": false, 131 | "colors": [ 132 | "rgba(245, 54, 54, 0.9)", 133 | "rgba(237, 129, 40, 0.89)", 134 | "rgba(50, 172, 45, 0.97)" 135 | ], 136 | "datasource": null, 137 | "editable": true, 138 | "error": false, 139 | "format": "none", 140 | "gauge": { 141 | "maxValue": 100, 142 | "minValue": 0, 143 | "show": false, 144 | "thresholdLabels": false, 145 | "thresholdMarkers": true 146 | }, 147 | "id": 3, 148 | "interval": null, 149 | "isNew": true, 150 | "links": [], 151 | "mappingType": 1, 152 | "mappingTypes": [ 153 | { 154 | "name": "value to text", 155 | "value": 1 156 | }, 157 | { 158 | "name": "range to text", 159 | "value": 2 160 | } 161 | ], 162 | "maxDataPoints": 100, 163 | "nullPointMode": "connected", 164 | "nullText": null, 165 | "postfix": "", 166 | "postfixFontSize": "50%", 167 | "prefix": "", 168 | "prefixFontSize": "50%", 169 | "rangeMaps": [ 170 | { 171 | "from": "null", 172 | "text": "N/A", 173 | "to": "null" 174 | } 175 | ], 176 | "span": 6, 177 | "sparkline": { 178 | "fillColor": "rgba(31, 118, 189, 0.18)", 179 | "full": false, 180 | "lineColor": "rgb(31, 120, 193)", 181 | "show": false 182 | }, 183 | "targets": [ 184 | { 185 | "alias": "", 186 | "dsType": "influxdb", 187 | "groupBy": [ 188 | { 189 | "params": [ 190 | "$interval" 191 | ], 192 | "type": "time" 193 | }, 194 | { 195 | "params": [ 196 | "null" 197 | ], 198 | "type": "fill" 199 | } 200 | ], 201 | "measurement": "influxdb_database", 202 | "policy": "default", 203 | "refId": "A", 204 | "resultFormat": "time_series", 205 | "select": [ 206 | [ 207 | { 208 | "params": [ 209 | "numSeries" 210 | ], 211 | "type": "field" 212 | }, 213 | { 214 | "params": [], 215 | "type": "last" 216 | } 217 | ] 218 | ], 219 | "tags": [] 220 | } 221 | ], 222 | "thresholds": "", 223 | "title": "Number of Series", 224 | "type": "singlestat", 225 | "valueFontSize": "200%", 226 | "valueMaps": [ 227 | { 228 | "op": "=", 229 | "text": "N/A", 230 | "value": "null" 231 | } 232 | ], 233 | "valueName": "avg" 234 | } 235 | ], 236 | "title": "New row" 237 | }, 238 | { 239 | "collapse": false, 240 | "editable": true, 241 | "height": "100px", 242 | "panels": [ 243 | { 244 | "cacheTimeout": null, 245 | "colorBackground": false, 246 | "colorValue": false, 247 | "colors": [ 248 | "rgba(245, 54, 54, 0.9)", 249 | "rgba(237, 129, 40, 0.89)", 250 | "rgba(50, 172, 45, 0.97)" 251 | ], 252 | "datasource": null, 253 | "editable": true, 254 | "error": false, 255 | "format": "bytes", 256 | "gauge": { 257 | "maxValue": 100, 258 | "minValue": 0, 259 | "show": false, 260 | "thresholdLabels": false, 261 | "thresholdMarkers": true 262 | }, 263 | "id": 4, 264 | "interval": null, 265 | "isNew": true, 266 | "links": [], 267 | "mappingType": 1, 268 | "mappingTypes": [ 269 | { 270 | "name": "value to text", 271 | "value": 1 272 | }, 273 | { 274 | "name": "range to text", 275 | "value": 2 276 | } 277 | ], 278 | "maxDataPoints": 100, 279 | "nullPointMode": "connected", 280 | "nullText": null, 281 | "postfix": "", 282 | "postfixFontSize": "50%", 283 | "prefix": "", 284 | "prefixFontSize": "50%", 285 | "rangeMaps": [ 286 | { 287 | "from": "null", 288 | "text": "N/A", 289 | "to": "null" 290 | } 291 | ], 292 | "span": 6, 293 | "sparkline": { 294 | "fillColor": "rgba(31, 118, 189, 0.18)", 295 | "full": false, 296 | "lineColor": "rgb(31, 120, 193)", 297 | "show": true 298 | }, 299 | "targets": [ 300 | { 301 | "dsType": "influxdb", 302 | "groupBy": [ 303 | { 304 | "params": [ 305 | "$interval" 306 | ], 307 | "type": "time" 308 | }, 309 | { 310 | "params": [ 311 | "null" 312 | ], 313 | "type": "fill" 314 | } 315 | ], 316 | "measurement": "kubernetes_pod_container", 317 | "policy": "default", 318 | "refId": "A", 319 | "resultFormat": "time_series", 320 | "select": [ 321 | [ 322 | { 323 | "params": [ 324 | "memory_usage_bytes" 325 | ], 326 | "type": "field" 327 | }, 328 | { 329 | "params": [], 330 | "type": "last" 331 | } 332 | ] 333 | ], 334 | "tags": [ 335 | { 336 | "key": "container_name", 337 | "operator": "=", 338 | "value": "deis-monitor-influxdb" 339 | } 340 | ] 341 | } 342 | ], 343 | "thresholds": "", 344 | "title": "Memory", 345 | "type": "singlestat", 346 | "valueFontSize": "200%", 347 | "valueMaps": [ 348 | { 349 | "op": "=", 350 | "text": "N/A", 351 | "value": "null" 352 | } 353 | ], 354 | "valueName": "current" 355 | }, 356 | { 357 | "cacheTimeout": null, 358 | "colorBackground": false, 359 | "colorValue": false, 360 | "colors": [ 361 | "rgba(245, 54, 54, 0.9)", 362 | "rgba(237, 129, 40, 0.89)", 363 | "rgba(50, 172, 45, 0.97)" 364 | ], 365 | "datasource": null, 366 | "editable": true, 367 | "error": false, 368 | "format": "bytes", 369 | "gauge": { 370 | "maxValue": 100, 371 | "minValue": 0, 372 | "show": false, 373 | "thresholdLabels": false, 374 | "thresholdMarkers": true 375 | }, 376 | "id": 5, 377 | "interval": null, 378 | "isNew": true, 379 | "links": [], 380 | "mappingType": 1, 381 | "mappingTypes": [ 382 | { 383 | "name": "value to text", 384 | "value": 1 385 | }, 386 | { 387 | "name": "range to text", 388 | "value": 2 389 | } 390 | ], 391 | "maxDataPoints": 100, 392 | "nullPointMode": "connected", 393 | "nullText": null, 394 | "postfix": "", 395 | "postfixFontSize": "50%", 396 | "prefix": "", 397 | "prefixFontSize": "50%", 398 | "rangeMaps": [ 399 | { 400 | "from": "null", 401 | "text": "N/A", 402 | "to": "null" 403 | } 404 | ], 405 | "span": 6, 406 | "sparkline": { 407 | "fillColor": "rgba(31, 118, 189, 0.18)", 408 | "full": false, 409 | "lineColor": "rgb(31, 120, 193)", 410 | "show": true 411 | }, 412 | "targets": [ 413 | { 414 | "dsType": "influxdb", 415 | "groupBy": [ 416 | { 417 | "params": [ 418 | "$interval" 419 | ], 420 | "type": "time" 421 | }, 422 | { 423 | "params": [ 424 | "null" 425 | ], 426 | "type": "fill" 427 | } 428 | ], 429 | "measurement": "influxdb_shard", 430 | "policy": "default", 431 | "refId": "A", 432 | "resultFormat": "time_series", 433 | "select": [ 434 | [ 435 | { 436 | "params": [ 437 | "diskBytes" 438 | ], 439 | "type": "field" 440 | }, 441 | { 442 | "params": [], 443 | "type": "last" 444 | } 445 | ] 446 | ], 447 | "tags": [] 448 | } 449 | ], 450 | "thresholds": "", 451 | "title": "Database Size", 452 | "type": "singlestat", 453 | "valueFontSize": "200%", 454 | "valueMaps": [ 455 | { 456 | "op": "=", 457 | "text": "N/A", 458 | "value": "null" 459 | } 460 | ], 461 | "valueName": "current" 462 | } 463 | ], 464 | "title": "New row" 465 | }, 466 | { 467 | "collapse": false, 468 | "editable": true, 469 | "height": "250px", 470 | "panels": [ 471 | { 472 | "aliasColors": {}, 473 | "bars": false, 474 | "datasource": null, 475 | "editable": true, 476 | "error": false, 477 | "fill": 1, 478 | "grid": { 479 | "threshold1": null, 480 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 481 | "threshold2": null, 482 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 483 | }, 484 | "id": 1, 485 | "interval": "", 486 | "isNew": true, 487 | "legend": { 488 | "alignAsTable": true, 489 | "avg": false, 490 | "current": false, 491 | "max": false, 492 | "min": false, 493 | "rightSide": true, 494 | "show": false, 495 | "total": false, 496 | "values": false 497 | }, 498 | "lines": true, 499 | "linewidth": 2, 500 | "links": [], 501 | "nullPointMode": "connected", 502 | "percentage": false, 503 | "pointradius": 5, 504 | "points": false, 505 | "renderer": "flot", 506 | "seriesOverrides": [ 507 | { 508 | "alias": "/Read/", 509 | "color": "#508642", 510 | "fill": 4 511 | }, 512 | { 513 | "alias": "/Write/", 514 | "color": "#E0752D", 515 | "fill": 4 516 | } 517 | ], 518 | "span": 12, 519 | "stack": false, 520 | "steppedLine": false, 521 | "targets": [ 522 | { 523 | "alias": "Read - $tag_host", 524 | "dsType": "influxdb", 525 | "groupBy": [ 526 | { 527 | "params": [ 528 | "$interval" 529 | ], 530 | "type": "time" 531 | }, 532 | { 533 | "params": [ 534 | "host" 535 | ], 536 | "type": "tag" 537 | }, 538 | { 539 | "params": [ 540 | "null" 541 | ], 542 | "type": "fill" 543 | } 544 | ], 545 | "measurement": "influxdb_httpd", 546 | "policy": "default", 547 | "query": "SELECT non_negative_derivative(last(\"queryReq\"), 1s) FROM \"influxdb_httpd\" WHERE $timeFilter GROUP BY time($interval), \"host\" fill(null)", 548 | "refId": "A", 549 | "resultFormat": "time_series", 550 | "select": [ 551 | [ 552 | { 553 | "params": [ 554 | "queryReq" 555 | ], 556 | "type": "field" 557 | }, 558 | { 559 | "params": [], 560 | "type": "last" 561 | }, 562 | { 563 | "params": [ 564 | "1s" 565 | ], 566 | "type": "non_negative_derivative" 567 | } 568 | ] 569 | ], 570 | "tags": [] 571 | }, 572 | { 573 | "alias": "Write - $tag_host", 574 | "dsType": "influxdb", 575 | "groupBy": [ 576 | { 577 | "params": [ 578 | "$interval" 579 | ], 580 | "type": "time" 581 | }, 582 | { 583 | "params": [ 584 | "host" 585 | ], 586 | "type": "tag" 587 | }, 588 | { 589 | "params": [ 590 | "null" 591 | ], 592 | "type": "fill" 593 | } 594 | ], 595 | "measurement": "influxdb_httpd", 596 | "policy": "default", 597 | "query": "SELECT non_negative_derivative(last(\"queryReq\"), 1s) FROM \"influxdb_httpd\" WHERE $timeFilter GROUP BY time($interval), \"host\" fill(null)", 598 | "refId": "B", 599 | "resultFormat": "time_series", 600 | "select": [ 601 | [ 602 | { 603 | "params": [ 604 | "writeReq" 605 | ], 606 | "type": "field" 607 | }, 608 | { 609 | "params": [], 610 | "type": "last" 611 | }, 612 | { 613 | "params": [ 614 | "10s" 615 | ], 616 | "type": "non_negative_derivative" 617 | } 618 | ] 619 | ], 620 | "tags": [] 621 | } 622 | ], 623 | "timeFrom": null, 624 | "timeShift": null, 625 | "title": "HTTP Requests Per Second", 626 | "tooltip": { 627 | "msResolution": false, 628 | "shared": true, 629 | "sort": 0, 630 | "value_type": "cumulative" 631 | }, 632 | "type": "graph", 633 | "xaxis": { 634 | "show": true 635 | }, 636 | "yaxes": [ 637 | { 638 | "format": "ops", 639 | "logBase": 1, 640 | "max": null, 641 | "min": null, 642 | "show": true 643 | }, 644 | { 645 | "format": "short", 646 | "logBase": 1, 647 | "max": null, 648 | "min": null, 649 | "show": true 650 | } 651 | ] 652 | } 653 | ], 654 | "title": "Row" 655 | } 656 | ], 657 | "time": { 658 | "from": "now-3h", 659 | "to": "now" 660 | }, 661 | "timepicker": { 662 | "now": true, 663 | "refresh_intervals": [ 664 | "5s", 665 | "10s", 666 | "30s", 667 | "1m", 668 | "5m", 669 | "15m", 670 | "30m", 671 | "1h", 672 | "2h", 673 | "1d" 674 | ], 675 | "time_options": [ 676 | "5m", 677 | "15m", 678 | "1h", 679 | "6h", 680 | "12h", 681 | "24h", 682 | "2d", 683 | "7d", 684 | "30d" 685 | ] 686 | }, 687 | "templating": { 688 | "list": [] 689 | }, 690 | "annotations": { 691 | "list": [] 692 | }, 693 | "schemaVersion": 12, 694 | "version": 0, 695 | "links": [], 696 | "gnetId": null 697 | } 698 | } 699 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/api/dashboards/kube_health.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": { 3 | "id": null, 4 | "title": "Kubernetes Health", 5 | "tags": [], 6 | "style": "dark", 7 | "timezone": "browser", 8 | "editable": true, 9 | "hideControls": false, 10 | "sharedCrosshair": false, 11 | "rows": [ 12 | { 13 | "collapse": false, 14 | "editable": true, 15 | "height": "250px", 16 | "panels": [ 17 | { 18 | "aliasColors": {}, 19 | "bars": false, 20 | "datasource": null, 21 | "editable": true, 22 | "error": false, 23 | "fill": 1, 24 | "grid": { 25 | "threshold1": null, 26 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 27 | "threshold2": null, 28 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 29 | }, 30 | "id": 1, 31 | "isNew": true, 32 | "legend": { 33 | "avg": false, 34 | "current": false, 35 | "max": false, 36 | "min": false, 37 | "show": false, 38 | "total": false, 39 | "values": false 40 | }, 41 | "lines": true, 42 | "linewidth": 2, 43 | "links": [], 44 | "nullPointMode": "connected", 45 | "percentage": false, 46 | "pointradius": 5, 47 | "points": false, 48 | "renderer": "flot", 49 | "seriesOverrides": [], 50 | "span": 12, 51 | "stack": false, 52 | "steppedLine": false, 53 | "targets": [ 54 | { 55 | "alias": "$tag_pod_name", 56 | "dsType": "influxdb", 57 | "groupBy": [ 58 | { 59 | "params": [ 60 | "$interval" 61 | ], 62 | "type": "time" 63 | }, 64 | { 65 | "params": [ 66 | "pod_name" 67 | ], 68 | "type": "tag" 69 | }, 70 | { 71 | "params": [ 72 | "null" 73 | ], 74 | "type": "fill" 75 | } 76 | ], 77 | "measurement": "kubernetes_pod_container", 78 | "policy": "default", 79 | "refId": "A", 80 | "resultFormat": "time_series", 81 | "select": [ 82 | [ 83 | { 84 | "params": [ 85 | "cpu_usage_nanocores" 86 | ], 87 | "type": "field" 88 | }, 89 | { 90 | "params": [], 91 | "type": "last" 92 | }, 93 | { 94 | "params": [ 95 | 10 96 | ], 97 | "type": "moving_average" 98 | }, 99 | { 100 | "params": [ 101 | " / 1000000" 102 | ], 103 | "type": "math" 104 | } 105 | ] 106 | ], 107 | "tags": [ 108 | { 109 | "key": "container_name", 110 | "operator": "=~", 111 | "value": "/^$container_name$/" 112 | } 113 | ] 114 | } 115 | ], 116 | "timeFrom": null, 117 | "timeShift": null, 118 | "title": "CPU", 119 | "tooltip": { 120 | "msResolution": false, 121 | "shared": true, 122 | "sort": 0, 123 | "value_type": "cumulative" 124 | }, 125 | "type": "graph", 126 | "xaxis": { 127 | "show": true 128 | }, 129 | "yaxes": [ 130 | { 131 | "format": "short", 132 | "label": "milli-cores", 133 | "logBase": 1, 134 | "max": null, 135 | "min": null, 136 | "show": true 137 | }, 138 | { 139 | "format": "short", 140 | "label": null, 141 | "logBase": 1, 142 | "max": null, 143 | "min": null, 144 | "show": true 145 | } 146 | ] 147 | } 148 | ], 149 | "showTitle": false, 150 | "title": "Row" 151 | }, 152 | { 153 | "collapse": false, 154 | "editable": true, 155 | "height": "250px", 156 | "panels": [ 157 | { 158 | "aliasColors": {}, 159 | "bars": false, 160 | "datasource": null, 161 | "editable": true, 162 | "error": false, 163 | "fill": 1, 164 | "grid": { 165 | "threshold1": null, 166 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 167 | "threshold2": null, 168 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 169 | }, 170 | "id": 2, 171 | "isNew": true, 172 | "legend": { 173 | "avg": false, 174 | "current": false, 175 | "max": false, 176 | "min": false, 177 | "show": false, 178 | "total": false, 179 | "values": false 180 | }, 181 | "lines": true, 182 | "linewidth": 2, 183 | "links": [], 184 | "nullPointMode": "connected", 185 | "percentage": false, 186 | "pointradius": 5, 187 | "points": false, 188 | "renderer": "flot", 189 | "seriesOverrides": [], 190 | "span": 12, 191 | "stack": false, 192 | "steppedLine": false, 193 | "targets": [ 194 | { 195 | "alias": "$tag_pod_name", 196 | "dsType": "influxdb", 197 | "groupBy": [ 198 | { 199 | "params": [ 200 | "$interval" 201 | ], 202 | "type": "time" 203 | }, 204 | { 205 | "params": [ 206 | "pod_name" 207 | ], 208 | "type": "tag" 209 | }, 210 | { 211 | "params": [ 212 | "null" 213 | ], 214 | "type": "fill" 215 | } 216 | ], 217 | "measurement": "kubernetes_pod_container", 218 | "policy": "default", 219 | "refId": "A", 220 | "resultFormat": "time_series", 221 | "select": [ 222 | [ 223 | { 224 | "params": [ 225 | "memory_usage_bytes" 226 | ], 227 | "type": "field" 228 | }, 229 | { 230 | "params": [], 231 | "type": "last" 232 | }, 233 | { 234 | "params": [ 235 | 10 236 | ], 237 | "type": "moving_average" 238 | } 239 | ] 240 | ], 241 | "tags": [ 242 | { 243 | "key": "container_name", 244 | "operator": "=~", 245 | "value": "/^$container_name$/" 246 | } 247 | ] 248 | } 249 | ], 250 | "timeFrom": null, 251 | "timeShift": null, 252 | "title": "Memory", 253 | "tooltip": { 254 | "msResolution": false, 255 | "shared": true, 256 | "sort": 0, 257 | "value_type": "cumulative" 258 | }, 259 | "type": "graph", 260 | "xaxis": { 261 | "show": true 262 | }, 263 | "yaxes": [ 264 | { 265 | "format": "bytes", 266 | "label": null, 267 | "logBase": 1, 268 | "max": null, 269 | "min": null, 270 | "show": true 271 | }, 272 | { 273 | "format": "short", 274 | "label": null, 275 | "logBase": 1, 276 | "max": null, 277 | "min": null, 278 | "show": true 279 | } 280 | ] 281 | } 282 | ], 283 | "title": "New row" 284 | }, 285 | { 286 | "collapse": false, 287 | "editable": true, 288 | "height": "250px", 289 | "panels": [ 290 | { 291 | "content": "# Kubelet", 292 | "editable": true, 293 | "error": false, 294 | "id": 5, 295 | "isNew": true, 296 | "links": [], 297 | "mode": "markdown", 298 | "span": 1, 299 | "title": "", 300 | "transparent": true, 301 | "type": "text" 302 | }, 303 | { 304 | "aliasColors": {}, 305 | "bars": false, 306 | "datasource": null, 307 | "editable": true, 308 | "error": false, 309 | "fill": 1, 310 | "grid": { 311 | "threshold1": null, 312 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 313 | "threshold2": null, 314 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 315 | }, 316 | "id": 4, 317 | "isNew": true, 318 | "legend": { 319 | "avg": false, 320 | "current": false, 321 | "max": false, 322 | "min": false, 323 | "show": false, 324 | "total": false, 325 | "values": false 326 | }, 327 | "lines": true, 328 | "linewidth": 2, 329 | "links": [], 330 | "nullPointMode": "connected", 331 | "percentage": false, 332 | "pointradius": 5, 333 | "points": false, 334 | "renderer": "flot", 335 | "seriesOverrides": [], 336 | "span": 11, 337 | "stack": false, 338 | "steppedLine": false, 339 | "targets": [ 340 | { 341 | "dsType": "influxdb", 342 | "groupBy": [ 343 | { 344 | "params": [ 345 | "$interval" 346 | ], 347 | "type": "time" 348 | }, 349 | { 350 | "params": [ 351 | "null" 352 | ], 353 | "type": "fill" 354 | } 355 | ], 356 | "measurement": "kubernetes_system_container", 357 | "policy": "default", 358 | "refId": "A", 359 | "resultFormat": "time_series", 360 | "select": [ 361 | [ 362 | { 363 | "params": [ 364 | "cpu_usage_nanocores" 365 | ], 366 | "type": "field" 367 | }, 368 | { 369 | "params": [], 370 | "type": "last" 371 | }, 372 | { 373 | "params": [ 374 | 10 375 | ], 376 | "type": "moving_average" 377 | }, 378 | { 379 | "params": [ 380 | " / 1000000" 381 | ], 382 | "type": "math" 383 | } 384 | ] 385 | ], 386 | "tags": [ 387 | { 388 | "key": "container_name", 389 | "operator": "=", 390 | "value": "kubelet" 391 | } 392 | ] 393 | } 394 | ], 395 | "timeFrom": null, 396 | "timeShift": null, 397 | "title": "CPU", 398 | "tooltip": { 399 | "msResolution": false, 400 | "shared": true, 401 | "sort": 0, 402 | "value_type": "cumulative" 403 | }, 404 | "type": "graph", 405 | "xaxis": { 406 | "show": true 407 | }, 408 | "yaxes": [ 409 | { 410 | "format": "short", 411 | "label": "milli-cores", 412 | "logBase": 1, 413 | "max": null, 414 | "min": null, 415 | "show": true 416 | }, 417 | { 418 | "format": "short", 419 | "label": null, 420 | "logBase": 1, 421 | "max": null, 422 | "min": null, 423 | "show": true 424 | } 425 | ] 426 | }, 427 | { 428 | "content": "", 429 | "editable": true, 430 | "error": false, 431 | "id": 8, 432 | "isNew": true, 433 | "links": [], 434 | "mode": "markdown", 435 | "span": 1, 436 | "title": "", 437 | "transparent": true, 438 | "type": "text" 439 | }, 440 | { 441 | "aliasColors": {}, 442 | "bars": false, 443 | "datasource": null, 444 | "editable": true, 445 | "error": false, 446 | "fill": 1, 447 | "grid": { 448 | "threshold1": null, 449 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 450 | "threshold2": null, 451 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 452 | }, 453 | "id": 6, 454 | "isNew": true, 455 | "legend": { 456 | "avg": false, 457 | "current": false, 458 | "max": false, 459 | "min": false, 460 | "show": false, 461 | "total": false, 462 | "values": false 463 | }, 464 | "lines": true, 465 | "linewidth": 2, 466 | "links": [], 467 | "nullPointMode": "connected", 468 | "percentage": false, 469 | "pointradius": 5, 470 | "points": false, 471 | "renderer": "flot", 472 | "seriesOverrides": [], 473 | "span": 11, 474 | "stack": false, 475 | "steppedLine": false, 476 | "targets": [ 477 | { 478 | "dsType": "influxdb", 479 | "groupBy": [ 480 | { 481 | "params": [ 482 | "$interval" 483 | ], 484 | "type": "time" 485 | }, 486 | { 487 | "params": [ 488 | "null" 489 | ], 490 | "type": "fill" 491 | } 492 | ], 493 | "measurement": "kubernetes_system_container", 494 | "policy": "default", 495 | "refId": "A", 496 | "resultFormat": "time_series", 497 | "select": [ 498 | [ 499 | { 500 | "params": [ 501 | "memory_usage_bytes" 502 | ], 503 | "type": "field" 504 | }, 505 | { 506 | "params": [], 507 | "type": "last" 508 | }, 509 | { 510 | "params": [ 511 | 10 512 | ], 513 | "type": "moving_average" 514 | } 515 | ] 516 | ], 517 | "tags": [ 518 | { 519 | "key": "container_name", 520 | "operator": "=", 521 | "value": "kubelet" 522 | } 523 | ] 524 | } 525 | ], 526 | "timeFrom": null, 527 | "timeShift": null, 528 | "title": "Memory", 529 | "tooltip": { 530 | "msResolution": false, 531 | "shared": true, 532 | "sort": 0, 533 | "value_type": "cumulative" 534 | }, 535 | "type": "graph", 536 | "xaxis": { 537 | "show": true 538 | }, 539 | "yaxes": [ 540 | { 541 | "format": "bytes", 542 | "label": "milli-cores", 543 | "logBase": 1, 544 | "max": null, 545 | "min": null, 546 | "show": true 547 | }, 548 | { 549 | "format": "short", 550 | "label": null, 551 | "logBase": 1, 552 | "max": null, 553 | "min": null, 554 | "show": true 555 | } 556 | ] 557 | } 558 | ], 559 | "title": "New row" 560 | }, 561 | { 562 | "collapse": false, 563 | "editable": true, 564 | "height": "250px", 565 | "panels": [ 566 | { 567 | "content": "# Kube System", 568 | "editable": true, 569 | "error": false, 570 | "id": 7, 571 | "isNew": true, 572 | "links": [], 573 | "mode": "markdown", 574 | "span": 1, 575 | "title": "", 576 | "transparent": true, 577 | "type": "text" 578 | }, 579 | { 580 | "aliasColors": {}, 581 | "bars": false, 582 | "datasource": null, 583 | "editable": true, 584 | "error": false, 585 | "fill": 1, 586 | "grid": { 587 | "threshold1": null, 588 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 589 | "threshold2": null, 590 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 591 | }, 592 | "id": 3, 593 | "isNew": true, 594 | "legend": { 595 | "avg": false, 596 | "current": false, 597 | "max": false, 598 | "min": false, 599 | "show": false, 600 | "total": false, 601 | "values": false 602 | }, 603 | "lines": true, 604 | "linewidth": 2, 605 | "links": [], 606 | "nullPointMode": "connected", 607 | "percentage": false, 608 | "pointradius": 5, 609 | "points": false, 610 | "renderer": "flot", 611 | "seriesOverrides": [ 612 | { 613 | "alias": "Received", 614 | "color": "#3F6833" 615 | }, 616 | { 617 | "alias": "Sent", 618 | "color": "#890F02", 619 | "transform": "negative-Y" 620 | } 621 | ], 622 | "span": 11, 623 | "stack": false, 624 | "steppedLine": false, 625 | "targets": [ 626 | { 627 | "alias": "Received", 628 | "dsType": "influxdb", 629 | "groupBy": [ 630 | { 631 | "params": [ 632 | "$interval" 633 | ], 634 | "type": "time" 635 | }, 636 | { 637 | "params": [ 638 | "null" 639 | ], 640 | "type": "fill" 641 | } 642 | ], 643 | "measurement": "kubernetes_pod_network", 644 | "policy": "default", 645 | "refId": "A", 646 | "resultFormat": "time_series", 647 | "select": [ 648 | [ 649 | { 650 | "params": [ 651 | "rx_bytes" 652 | ], 653 | "type": "field" 654 | }, 655 | { 656 | "params": [], 657 | "type": "last" 658 | }, 659 | { 660 | "params": [ 661 | "10s" 662 | ], 663 | "type": "non_negative_derivative" 664 | } 665 | ] 666 | ], 667 | "tags": [ 668 | { 669 | "key": "namespace", 670 | "operator": "=", 671 | "value": "kube-system" 672 | } 673 | ] 674 | }, 675 | { 676 | "alias": "Sent", 677 | "dsType": "influxdb", 678 | "groupBy": [ 679 | { 680 | "params": [ 681 | "$interval" 682 | ], 683 | "type": "time" 684 | }, 685 | { 686 | "params": [ 687 | "null" 688 | ], 689 | "type": "fill" 690 | } 691 | ], 692 | "measurement": "kubernetes_pod_network", 693 | "policy": "default", 694 | "refId": "B", 695 | "resultFormat": "time_series", 696 | "select": [ 697 | [ 698 | { 699 | "params": [ 700 | "tx_bytes" 701 | ], 702 | "type": "field" 703 | }, 704 | { 705 | "params": [], 706 | "type": "last" 707 | }, 708 | { 709 | "params": [ 710 | "10s" 711 | ], 712 | "type": "non_negative_derivative" 713 | } 714 | ] 715 | ], 716 | "tags": [ 717 | { 718 | "key": "namespace", 719 | "operator": "=", 720 | "value": "kube-system" 721 | } 722 | ] 723 | } 724 | ], 725 | "timeFrom": null, 726 | "timeShift": null, 727 | "title": "Network", 728 | "tooltip": { 729 | "msResolution": false, 730 | "shared": true, 731 | "sort": 0, 732 | "value_type": "cumulative" 733 | }, 734 | "type": "graph", 735 | "xaxis": { 736 | "show": true 737 | }, 738 | "yaxes": [ 739 | { 740 | "format": "Bps", 741 | "label": null, 742 | "logBase": 1, 743 | "max": null, 744 | "min": null, 745 | "show": true 746 | }, 747 | { 748 | "format": "short", 749 | "label": null, 750 | "logBase": 1, 751 | "max": null, 752 | "min": null, 753 | "show": true 754 | } 755 | ] 756 | } 757 | ], 758 | "title": "New row" 759 | }, 760 | { 761 | "title": "New row", 762 | "height": "250px", 763 | "editable": true, 764 | "collapse": false, 765 | "panels": [ 766 | { 767 | "title": "", 768 | "error": false, 769 | "span": 1, 770 | "editable": true, 771 | "type": "text", 772 | "isNew": true, 773 | "id": 10, 774 | "mode": "markdown", 775 | "content": "# Nodes", 776 | "links": [], 777 | "transparent": true 778 | }, 779 | { 780 | "title": "CPU", 781 | "error": false, 782 | "span": 11, 783 | "editable": true, 784 | "type": "graph", 785 | "isNew": true, 786 | "id": 9, 787 | "targets": [ 788 | { 789 | "policy": "default", 790 | "dsType": "influxdb", 791 | "resultFormat": "time_series", 792 | "tags": [], 793 | "groupBy": [ 794 | { 795 | "type": "time", 796 | "params": [ 797 | "$interval" 798 | ] 799 | }, 800 | { 801 | "type": "tag", 802 | "params": [ 803 | "node_name" 804 | ] 805 | }, 806 | { 807 | "type": "fill", 808 | "params": [ 809 | "null" 810 | ] 811 | } 812 | ], 813 | "select": [ 814 | [ 815 | { 816 | "type": "field", 817 | "params": [ 818 | "cpu_usage_nanocores" 819 | ] 820 | }, 821 | { 822 | "type": "last", 823 | "params": [] 824 | }, 825 | { 826 | "type": "moving_average", 827 | "params": [ 828 | 10 829 | ] 830 | }, 831 | { 832 | "type": "math", 833 | "params": [ 834 | " / 1000000" 835 | ] 836 | } 837 | ] 838 | ], 839 | "refId": "A", 840 | "measurement": "kubernetes_node", 841 | "alias": "$tag_node_name" 842 | } 843 | ], 844 | "datasource": null, 845 | "renderer": "flot", 846 | "yaxes": [ 847 | { 848 | "label": "milli-cores", 849 | "show": true, 850 | "logBase": 1, 851 | "min": null, 852 | "max": null, 853 | "format": "short" 854 | }, 855 | { 856 | "label": null, 857 | "show": true, 858 | "logBase": 1, 859 | "min": null, 860 | "max": null, 861 | "format": "short" 862 | } 863 | ], 864 | "xaxis": { 865 | "show": true 866 | }, 867 | "grid": { 868 | "threshold1": null, 869 | "threshold2": null, 870 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 871 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 872 | }, 873 | "lines": true, 874 | "fill": 1, 875 | "linewidth": 2, 876 | "points": false, 877 | "pointradius": 5, 878 | "bars": false, 879 | "stack": false, 880 | "percentage": false, 881 | "legend": { 882 | "show": false, 883 | "values": false, 884 | "min": false, 885 | "max": false, 886 | "current": false, 887 | "total": false, 888 | "avg": false 889 | }, 890 | "nullPointMode": "connected", 891 | "steppedLine": false, 892 | "tooltip": { 893 | "value_type": "cumulative", 894 | "shared": true, 895 | "sort": 0, 896 | "msResolution": false 897 | }, 898 | "timeFrom": null, 899 | "timeShift": null, 900 | "aliasColors": {}, 901 | "seriesOverrides": [], 902 | "links": [] 903 | }, 904 | { 905 | "title": "", 906 | "error": false, 907 | "span": 1, 908 | "editable": true, 909 | "type": "text", 910 | "isNew": true, 911 | "id": 12, 912 | "mode": "markdown", 913 | "content": "", 914 | "links": [], 915 | "transparent": true 916 | }, 917 | { 918 | "title": "Memory", 919 | "error": false, 920 | "span": 11, 921 | "editable": true, 922 | "type": "graph", 923 | "isNew": true, 924 | "id": 11, 925 | "targets": [ 926 | { 927 | "policy": "default", 928 | "dsType": "influxdb", 929 | "resultFormat": "time_series", 930 | "tags": [], 931 | "groupBy": [ 932 | { 933 | "type": "time", 934 | "params": [ 935 | "$interval" 936 | ] 937 | }, 938 | { 939 | "type": "tag", 940 | "params": [ 941 | "node_name" 942 | ] 943 | }, 944 | { 945 | "type": "fill", 946 | "params": [ 947 | "null" 948 | ] 949 | } 950 | ], 951 | "select": [ 952 | [ 953 | { 954 | "type": "field", 955 | "params": [ 956 | "memory_usage_bytes" 957 | ] 958 | }, 959 | { 960 | "type": "last", 961 | "params": [] 962 | }, 963 | { 964 | "type": "moving_average", 965 | "params": [ 966 | 10 967 | ] 968 | } 969 | ] 970 | ], 971 | "refId": "A", 972 | "measurement": "kubernetes_node", 973 | "alias": "$tag_node_name" 974 | } 975 | ], 976 | "datasource": null, 977 | "renderer": "flot", 978 | "yaxes": [ 979 | { 980 | "label": "", 981 | "show": true, 982 | "logBase": 1, 983 | "min": null, 984 | "max": null, 985 | "format": "bytes" 986 | }, 987 | { 988 | "label": null, 989 | "show": true, 990 | "logBase": 1, 991 | "min": null, 992 | "max": null, 993 | "format": "short" 994 | } 995 | ], 996 | "xaxis": { 997 | "show": true 998 | }, 999 | "grid": { 1000 | "threshold1": null, 1001 | "threshold2": null, 1002 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 1003 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 1004 | }, 1005 | "lines": true, 1006 | "fill": 1, 1007 | "linewidth": 2, 1008 | "points": false, 1009 | "pointradius": 5, 1010 | "bars": false, 1011 | "stack": false, 1012 | "percentage": false, 1013 | "legend": { 1014 | "show": false, 1015 | "values": false, 1016 | "min": false, 1017 | "max": false, 1018 | "current": false, 1019 | "total": false, 1020 | "avg": false 1021 | }, 1022 | "nullPointMode": "connected", 1023 | "steppedLine": false, 1024 | "tooltip": { 1025 | "value_type": "cumulative", 1026 | "shared": true, 1027 | "sort": 0, 1028 | "msResolution": false 1029 | }, 1030 | "timeFrom": null, 1031 | "timeShift": null, 1032 | "aliasColors": {}, 1033 | "seriesOverrides": [], 1034 | "links": [] 1035 | } 1036 | ] 1037 | } 1038 | ], 1039 | "time": { 1040 | "from": "now-3h", 1041 | "to": "now" 1042 | }, 1043 | "timepicker": { 1044 | "refresh_intervals": [ 1045 | "5s", 1046 | "10s", 1047 | "30s", 1048 | "1m", 1049 | "5m", 1050 | "15m", 1051 | "30m", 1052 | "1h", 1053 | "2h", 1054 | "1d" 1055 | ], 1056 | "time_options": [ 1057 | "5m", 1058 | "15m", 1059 | "1h", 1060 | "6h", 1061 | "12h", 1062 | "24h", 1063 | "2d", 1064 | "7d", 1065 | "30d" 1066 | ] 1067 | }, 1068 | "templating": { 1069 | "list": [ 1070 | { 1071 | "allValue": "", 1072 | "current": { 1073 | "value": [ 1074 | "kube-proxy" 1075 | ], 1076 | "text": "kube-proxy", 1077 | "tags": [] 1078 | }, 1079 | "datasource": "influxdb-datasource", 1080 | "hide": 0, 1081 | "includeAll": false, 1082 | "label": "Container", 1083 | "multi": true, 1084 | "name": "container_name", 1085 | "options": [ 1086 | { 1087 | "text": "kube-proxy", 1088 | "value": "kube-proxy", 1089 | "selected": true 1090 | }, 1091 | { 1092 | "text": "kubedns", 1093 | "value": "kubedns", 1094 | "selected": false 1095 | }, 1096 | { 1097 | "text": "kubernetes-dashboard", 1098 | "value": "kubernetes-dashboard", 1099 | "selected": false 1100 | } 1101 | ], 1102 | "query": "show tag values from kubernetes_pod_container with key in (\"container_name\") where container_name =~ /kube.*/", 1103 | "refresh": 1, 1104 | "regex": "", 1105 | "type": "query" 1106 | } 1107 | ] 1108 | }, 1109 | "annotations": { 1110 | "list": [] 1111 | }, 1112 | "refresh": "5s", 1113 | "schemaVersion": 12, 1114 | "version": 2, 1115 | "links": [], 1116 | "gnetId": null 1117 | } 1118 | } 1119 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/api/dashboards/nsq_health.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": { 3 | "id": null, 4 | "title": "NSQ Health", 5 | "tags": [ 6 | "deis" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": false, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "200px", 18 | "panels": [ 19 | { 20 | "cacheTimeout": null, 21 | "colorBackground": false, 22 | "colorValue": false, 23 | "colors": [ 24 | "rgba(245, 54, 54, 0.9)", 25 | "rgba(237, 129, 40, 0.89)", 26 | "rgba(50, 172, 45, 0.97)" 27 | ], 28 | "datasource": null, 29 | "editable": true, 30 | "error": false, 31 | "format": "none", 32 | "gauge": { 33 | "maxValue": 100, 34 | "minValue": 0, 35 | "show": false, 36 | "thresholdLabels": false, 37 | "thresholdMarkers": true 38 | }, 39 | "id": 9, 40 | "interval": null, 41 | "isNew": true, 42 | "links": [], 43 | "mappingType": 1, 44 | "mappingTypes": [ 45 | { 46 | "name": "value to text", 47 | "value": 1 48 | }, 49 | { 50 | "name": "range to text", 51 | "value": 2 52 | } 53 | ], 54 | "maxDataPoints": 100, 55 | "nullPointMode": "connected", 56 | "nullText": null, 57 | "postfix": "", 58 | "postfixFontSize": "50%", 59 | "prefix": "", 60 | "prefixFontSize": "50%", 61 | "rangeMaps": [ 62 | { 63 | "from": "null", 64 | "text": "N/A", 65 | "to": "null" 66 | } 67 | ], 68 | "span": 6, 69 | "sparkline": { 70 | "fillColor": "rgba(31, 118, 189, 0.18)", 71 | "full": false, 72 | "lineColor": "rgb(31, 120, 193)", 73 | "show": true 74 | }, 75 | "targets": [ 76 | { 77 | "dsType": "influxdb", 78 | "groupBy": [ 79 | { 80 | "params": [ 81 | "$interval" 82 | ], 83 | "type": "time" 84 | }, 85 | { 86 | "params": [ 87 | "null" 88 | ], 89 | "type": "fill" 90 | } 91 | ], 92 | "measurement": "kubernetes_pod_container", 93 | "policy": "default", 94 | "refId": "A", 95 | "resultFormat": "time_series", 96 | "select": [ 97 | [ 98 | { 99 | "params": [ 100 | "cpu_usage_nanocores" 101 | ], 102 | "type": "field" 103 | }, 104 | { 105 | "params": [], 106 | "type": "last" 107 | }, 108 | { 109 | "params": [ 110 | " / 1000000" 111 | ], 112 | "type": "math" 113 | } 114 | ] 115 | ], 116 | "tags": [ 117 | { 118 | "key": "container_name", 119 | "operator": "=", 120 | "value": "deis-nsqd" 121 | } 122 | ] 123 | } 124 | ], 125 | "thresholds": "", 126 | "title": "CPU Usage (Millicores)", 127 | "type": "singlestat", 128 | "valueFontSize": "200%", 129 | "valueMaps": [ 130 | { 131 | "op": "=", 132 | "text": "N/A", 133 | "value": "null" 134 | } 135 | ], 136 | "valueName": "avg" 137 | }, 138 | { 139 | "cacheTimeout": null, 140 | "colorBackground": false, 141 | "colorValue": false, 142 | "colors": [ 143 | "rgba(245, 54, 54, 0.9)", 144 | "rgba(237, 129, 40, 0.89)", 145 | "rgba(50, 172, 45, 0.97)" 146 | ], 147 | "datasource": null, 148 | "editable": true, 149 | "error": false, 150 | "format": "bytes", 151 | "gauge": { 152 | "maxValue": 100, 153 | "minValue": 0, 154 | "show": false, 155 | "thresholdLabels": false, 156 | "thresholdMarkers": true 157 | }, 158 | "id": 8, 159 | "interval": null, 160 | "isNew": true, 161 | "links": [], 162 | "mappingType": 1, 163 | "mappingTypes": [ 164 | { 165 | "name": "value to text", 166 | "value": 1 167 | }, 168 | { 169 | "name": "range to text", 170 | "value": 2 171 | } 172 | ], 173 | "maxDataPoints": 100, 174 | "nullPointMode": "connected", 175 | "nullText": null, 176 | "postfix": "", 177 | "postfixFontSize": "50%", 178 | "prefix": "", 179 | "prefixFontSize": "50%", 180 | "rangeMaps": [ 181 | { 182 | "from": "null", 183 | "text": "N/A", 184 | "to": "null" 185 | } 186 | ], 187 | "span": 6, 188 | "sparkline": { 189 | "fillColor": "rgba(31, 118, 189, 0.18)", 190 | "full": false, 191 | "lineColor": "rgb(31, 120, 193)", 192 | "show": false 193 | }, 194 | "targets": [ 195 | { 196 | "dsType": "influxdb", 197 | "groupBy": [ 198 | { 199 | "params": [ 200 | "$interval" 201 | ], 202 | "type": "time" 203 | }, 204 | { 205 | "params": [ 206 | "null" 207 | ], 208 | "type": "fill" 209 | } 210 | ], 211 | "measurement": "kubernetes_pod_container", 212 | "policy": "default", 213 | "refId": "A", 214 | "resultFormat": "time_series", 215 | "select": [ 216 | [ 217 | { 218 | "params": [ 219 | "memory_usage_bytes" 220 | ], 221 | "type": "field" 222 | }, 223 | { 224 | "params": [], 225 | "type": "last" 226 | }, 227 | { 228 | "params": [ 229 | 10 230 | ], 231 | "type": "moving_average" 232 | } 233 | ] 234 | ], 235 | "tags": [ 236 | { 237 | "key": "container_name", 238 | "operator": "=", 239 | "value": "deis-nsqd" 240 | } 241 | ] 242 | } 243 | ], 244 | "thresholds": "", 245 | "title": "Memory", 246 | "type": "singlestat", 247 | "valueFontSize": "200%", 248 | "valueMaps": [ 249 | { 250 | "op": "=", 251 | "text": "N/A", 252 | "value": "null" 253 | } 254 | ], 255 | "valueName": "current" 256 | } 257 | ], 258 | "title": "New row" 259 | }, 260 | { 261 | "collapse": false, 262 | "editable": true, 263 | "height": "100px", 264 | "panels": [ 265 | { 266 | "cacheTimeout": null, 267 | "colorBackground": false, 268 | "colorValue": false, 269 | "colors": [ 270 | "rgba(245, 54, 54, 0.9)", 271 | "rgba(237, 129, 40, 0.89)", 272 | "rgba(50, 172, 45, 0.97)" 273 | ], 274 | "datasource": null, 275 | "editable": true, 276 | "error": false, 277 | "format": "none", 278 | "gauge": { 279 | "maxValue": 100, 280 | "minValue": 0, 281 | "show": false, 282 | "thresholdLabels": false, 283 | "thresholdMarkers": true 284 | }, 285 | "id": 4, 286 | "interval": null, 287 | "isNew": true, 288 | "links": [], 289 | "mappingType": 1, 290 | "mappingTypes": [ 291 | { 292 | "name": "value to text", 293 | "value": 1 294 | }, 295 | { 296 | "name": "range to text", 297 | "value": 2 298 | } 299 | ], 300 | "maxDataPoints": 100, 301 | "nullPointMode": "connected", 302 | "nullText": null, 303 | "postfix": "", 304 | "postfixFontSize": "50%", 305 | "prefix": "", 306 | "prefixFontSize": "50%", 307 | "rangeMaps": [ 308 | { 309 | "from": "null", 310 | "text": "N/A", 311 | "to": "null" 312 | } 313 | ], 314 | "span": 6, 315 | "sparkline": { 316 | "fillColor": "rgba(31, 118, 189, 0.18)", 317 | "full": false, 318 | "lineColor": "rgb(31, 120, 193)", 319 | "show": false 320 | }, 321 | "targets": [ 322 | { 323 | "alias": "", 324 | "dsType": "influxdb", 325 | "groupBy": [ 326 | { 327 | "params": [ 328 | "$interval" 329 | ], 330 | "type": "time" 331 | }, 332 | { 333 | "params": [ 334 | "null" 335 | ], 336 | "type": "fill" 337 | } 338 | ], 339 | "measurement": "nsq_channel", 340 | "policy": "default", 341 | "refId": "A", 342 | "resultFormat": "time_series", 343 | "select": [ 344 | [ 345 | { 346 | "params": [ 347 | "client_count" 348 | ], 349 | "type": "field" 350 | }, 351 | { 352 | "params": [], 353 | "type": "mean" 354 | } 355 | ] 356 | ], 357 | "tags": [ 358 | { 359 | "key": "topic", 360 | "operator": "=", 361 | "value": "logs" 362 | } 363 | ] 364 | } 365 | ], 366 | "thresholds": "0", 367 | "title": "Logs consumers", 368 | "type": "singlestat", 369 | "valueFontSize": "200%", 370 | "valueMaps": [ 371 | { 372 | "op": "=", 373 | "text": "N/A", 374 | "value": "null" 375 | } 376 | ], 377 | "valueName": "avg" 378 | }, 379 | { 380 | "cacheTimeout": null, 381 | "colorBackground": false, 382 | "colorValue": false, 383 | "colors": [ 384 | "rgba(245, 54, 54, 0.9)", 385 | "rgba(237, 129, 40, 0.89)", 386 | "rgba(50, 172, 45, 0.97)" 387 | ], 388 | "datasource": null, 389 | "editable": true, 390 | "error": false, 391 | "format": "none", 392 | "gauge": { 393 | "maxValue": 100, 394 | "minValue": 0, 395 | "show": false, 396 | "thresholdLabels": false, 397 | "thresholdMarkers": true 398 | }, 399 | "id": 5, 400 | "interval": null, 401 | "isNew": true, 402 | "links": [], 403 | "mappingType": 1, 404 | "mappingTypes": [ 405 | { 406 | "name": "value to text", 407 | "value": 1 408 | }, 409 | { 410 | "name": "range to text", 411 | "value": 2 412 | } 413 | ], 414 | "maxDataPoints": 100, 415 | "nullPointMode": "connected", 416 | "nullText": null, 417 | "postfix": "", 418 | "postfixFontSize": "50%", 419 | "prefix": "", 420 | "prefixFontSize": "50%", 421 | "rangeMaps": [ 422 | { 423 | "from": "null", 424 | "text": "N/A", 425 | "to": "null" 426 | } 427 | ], 428 | "span": 6, 429 | "sparkline": { 430 | "fillColor": "rgba(31, 118, 189, 0.18)", 431 | "full": false, 432 | "lineColor": "rgb(31, 120, 193)", 433 | "show": false 434 | }, 435 | "targets": [ 436 | { 437 | "alias": "", 438 | "dsType": "influxdb", 439 | "groupBy": [ 440 | { 441 | "params": [ 442 | "$interval" 443 | ], 444 | "type": "time" 445 | }, 446 | { 447 | "params": [ 448 | "null" 449 | ], 450 | "type": "fill" 451 | } 452 | ], 453 | "measurement": "nsq_channel", 454 | "policy": "default", 455 | "refId": "A", 456 | "resultFormat": "time_series", 457 | "select": [ 458 | [ 459 | { 460 | "params": [ 461 | "client_count" 462 | ], 463 | "type": "field" 464 | }, 465 | { 466 | "params": [], 467 | "type": "mean" 468 | } 469 | ] 470 | ], 471 | "tags": [ 472 | { 473 | "key": "topic", 474 | "operator": "=", 475 | "value": "metrics" 476 | } 477 | ] 478 | } 479 | ], 480 | "thresholds": "0", 481 | "title": "Metric consumers", 482 | "type": "singlestat", 483 | "valueFontSize": "200%", 484 | "valueMaps": [ 485 | { 486 | "op": "=", 487 | "text": "N/A", 488 | "value": "null" 489 | } 490 | ], 491 | "valueName": "avg" 492 | } 493 | ], 494 | "title": "New row" 495 | }, 496 | { 497 | "collapse": false, 498 | "editable": true, 499 | "height": "250px", 500 | "panels": [ 501 | { 502 | "aliasColors": {}, 503 | "bars": false, 504 | "datasource": null, 505 | "editable": true, 506 | "error": false, 507 | "fill": 1, 508 | "grid": { 509 | "threshold1": null, 510 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 511 | "threshold2": null, 512 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 513 | }, 514 | "id": 1, 515 | "isNew": true, 516 | "legend": { 517 | "avg": false, 518 | "current": false, 519 | "max": false, 520 | "min": false, 521 | "show": true, 522 | "total": false, 523 | "values": false 524 | }, 525 | "lines": true, 526 | "linewidth": 2, 527 | "links": [], 528 | "nullPointMode": "connected", 529 | "percentage": false, 530 | "pointradius": 5, 531 | "points": false, 532 | "renderer": "flot", 533 | "seriesOverrides": [ 534 | { 535 | "alias": "logs", 536 | "color": "#0A437C" 537 | }, 538 | { 539 | "alias": "metrics", 540 | "color": "#E5AC0E" 541 | } 542 | ], 543 | "span": 12, 544 | "stack": false, 545 | "steppedLine": false, 546 | "targets": [ 547 | { 548 | "alias": "$tag_topic", 549 | "dsType": "influxdb", 550 | "groupBy": [ 551 | { 552 | "params": [ 553 | "$interval" 554 | ], 555 | "type": "time" 556 | }, 557 | { 558 | "params": [ 559 | "topic" 560 | ], 561 | "type": "tag" 562 | }, 563 | { 564 | "params": [ 565 | "null" 566 | ], 567 | "type": "fill" 568 | } 569 | ], 570 | "measurement": "nsq_channel", 571 | "policy": "default", 572 | "refId": "A", 573 | "resultFormat": "time_series", 574 | "select": [ 575 | [ 576 | { 577 | "params": [ 578 | "depth" 579 | ], 580 | "type": "field" 581 | }, 582 | { 583 | "params": [], 584 | "type": "last" 585 | } 586 | ] 587 | ], 588 | "tags": [] 589 | } 590 | ], 591 | "timeFrom": null, 592 | "timeShift": null, 593 | "title": "Topic Message Depth", 594 | "tooltip": { 595 | "msResolution": true, 596 | "shared": true, 597 | "sort": 0, 598 | "value_type": "cumulative" 599 | }, 600 | "type": "graph", 601 | "xaxis": { 602 | "show": true 603 | }, 604 | "yaxes": [ 605 | { 606 | "format": "short", 607 | "label": null, 608 | "logBase": 1, 609 | "max": null, 610 | "min": null, 611 | "show": true 612 | }, 613 | { 614 | "format": "short", 615 | "label": null, 616 | "logBase": 1, 617 | "max": null, 618 | "min": null, 619 | "show": true 620 | } 621 | ] 622 | } 623 | ], 624 | "title": "Row" 625 | }, 626 | { 627 | "collapse": false, 628 | "editable": true, 629 | "height": "250px", 630 | "panels": [ 631 | { 632 | "aliasColors": {}, 633 | "bars": false, 634 | "datasource": null, 635 | "editable": true, 636 | "error": false, 637 | "fill": 1, 638 | "grid": { 639 | "threshold1": null, 640 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 641 | "threshold2": null, 642 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 643 | }, 644 | "id": 6, 645 | "interval": "1s", 646 | "isNew": true, 647 | "legend": { 648 | "avg": false, 649 | "current": false, 650 | "max": false, 651 | "min": false, 652 | "show": true, 653 | "total": false, 654 | "values": false 655 | }, 656 | "lines": true, 657 | "linewidth": 2, 658 | "links": [], 659 | "nullPointMode": "connected", 660 | "percentage": false, 661 | "pointradius": 5, 662 | "points": false, 663 | "renderer": "flot", 664 | "seriesOverrides": [ 665 | { 666 | "alias": "logs", 667 | "color": "#0A437C" 668 | }, 669 | { 670 | "alias": "metrics", 671 | "color": "#E5AC0E" 672 | } 673 | ], 674 | "span": 12, 675 | "stack": false, 676 | "steppedLine": false, 677 | "targets": [ 678 | { 679 | "alias": "$tag_topic", 680 | "dsType": "influxdb", 681 | "groupBy": [ 682 | { 683 | "params": [ 684 | "$interval" 685 | ], 686 | "type": "time" 687 | }, 688 | { 689 | "params": [ 690 | "topic" 691 | ], 692 | "type": "tag" 693 | }, 694 | { 695 | "params": [ 696 | "null" 697 | ], 698 | "type": "fill" 699 | } 700 | ], 701 | "measurement": "nsq_topic", 702 | "policy": "default", 703 | "refId": "A", 704 | "resultFormat": "time_series", 705 | "select": [ 706 | [ 707 | { 708 | "params": [ 709 | "message_count" 710 | ], 711 | "type": "field" 712 | }, 713 | { 714 | "params": [], 715 | "type": "last" 716 | }, 717 | { 718 | "params": [ 719 | "1s" 720 | ], 721 | "type": "non_negative_derivative" 722 | } 723 | ] 724 | ], 725 | "tags": [] 726 | } 727 | ], 728 | "timeFrom": null, 729 | "timeShift": null, 730 | "title": "Messages Per Second / Topic", 731 | "tooltip": { 732 | "msResolution": true, 733 | "shared": true, 734 | "sort": 0, 735 | "value_type": "cumulative" 736 | }, 737 | "type": "graph", 738 | "xaxis": { 739 | "show": true 740 | }, 741 | "yaxes": [ 742 | { 743 | "format": "short", 744 | "label": null, 745 | "logBase": 1, 746 | "max": null, 747 | "min": null, 748 | "show": true 749 | }, 750 | { 751 | "format": "short", 752 | "label": null, 753 | "logBase": 1, 754 | "max": null, 755 | "min": null, 756 | "show": true 757 | } 758 | ] 759 | } 760 | ], 761 | "title": "New row" 762 | } 763 | ], 764 | "time": { 765 | "from": "now-3h", 766 | "to": "now" 767 | }, 768 | "timepicker": { 769 | "refresh_intervals": [ 770 | "5s", 771 | "10s", 772 | "30s", 773 | "1m", 774 | "5m", 775 | "15m", 776 | "30m", 777 | "1h", 778 | "2h", 779 | "1d" 780 | ], 781 | "time_options": [ 782 | "5m", 783 | "15m", 784 | "1h", 785 | "6h", 786 | "12h", 787 | "24h", 788 | "2d", 789 | "7d", 790 | "30d" 791 | ] 792 | }, 793 | "templating": { 794 | "list": [] 795 | }, 796 | "annotations": { 797 | "list": [] 798 | }, 799 | "refresh": "5s", 800 | "schemaVersion": 12, 801 | "version": 0, 802 | "links": [], 803 | "gnetId": null 804 | } 805 | } 806 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/api/dashboards/redis.json: -------------------------------------------------------------------------------- 1 | { 2 | "dashboard": { 3 | "id": null, 4 | "title": "Redis", 5 | "tags": [ 6 | "deis" 7 | ], 8 | "style": "dark", 9 | "timezone": "browser", 10 | "editable": true, 11 | "hideControls": false, 12 | "sharedCrosshair": false, 13 | "rows": [ 14 | { 15 | "collapse": false, 16 | "editable": true, 17 | "height": "200px", 18 | "panels": [ 19 | { 20 | "cacheTimeout": null, 21 | "colorBackground": false, 22 | "colorValue": false, 23 | "colors": [ 24 | "rgba(245, 54, 54, 0.9)", 25 | "rgba(237, 129, 40, 0.89)", 26 | "rgba(50, 172, 45, 0.97)" 27 | ], 28 | "datasource": null, 29 | "editable": true, 30 | "error": false, 31 | "format": "none", 32 | "gauge": { 33 | "maxValue": 100, 34 | "minValue": 0, 35 | "show": false, 36 | "thresholdLabels": false, 37 | "thresholdMarkers": true 38 | }, 39 | "id": 6, 40 | "interval": null, 41 | "isNew": true, 42 | "links": [], 43 | "mappingType": 1, 44 | "mappingTypes": [ 45 | { 46 | "name": "value to text", 47 | "value": 1 48 | }, 49 | { 50 | "name": "range to text", 51 | "value": 2 52 | } 53 | ], 54 | "maxDataPoints": 100, 55 | "nullPointMode": "connected", 56 | "nullText": null, 57 | "postfix": "", 58 | "postfixFontSize": "50%", 59 | "prefix": "", 60 | "prefixFontSize": "50%", 61 | "rangeMaps": [ 62 | { 63 | "from": "null", 64 | "text": "N/A", 65 | "to": "null" 66 | } 67 | ], 68 | "span": 6, 69 | "sparkline": { 70 | "fillColor": "rgba(31, 118, 189, 0.18)", 71 | "full": false, 72 | "lineColor": "rgb(31, 120, 193)", 73 | "show": true 74 | }, 75 | "targets": [ 76 | { 77 | "dsType": "influxdb", 78 | "groupBy": [ 79 | { 80 | "params": [ 81 | "$interval" 82 | ], 83 | "type": "time" 84 | }, 85 | { 86 | "params": [ 87 | "null" 88 | ], 89 | "type": "fill" 90 | } 91 | ], 92 | "measurement": "kubernetes_pod_container", 93 | "policy": "default", 94 | "refId": "A", 95 | "resultFormat": "time_series", 96 | "select": [ 97 | [ 98 | { 99 | "params": [ 100 | "cpu_usage_nanocores" 101 | ], 102 | "type": "field" 103 | }, 104 | { 105 | "params": [], 106 | "type": "last" 107 | }, 108 | { 109 | "params": [ 110 | " / 1000000" 111 | ], 112 | "type": "math" 113 | } 114 | ] 115 | ], 116 | "tags": [ 117 | { 118 | "key": "container_name", 119 | "operator": "=", 120 | "value": "deis-logger-redis" 121 | } 122 | ] 123 | } 124 | ], 125 | "thresholds": "", 126 | "title": "CPU Usage (Millicores)", 127 | "type": "singlestat", 128 | "valueFontSize": "200%", 129 | "valueMaps": [ 130 | { 131 | "op": "=", 132 | "text": "N/A", 133 | "value": "null" 134 | } 135 | ], 136 | "valueName": "avg" 137 | }, 138 | { 139 | "cacheTimeout": null, 140 | "colorBackground": false, 141 | "colorValue": false, 142 | "colors": [ 143 | "rgba(245, 54, 54, 0.9)", 144 | "rgba(237, 129, 40, 0.89)", 145 | "rgba(50, 172, 45, 0.97)" 146 | ], 147 | "datasource": null, 148 | "editable": true, 149 | "error": false, 150 | "format": "bytes", 151 | "gauge": { 152 | "maxValue": 100, 153 | "minValue": 0, 154 | "show": false, 155 | "thresholdLabels": false, 156 | "thresholdMarkers": true 157 | }, 158 | "id": 5, 159 | "interval": null, 160 | "isNew": true, 161 | "links": [], 162 | "mappingType": 1, 163 | "mappingTypes": [ 164 | { 165 | "name": "value to text", 166 | "value": 1 167 | }, 168 | { 169 | "name": "range to text", 170 | "value": 2 171 | } 172 | ], 173 | "maxDataPoints": 100, 174 | "nullPointMode": "connected", 175 | "nullText": null, 176 | "postfix": "", 177 | "postfixFontSize": "50%", 178 | "prefix": "", 179 | "prefixFontSize": "50%", 180 | "rangeMaps": [ 181 | { 182 | "from": "null", 183 | "text": "N/A", 184 | "to": "null" 185 | } 186 | ], 187 | "span": 6, 188 | "sparkline": { 189 | "fillColor": "rgba(31, 118, 189, 0.18)", 190 | "full": false, 191 | "lineColor": "rgb(31, 120, 193)", 192 | "show": false 193 | }, 194 | "targets": [ 195 | { 196 | "dsType": "influxdb", 197 | "groupBy": [ 198 | { 199 | "params": [ 200 | "$interval" 201 | ], 202 | "type": "time" 203 | }, 204 | { 205 | "params": [ 206 | "null" 207 | ], 208 | "type": "fill" 209 | } 210 | ], 211 | "measurement": "kubernetes_pod_container", 212 | "policy": "default", 213 | "refId": "A", 214 | "resultFormat": "time_series", 215 | "select": [ 216 | [ 217 | { 218 | "params": [ 219 | "memory_usage_bytes" 220 | ], 221 | "type": "field" 222 | }, 223 | { 224 | "params": [], 225 | "type": "last" 226 | } 227 | ] 228 | ], 229 | "tags": [ 230 | { 231 | "key": "container_name", 232 | "operator": "=", 233 | "value": "deis-logger-redis" 234 | } 235 | ] 236 | } 237 | ], 238 | "thresholds": "", 239 | "title": "Memory", 240 | "type": "singlestat", 241 | "valueFontSize": "200%", 242 | "valueMaps": [ 243 | { 244 | "op": "=", 245 | "text": "N/A", 246 | "value": "null" 247 | } 248 | ], 249 | "valueName": "current" 250 | } 251 | ], 252 | "title": "New row" 253 | }, 254 | { 255 | "collapse": false, 256 | "editable": true, 257 | "height": "250px", 258 | "panels": [ 259 | { 260 | "cacheTimeout": null, 261 | "colorBackground": false, 262 | "colorValue": false, 263 | "colors": [ 264 | "rgba(245, 54, 54, 0.9)", 265 | "rgba(237, 129, 40, 0.89)", 266 | "rgba(50, 172, 45, 0.97)" 267 | ], 268 | "datasource": null, 269 | "editable": true, 270 | "error": false, 271 | "format": "none", 272 | "gauge": { 273 | "maxValue": 100, 274 | "minValue": 0, 275 | "show": false, 276 | "thresholdLabels": false, 277 | "thresholdMarkers": true 278 | }, 279 | "id": 2, 280 | "interval": null, 281 | "isNew": true, 282 | "links": [], 283 | "mappingType": 1, 284 | "mappingTypes": [ 285 | { 286 | "name": "value to text", 287 | "value": 1 288 | }, 289 | { 290 | "name": "range to text", 291 | "value": 2 292 | } 293 | ], 294 | "maxDataPoints": 100, 295 | "nullPointMode": "connected", 296 | "nullText": null, 297 | "postfix": "", 298 | "postfixFontSize": "50%", 299 | "prefix": "", 300 | "prefixFontSize": "50%", 301 | "rangeMaps": [ 302 | { 303 | "from": "null", 304 | "text": "N/A", 305 | "to": "null" 306 | } 307 | ], 308 | "span": 6, 309 | "sparkline": { 310 | "fillColor": "rgba(31, 118, 189, 0.18)", 311 | "full": false, 312 | "lineColor": "rgb(31, 120, 193)", 313 | "show": false 314 | }, 315 | "targets": [ 316 | { 317 | "dsType": "influxdb", 318 | "groupBy": [ 319 | { 320 | "params": [ 321 | "$interval" 322 | ], 323 | "type": "time" 324 | }, 325 | { 326 | "params": [ 327 | "null" 328 | ], 329 | "type": "fill" 330 | } 331 | ], 332 | "measurement": "redis", 333 | "policy": "default", 334 | "refId": "A", 335 | "resultFormat": "time_series", 336 | "select": [ 337 | [ 338 | { 339 | "params": [ 340 | "clients" 341 | ], 342 | "type": "field" 343 | }, 344 | { 345 | "params": [], 346 | "type": "last" 347 | } 348 | ] 349 | ], 350 | "tags": [] 351 | } 352 | ], 353 | "thresholds": "", 354 | "title": "Connected Clients", 355 | "type": "singlestat", 356 | "valueFontSize": "200%", 357 | "valueMaps": [ 358 | { 359 | "op": "=", 360 | "text": "N/A", 361 | "value": "null" 362 | } 363 | ], 364 | "valueName": "avg" 365 | }, 366 | { 367 | "aliasColors": {}, 368 | "bars": false, 369 | "datasource": null, 370 | "editable": true, 371 | "error": false, 372 | "fill": 1, 373 | "grid": { 374 | "threshold1": null, 375 | "threshold1Color": "rgba(216, 200, 27, 0.27)", 376 | "threshold2": null, 377 | "threshold2Color": "rgba(234, 112, 112, 0.22)" 378 | }, 379 | "id": 4, 380 | "interval": "1s", 381 | "isNew": true, 382 | "legend": { 383 | "avg": false, 384 | "current": false, 385 | "max": false, 386 | "min": false, 387 | "show": false, 388 | "total": false, 389 | "values": false 390 | }, 391 | "lines": true, 392 | "linewidth": 2, 393 | "links": [], 394 | "nullPointMode": "connected", 395 | "percentage": false, 396 | "pointradius": 5, 397 | "points": false, 398 | "renderer": "flot", 399 | "seriesOverrides": [], 400 | "span": 6, 401 | "stack": false, 402 | "steppedLine": false, 403 | "targets": [ 404 | { 405 | "dsType": "influxdb", 406 | "groupBy": [ 407 | { 408 | "params": [ 409 | "$interval" 410 | ], 411 | "type": "time" 412 | }, 413 | { 414 | "params": [ 415 | "null" 416 | ], 417 | "type": "fill" 418 | } 419 | ], 420 | "measurement": "redis", 421 | "policy": "default", 422 | "refId": "A", 423 | "resultFormat": "time_series", 424 | "select": [ 425 | [ 426 | { 427 | "params": [ 428 | "instantaneous_ops_per_sec" 429 | ], 430 | "type": "field" 431 | }, 432 | { 433 | "params": [], 434 | "type": "last" 435 | } 436 | ] 437 | ], 438 | "tags": [] 439 | } 440 | ], 441 | "timeFrom": null, 442 | "timeShift": null, 443 | "title": "Ops Per Second", 444 | "tooltip": { 445 | "msResolution": true, 446 | "shared": true, 447 | "sort": 0, 448 | "value_type": "cumulative" 449 | }, 450 | "type": "graph", 451 | "xaxis": { 452 | "show": true 453 | }, 454 | "yaxes": [ 455 | { 456 | "format": "ops", 457 | "label": null, 458 | "logBase": 1, 459 | "max": null, 460 | "min": null, 461 | "show": true 462 | }, 463 | { 464 | "format": "short", 465 | "label": null, 466 | "logBase": 1, 467 | "max": null, 468 | "min": null, 469 | "show": true 470 | } 471 | ] 472 | } 473 | ], 474 | "title": "Row" 475 | } 476 | ], 477 | "time": { 478 | "from": "now-3h", 479 | "to": "now" 480 | }, 481 | "timepicker": { 482 | "refresh_intervals": [ 483 | "5s", 484 | "10s", 485 | "30s", 486 | "1m", 487 | "5m", 488 | "15m", 489 | "30m", 490 | "1h", 491 | "2h", 492 | "1d" 493 | ], 494 | "time_options": [ 495 | "5m", 496 | "15m", 497 | "1h", 498 | "6h", 499 | "12h", 500 | "24h", 501 | "2d", 502 | "7d", 503 | "30d" 504 | ] 505 | }, 506 | "templating": { 507 | "list": [] 508 | }, 509 | "annotations": { 510 | "list": [] 511 | }, 512 | "refresh": "5s", 513 | "schemaVersion": 12, 514 | "version": 0, 515 | "links": [], 516 | "gnetId": null 517 | } 518 | } 519 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/grafana.ini.tpl: -------------------------------------------------------------------------------- 1 | #################### Grafana Configuration Example ##################### 2 | # 3 | # Everything has defaults so you only need to uncomment things you want to 4 | # change 5 | 6 | # possible values : production, development 7 | app_mode = {{ default "development" .APP_MODE }} 8 | 9 | #################################### Paths #################################### 10 | [paths] 11 | # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) 12 | # 13 | data = {{ default "/var/lib/grafana" .DATA_PATH }} 14 | 15 | # 16 | # Directory where grafana can store logs 17 | # 18 | logs = {{ default "/var/log" .LOG_PATH }} 19 | 20 | # 21 | # Directory where grafana will automatically scan and look for plugins 22 | # 23 | plugins = {{ default "/var/lib/grafana/plugins" .PLUGINS_PATH }} 24 | 25 | #################################### Server #################################### 26 | [server] 27 | # Protocol (http or https) 28 | protocol = {{ default "http" .SERVER_PROTOCOL }} 29 | 30 | # The ip address to bind to, empty will bind to all interfaces 31 | http_addr = {{ default "" .BIND_ADDRESS}} 32 | # The http port to use 33 | http_port = {{ default "3000" .BIND_PORT }} 34 | 35 | # The public facing domain name used to access grafana from a browser 36 | domain = {{ default "localhost" .DOMAIN }} 37 | 38 | # Redirect to correct domain if host header does not match domain 39 | # Prevents DNS rebinding attacks 40 | enforce_domain = {{ default "false" .ENFORCE_DOMAIN }} 41 | 42 | # The full public facing url 43 | root_url = {{ default "%(protocol)s://%(domain)s:%(http_port)s/" .ROOT_URL }} 44 | 45 | # Log web requests 46 | router_logging = {{ default "false" .ROUTER_LOGGING }} 47 | 48 | # the path relative working path 49 | static_root_path = {{ default "public" .STATIC_ROOT_PATH }} 50 | 51 | # enable gzip 52 | enable_gzip = {{ default "false" .ENABLE_GZIP }} 53 | 54 | # https certs & key file 55 | {{ if .CERT_FILE }} 56 | cert_file = {{ .CERT_FILE }} 57 | {{ end }} 58 | {{ if .CERT_KEY }} 59 | cert_key = {{ .CERT_KEY }} 60 | {{ end }} 61 | 62 | #################################### Database #################################### 63 | [database] 64 | # Either "mysql", "postgres" or "sqlite3", it's your choice 65 | {{ if .DATABASE_TYPE }} 66 | type = {{ .DATABASE_TYPE }} 67 | {{ end }} 68 | {{ if .DATABASE_HOST }} 69 | host = {{ .DATABASE_HOST }} 70 | {{ end }} 71 | {{ if .DATABASE_NAME }} 72 | name = {{ .DATABASE_NAME }} 73 | {{ end }} 74 | {{ if .DATABASE_USER }} 75 | user = {{ .DATABASE_USER }} 76 | {{ end }} 77 | {{ if .DATABASE_PASSWORD }} 78 | password = {{ .DATABASE_PASSWORD }} 79 | {{ end }} 80 | 81 | # For "postgres" only, either "disable", "require" or "verify-full" 82 | {{ if .DATABASE_SSL_MODE }} 83 | ssl_mode = {{ .DATABASE_SSL_MODE }} 84 | {{ end }} 85 | 86 | # For "sqlite3" only, path relative to data_path setting 87 | {{ if .DATABASE_PATH }} 88 | path = {{ .DATABASE_PATH }} 89 | {{ end }} 90 | 91 | #################################### Session #################################### 92 | [session] 93 | # Either "memory", "file", "redis", "mysql", "postgres", default is "file" 94 | provider = {{ default "file" .SESSION_PROVIDER }} 95 | 96 | # Provider config options 97 | # memory: not have any config yet 98 | # file: session dir path, is relative to grafana data_path 99 | # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana` 100 | # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name` 101 | # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable 102 | {{ if .SESSION_PROVIDER_CONFIG }} 103 | provider_config = {{ .SESSION_PROVIDER_CONFIG }} 104 | {{ end }} 105 | 106 | # Session cookie name 107 | cookie_name = {{ default "grafana_sess" .SESSION_COOKIE_NAME }} 108 | 109 | # If you use session in https only, default is false 110 | cookie_secure = {{ default "false" .SESSION_COOKIE_SECURE }} 111 | 112 | # Session life time, default is 86400 113 | session_life_time = {{ default "86400" .SESSION_LIFE_TIME }} 114 | 115 | #################################### Analytics #################################### 116 | [analytics] 117 | # Server reporting, sends usage counters to stats.grafana.org every 24 hours. 118 | # No ip addresses are being tracked, only simple counters to track 119 | # running instances, dashboard and error counts. It is very helpful to us. 120 | # Change this option to false to disable reporting. 121 | reporting_enabled = {{ default "false" .GRAFANA_REPORTING }} 122 | 123 | # Google Analytics universal tracking code, only enabled if you specify an id here 124 | {{ if .GOOGLE_ANALYTICS_UA_ID }} 125 | google_analytics_ua_id = {{ .GOOGLE_ANALYTICS_UA_ID }} 126 | {{ end }} 127 | 128 | #################################### Security #################################### 129 | [security] 130 | # default admin user, created on startup 131 | admin_user = {{ default "admin" .DEFAULT_USER }} 132 | 133 | # default admin password, can be changed before first start of grafana, or in profile settings 134 | admin_password = {{ default "admin" .DEFAULT_USER_PASSWORD }} 135 | 136 | # used for signing 137 | secret_key = {{ default "SW2YcwTIb9zpOOhoPsMm" .SECRET_KEY }} 138 | 139 | # Auto-login remember days 140 | login_remember_days = {{ default "7" .LOGIN_REMEMBER_DAYS }} 141 | cookie_username = {{ default "grafana_user" .COOKIE_USERNAME }} 142 | cookie_remember_name = {{ default "grafana_remember" .COOKIE_REMEMBER_NAME }} 143 | 144 | # disable gravatar profile images 145 | disable_gravatar = {{ default "false" .DISABLE_GRAVATAR }} 146 | 147 | # data source proxy whitelist (ip_or_domain:port seperated by spaces) 148 | {{ if .DATASOURCE_PROXY_WHITELIST }} 149 | data_source_proxy_whitelist = {{ .DATA_SOURCE_PROXY_WHITELIST }} 150 | {{ end }} 151 | 152 | #################################### Users #################################### 153 | [users] 154 | # disable user signup / registration 155 | allow_sign_up = {{ default "true" .ALLOW_SIGN_UP }} 156 | 157 | # Allow non admin users to create organizations 158 | allow_org_create = {{ default "true" .ALLOW_ORG_CREATE }} 159 | 160 | # Set to true to automatically assign new users to the default organization (id 1) 161 | auto_assign_org = {{ default "true" .AUTO_ASSIGN_ORG }} 162 | 163 | # Default role new users will be automatically assigned (if disabled above is set to true) 164 | auto_assign_org_role = {{ default "Viewer" .AUTO_ASSIGN_ORG_ROLE }} 165 | 166 | # Background text for the user field on the login page 167 | login_hint = {{ default "email or username" .LOGIN_HINT }} 168 | 169 | #################################### Anonymous Auth ########################## 170 | [auth.anonymous] 171 | # enable anonymous access 172 | enabled = {{ default "false" .ANON_ACCESS }} 173 | 174 | # specify organization name that should be used for unauthenticated users 175 | org_name = {{ default "Main Org." .ORG_NAME }} 176 | 177 | # specify role for unauthenticated users 178 | org_role = {{ default "Viewer" .UNAUTHED_USER_ORG_ROLE }} 179 | 180 | #################################### Github Auth ########################## 181 | [auth.github] 182 | {{ if .GITHUB_AUTH }} 183 | enabled = {{ .GITHUB_AUTH }} 184 | allow_sign_up = {{ default "false" .GITHUB_AUTH_ALLOW_SIGN_UP }} 185 | client_id = {{ .GITHUB_AUTH_CLIENT_ID }} 186 | client_secret = {{ .GITHUB_AUTH_CLIENT_SECRET }} 187 | scopes = {{ default "user:email,read:org" .GITHUB_AUTH_SCOPES }} 188 | auth_url = {{ default "https://github.com/login/oauth/authorize" .GITHUB_AUTH_URL }} 189 | token_url = {{ default "https://github.com/login/oauth/access_token" .GITHUB_AUTH_TOKEN_URL }} 190 | api_url = {{ default "https://api.github.com/user" .GITHUB_AUTH_API_URL }} 191 | team_ids = {{ default "" .GITHUB_AUTH_TEAM_IDS }} 192 | allowed_organizations = {{ default "" .GITHUB_AUTH_ALLOWED_ORGS}} 193 | {{ end }} 194 | 195 | #################################### Google Auth ########################## 196 | [auth.google] 197 | {{ if .GOOGLE_AUTH }} 198 | enabled = {{ .GOOGLE_AUTH }} 199 | allow_sign_up = {{ default "false" .GOOGLE_AUTH_ALLOW_SIGN_UP }} 200 | client_id = {{ .GOOGLE_AUTH_CLIENT_ID }} 201 | client_secret = {{ .GOOGLE_AUTH_CLIENT_SECRET }} 202 | scopes = {{ default "https://www.googleapis.com/auth/userinfo.profile ttps://www.googleapis.com/auth/userinfo.email" .GOOGLE_AUTH_SCOPES }} 203 | auth_url = {{ default "https://accounts.google.com/o/oauth2/auth" .GOOGLE_AUTH_URL }} 204 | token_url = {{ default "https://accounts.google.com/o/oauth2/token" .GOOGLE_AUTH_TOKEN_URL }} 205 | api_url = {{ default "https://www.googleapis.com/oauth2/v1/userinfo" .GOOGLE_AUTH_API_URL }} 206 | allowed_domains = {{ default "" .GOOGLE_AUTH_ALLOWED_DOMAINS }} 207 | {{ end }} 208 | 209 | #################################### Auth Proxy ########################## 210 | [auth.proxy] 211 | {{ if .AUTH_PROXY }} 212 | enabled = {{ .AUTH_PROXY }} 213 | header_name = {{ default "X-WEBAUTH-USER" .AUTH_HEADER_NAME }} 214 | header_property = {{ default "username" .AUTH_HEADER_PROPERTY }} 215 | auto_sign_up = {{ default "true" .AUTH_AUTO_SIGN_UP }} 216 | {{ end }} 217 | 218 | #################################### Basic Auth ########################## 219 | [auth.basic] 220 | enabled = {{ default "true" .BASIC_AUTH }} 221 | 222 | #################################### Auth LDAP ########################## 223 | [auth.ldap] 224 | {{ if .LDAP_AUTH }} 225 | enabled = {{ .LDAP_AUTH }} 226 | config_file = {{ default "/etc/grafana/ldap.toml" .LDAP_AUTH_CONFIG_FILE }} 227 | {{ end }} 228 | 229 | #################################### SMTP / Emailing ########################## 230 | [smtp] 231 | {{ if .SMTP }} 232 | enabled = {{ .SMTP }} 233 | host = {{ .SMTP_HOST }} 234 | user = {{ .SMTP_USER }} 235 | password = {{ .SMTP_PASSWORD }} 236 | cert_file = {{ .SMTP_CERT_FILE }} 237 | key_file = {{ .SMTP_KEY_FILE }} 238 | skip_verify = {{ default "false" .SMTP_SKIP_VERIFY }} 239 | from_address = {{ default "admin@grafana.localhost" .SMTP_FROM_ADDRESS }} 240 | {{ end }} 241 | 242 | [emails] 243 | welcome_email_on_sign_up = {{ default "false" .WELCOME_EMAIL }} 244 | 245 | #################################### Logging ########################## 246 | [log] 247 | # Either "console", "file", default is "console" 248 | # Use comma to separate multiple modes, e.g. "console, file" 249 | mode = {{ default "console" .LOG_MODE }} 250 | 251 | # Buffer length of channel, keep it as it is if you don't know what it is. 252 | buffer_len = {{ default "10000" .BUFFER_LENGTH }} 253 | 254 | # Either "Trace", "Debug", "Info", "Warn", "Error", "Critical", default is "Trace" 255 | level = {{ default "Info" .LOG_LEVEL }} 256 | 257 | # For "console" mode only 258 | [log.console] 259 | level = {{ default "Info" .LOG_LEVEL_CONSOLE }} 260 | 261 | # For "file" mode only 262 | [log.file] 263 | level = {{ default "Info" .LOG_LEVEL_FILE }} 264 | # This enables automated log rotate(switch of following options), default is true 265 | log_rotate = {{ default "true" .LOG_ROTATE }} 266 | 267 | # Max line number of single file, default is 1000000 268 | max_lines = {{ default "1000000" .LOG_MAX_LINES }} 269 | 270 | # Max size shift of single file, default is 28 means 1 << 28, 256MB 271 | max_lines_shift = {{ default "28" .LOG_MAX_LINES_SHIFT }} 272 | 273 | # Segment log daily, default is true 274 | daily_rotate = {{ default "true" .LOG_DAILY_ROTATE }} 275 | 276 | # Expired days of log file(delete after max days), default is 7 277 | max_days = {{ default "7" .LOG_MAX_DAYS }} 278 | 279 | #################################### AMPQ Event Publisher ########################## 280 | [event_publisher] 281 | {{ if .AMQP_PUBLISHER }} 282 | enabled = {{ .AMQP_PUBLISHER }} 283 | rabbitmq_url = {{ .AMQP_PUBLISHER_HOST }} 284 | exchange = {{ .AMQP_PUBLISHER_EXCHANGE }} 285 | {{ end }} 286 | 287 | ;#################################### Dashboard JSON files ########################## 288 | [dashboards.json] 289 | enabled = {{ default "true" .DASHBOARD_JSON }} 290 | path = {{ default "/usr/share/grafana/dashboards" .DASHBOARD_JSON_PATH }} 291 | -------------------------------------------------------------------------------- /grafana/rootfs/usr/share/grafana/start-grafana: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Some of the contents of this file came from here - https://github.com/kubernetes/heapster/blob/ed5baadf04ea9f8e48fc7d44dad63a63af34ff9b/grafana/run.sh 4 | HEADER_CONTENT_TYPE="Content-Type: application/json" 5 | HEADER_ACCEPT="Accept: application/json" 6 | 7 | GRAFANA_USER=${DEFAULT_USER:-admin} 8 | GRAFANA_PASSWD=${DEFAULT_USER_PASSWORD:-admin} 9 | GRAFANA_PORT=${BIND_PORT:-3000} 10 | 11 | INFLUXDB_HOST=${DEIS_MONITOR_INFLUXAPI_SERVICE_HOST:-"deis-monitor-influxapi.deis.svc.cluster.local"} 12 | INFLUXDB_PORT=${DEIS_MONITOR_INFLUXAPI_SERVICE_PORT_TRANSPORT:-8086} 13 | INFLUXDB_DATABASE=${INFLUXDB_DATABASE:-kubernetes} 14 | INFLUXDB_USER=${INFLUXDB_USER:-admin} 15 | INFLUXDB_PASSWORD=${INFLUXDB_PASSWORD:-admin} 16 | 17 | DASHBOARD_LOCATION=${DASHBOARD_JSON_PATH:-"/usr/share/grafana/api/dashboards"} 18 | # Create the dashboards directory 19 | mkdir /usr/share/grafana/dashboards 20 | 21 | echo "Building grafana.ini!" 22 | ./envtpl -in grafana.ini.tpl >> grafana.ini 23 | echo "Finished building grafana config..." 24 | echo "###########################################" 25 | echo "###########################################" 26 | cat /usr/share/grafana/grafana.ini 27 | echo "###########################################" 28 | echo "###########################################" 29 | 30 | GF_PATHS_PLUGINS=${PLUGINS_PATH:-"/var/lib/grafana/plugins"} 31 | if [ ! -z "${GF_INSTALL_PLUGINS}" ]; then 32 | echo "Installing Grafana plugins..." 33 | OLDIFS=$IFS 34 | IFS=',' 35 | for plugin in ${GF_INSTALL_PLUGINS}; do 36 | echo "Installing ${plugin} ..." 37 | grafana-cli --pluginsDir "${GF_PATHS_PLUGINS}" plugins install "${plugin}" 38 | echo "" 39 | echo "Done installing ${plugin}" 40 | done 41 | IFS=$OLDIFS 42 | fi 43 | 44 | set -m 45 | echo "Starting Grafana in the background" 46 | exec /usr/sbin/grafana-server -config /usr/share/grafana/grafana.ini -homepath /usr/share/grafana & 47 | echo "Waiting for Grafana to come up..." 48 | until curl -q --fail --output /dev/null --silent "http://${GRAFANA_USER}:${GRAFANA_PASSWD}@localhost:${GRAFANA_PORT}/api/org"; do 49 | printf "." 50 | sleep 2 51 | done 52 | echo "Grafana is up and running." 53 | 54 | # Allow access to dashboards without having to log in 55 | export GF_AUTH_ANONYMOUS_ENABLED=true 56 | export GF_SERVER_HTTP_PORT=${GRAFANA_PORT} 57 | 58 | BACKEND_ACCESS_MODE=${BACKEND_ACCESS_MODE:-proxy} 59 | INFLUXDB_SERVICE_URL=${INFLUXDB_SERVICE_URL} 60 | if [ -n "$INFLUXDB_SERVICE_URL" ]; then 61 | echo "Influxdb service URL is provided." 62 | else 63 | INFLUXDB_SERVICE_URL="http://${INFLUXDB_HOST}:${INFLUXDB_PORT}" 64 | fi 65 | 66 | echo "Using the following URL for InfluxDB: ${INFLUXDB_SERVICE_URL}" 67 | echo "Using the following backend access mode for InfluxDB: ${BACKEND_ACCESS_MODE}" 68 | 69 | echo "Creating default influxdb datasource..." 70 | curl -i -XPOST -H "${HEADER_ACCEPT}" -H "${HEADER_CONTENT_TYPE}" "http://${GRAFANA_USER}:${GRAFANA_PASSWD}@localhost:${GRAFANA_PORT}/api/datasources" -d ' 71 | { 72 | "name": "influxdb-datasource", 73 | "type": "influxdb", 74 | "access": "'"${BACKEND_ACCESS_MODE}"'", 75 | "isDefault": true, 76 | "url": "'"${INFLUXDB_SERVICE_URL}"'", 77 | "password": "'"${INFLUXDB_PASSWORD}"'", 78 | "user": "'"${INFLUXDB_USER}"'", 79 | "database": "'"${INFLUXDB_DATABASE}"'" 80 | }' 81 | 82 | echo "" 83 | echo "Importing default dashboards..." 84 | for filename in ${DASHBOARD_LOCATION}/*.json; do 85 | echo "Importing ${filename} ..." 86 | curl -i -XPOST --data "@${filename}" -H "${HEADER_ACCEPT}" -H "${HEADER_CONTENT_TYPE}" "http://${GRAFANA_USER}:${GRAFANA_PASSWD}@localhost:${GRAFANA_PORT}/api/dashboards/db" 87 | echo "" 88 | echo "Done importing ${filename}" 89 | done 90 | 91 | echo "Bringing Grafana back to the foreground" 92 | fg 93 | -------------------------------------------------------------------------------- /includes.mk: -------------------------------------------------------------------------------- 1 | .PHONY: check-docker 2 | check-docker: 3 | @if [ -z $$(which docker) ]; then \ 4 | echo "Missing \`docker\` client which is required for development"; \ 5 | exit 2; \ 6 | fi 7 | 8 | .PHONY: check-kubectl 9 | check-kubectl: 10 | @if [ -z $$(which kubectl) ]; then \ 11 | echo "Missing \`kubectl\` client which is required for development"; \ 12 | exit 2; \ 13 | fi 14 | -------------------------------------------------------------------------------- /influxdb/Makefile: -------------------------------------------------------------------------------- 1 | SHORT_NAME ?= influxdb 2 | SHELL_SCRIPTS = rootfs/home/influxdb/start-influx 3 | 4 | include ../default.mk 5 | -------------------------------------------------------------------------------- /influxdb/README.md: -------------------------------------------------------------------------------- 1 | # InfluxDB 2 | [![Docker Repository on Quay](https://quay.io/repository/deisci/influxdb/status "Docker Repository on Quay")](https://quay.io/repository/deisci/influxdb) 3 | 4 | ## Configuration 5 | 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. 6 | 7 | ## Development 8 | The provided `Makefile` has various targets to help support building and publishing new images into a kubernetes cluster. 9 | 10 | ### Environment variables 11 | There are a few key environment variables you should be aware of when interacting with the `make` targets. 12 | 13 | * `BUILD_TAG` - The tag provided to the docker image when it is built (defaults to the git-sha) 14 | * `SHORT_NAME` - The name of the image (defaults to `grafana`) 15 | * `DEIS_REGISTRY` - This is the registry you are using (default `dockerhub`) 16 | * `IMAGE_PREFIX` - This is the account for the registry you are using (default `deis`) 17 | 18 | ### Make targets 19 | 20 | * `make build` - Build docker image 21 | * `make push` - Push docker image to a registry 22 | * `make upgrade` - Replaces the running grafana instance with a new one 23 | 24 | The typical workflow will look something like this - `DEIS_REGISTRY=quay.io/ IMAGE_PREFIX=foouser make build push upgrade` 25 | 26 | ### Accessing Admin UI 27 | 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`. 28 | -------------------------------------------------------------------------------- /influxdb/rootfs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/deis/base:v0.3.6 2 | 3 | RUN adduser --system \ 4 | --shell /bin/bash \ 5 | --disabled-password \ 6 | --home /home/influxdb \ 7 | --group \ 8 | influxdb 9 | 10 | COPY . / 11 | 12 | RUN curl -SL -o /home/influxdb/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ 13 | && chmod +x /home/influxdb/envtpl \ 14 | && curl -SL -o /tmp/influxdb.deb https://dl.influxdata.com/influxdb/releases/influxdb_1.1.1_amd64.deb \ 15 | && dpkg -i /tmp/influxdb.deb \ 16 | && rm /tmp/influxdb.deb \ 17 | && mkdir -p /data \ 18 | && chown influxdb:influxdb /data \ 19 | && chown -R influxdb:influxdb /home/influxdb \ 20 | && chmod +x /home/influxdb/start-influx 21 | 22 | VOLUME /data 23 | 24 | USER influxdb 25 | WORKDIR /home/influxdb 26 | CMD ["./start-influx"] 27 | 28 | # Expose the admin port 29 | EXPOSE 8083 30 | # Expose the ssl http api port 31 | EXPOSE 8084 32 | # Expose the http api port 33 | EXPOSE 8086 34 | -------------------------------------------------------------------------------- /influxdb/rootfs/home/influxdb/config.toml.tpl: -------------------------------------------------------------------------------- 1 | reporting-disabled = {{ default false .REPORTING_DISABLED }} 2 | dir = {{ default "" .DIR | quote }} 3 | bind-address = {{ default ":8088" .BIND_ADDRESS | quote }} 4 | 5 | [meta] 6 | enabled = {{ default true .META_ENABLED }} 7 | dir = {{ default "/data/meta" .META_DIR | quote }} 8 | bind-address = {{ default ":8088" .META_BIND_ADDRESS | quote }} 9 | http-bind-address = {{ default ":8091" .META_HTTP_BIND_ADDRESS | quote }} 10 | https-enabled = {{ default false .META_HTTPS_ENABLED }} 11 | https-certificate = {{ default "" .META_HTTPS_CERTIFICATE | quote }} 12 | retention-autocreate = {{ default true .META_RETENTION_AUTOCREATE }} 13 | election-timeout = {{ default "1s" .META_ELECTION_TIMEOUT | quote }} 14 | heartbeat-timeout = {{ default "1s" .META_HEARTBEAT_TIMEOUT | quote }} 15 | leader-lease-timeout = {{ default "500ms" .META_LEADER_LEASE_TIMEOUT | quote }} 16 | commit-timeout = {{ default "50ms" .META_COMMIT_TIMEOUT | quote }} 17 | cluster-tracing = {{ default false .META_CLUSTER_TRACING }} 18 | raft-promotion-enabled = {{ default true .META_RAFT_PROMOTION_ENABLED }} 19 | logging-enabled = {{ default false .META_LOGGING.ENABLED }} 20 | pprof-enabled = {{ default false .META_PPROF_ENABLED }} 21 | lease-duration = {{ default "1m0s" .META_LEASE_DURATION | quote }} 22 | 23 | [data] 24 | enabled = {{ default true .DATA_ENABLED }} 25 | dir = {{ default "/data/db" .DATA_DIR | quote }} 26 | engine = {{ default "tsm1" .DATA_ENGINE | quote }} 27 | max-wal-size = {{ default 104857600 .DATA_MAX_WAL_SIZE }} 28 | wal-flush-interval = {{ default "10m0s" .DATA_WAL_FLUSH_INTERVAL | quote }} 29 | wal-partition-flush-delay = {{ default "2s" .DATA_WAL_PARTITION_FLUSH_DELAY | quote }} 30 | wal-dir = {{ default "/data/db/wal" .DATA_WAL_DIR | quote }} 31 | wal-logging-enabled = {{ default false .DATA_WAL_LOGGING_ENABLED }} 32 | wal-ready-series-size = {{ default 30720 .DATA_WAL_READY_SERIES_SIZE }} 33 | wal-compaction-threshold = {{ default 0.5 .DATA_WAL_COMPACTION_THRESHOLD }} 34 | wal-max-series-size = {{ default 1048576 .DATA_WAL_MAX_SERIES_SIZE }} 35 | wal-flush-cold-interval = {{ default "5s" .DATA_WAL_FLUSH_COLD_INTERVAL | quote }} 36 | wal-partition-size-threshold = {{ default 52428800 .DATA_WAL_PARTITION_SIZE_THRESHOLD }} 37 | query-log-enabled = {{ default false .DATA_QUERY_LOG_ENABLED }} 38 | cache-max-memory-size = {{ default 1048576000 .DATA_CACHE_MAX_MEMORY_SIZE }} 39 | cache-snapshot-memory-size = {{ default 26214400 .DATA_CACHE_SNAPSHOT_MEMORY_SIZE }} 40 | cache-snapshot-write-cold-duration = {{ default "10m0s" .DATA_CACHE_SNAPSHOT_WRITE_COLD_DURATION | quote }} 41 | compact-full-write-cold-duration = {{ default "4h0m0s" .DATA_COMPACT_FULL_WRITE_COLD_DURATION | quote }} 42 | max-points-per-block = {{ default 0 .DATA_MAX_POINTS_PER_BLOCK }} 43 | data-logging-enabled = {{ default false .DATA_LOGGING_ENABLED }} 44 | 45 | [cluster] 46 | force-remote-mapping = {{ default false .CLUSTER_FORCE_REMOTE_MAPPING }} 47 | write-timeout = {{ default "5s" .CLUSTER_WRITE_TIMEOUT | quote }} 48 | shard-writer-timeout = {{ default "5s" .CLUSTER_SHARD_WRITER_TIMEOUT | quote }} 49 | shard-mapper-timeout = {{ default "5s" .CLUSTER_SHARD_MAPPER_TIMEOUT | quote }} 50 | 51 | [retention] 52 | enabled = {{ default true .RETENTION_ENABLED }} 53 | check-interval = {{ default "30m0s" .CHECK_INTERVAL | quote }} 54 | 55 | [shard-precreation] 56 | enabled = {{ default true .SHARD_PRECREATION_ENABLED }} 57 | check-interval = {{ default "10m0s" .SHARD_PRECREATION_CHECK_INTERVAL | quote }} 58 | advance-period = {{ default "30m0s" .SHARD_PRECREATION_ADVANCE_PERIOD | quote }} 59 | 60 | [admin] 61 | enabled = {{ default false .ADMIN_ENABLED }} 62 | bind-address = {{ default ":8083" .ADMIN_BIND_ADDRESS | quote }} 63 | https-enabled = {{ default false .ADMIN_HTTPS_ENABLED }} 64 | https-certificate = {{ default "/etc/ssl/influxdb.pem" .ADMIN_HTTPS_CERTIFICATE | quote }} 65 | 66 | [monitor] 67 | store-enabled = {{ default true .MONITOR_STORE_ENABLED }} 68 | store-database = {{ default "_internal" .MONITOR_STORE_DATABASE | quote }} 69 | store-interval = {{ default "10s" .MONITOR_STORE_INTERVAL | quote }} 70 | 71 | [subscriber] 72 | enabled = {{ default true .SUBSCRIBER_ENABLED }} 73 | 74 | [http] 75 | enabled = {{ default true .HTTP_ENABLED }} 76 | bind-address = {{ default ":8086" .HTTP_BIND_ADDRESS | quote }} 77 | auth-enabled = {{ default false .HTTP_AUTH_ENABLED }} 78 | log-enabled = {{ default false .HTTP_LOG_ENABLED }} 79 | write-tracing = {{ default false .HTTP_WRITE_TRACING }} 80 | pprof-enabled = {{ default false .HTTP_PPROF_ENABLED }} 81 | https-enabled = {{ default false .HTTP_HTTPS_ENABLED }} 82 | https-certificate = {{ default "/etc/ssl/influxdb.pem" .HTTP_HTTPS_CERTIFICATE | quote }} 83 | 84 | 85 | [continuous_queries] 86 | log-enabled = {{ default false .CONTINUOUS_QUERIES_LOG_ENABLED }} 87 | enabled = {{ default true .CONTINUOUS_QUERIES_ENABLED }} 88 | run-interval = {{ default "1s" .CONTINUOUS_QUERIES_RUN_INTERVAL | quote }} 89 | 90 | [hinted-handoff] 91 | enabled = {{ default true .HINTED_HANDOFF_ENABLED}} 92 | dir = {{ default "/home/influxdb/.influxdb/hh" .HINTED_HANDOFF_DIR | quote }} 93 | max-size = {{ default 1073741824 .HINTED_HANDOFF_MAX_SIZE }} 94 | max-age = {{ default "168h0m0s" .HINTED_HANDOFF_MAX_AGE | quote }} 95 | retry-rate-limit = {{ default 0 .HINTED_HANDOFF_RETRY_RATE_LIMIT }} 96 | retry-interval = {{ default "1s" .HINTED_HANDOFF_RETRY_INTERVAL | quote }} 97 | retry-max-interval = {{ default "1m0s" .HINTED_HANDOFF_RETRY_MAX_INTERVAL | quote }} 98 | purge-interval = {{ default "1h0m0s" .HINTED_HANDOFF_PURGE_INTERVAL | quote }} 99 | 100 | [[graphite]] 101 | enabled = {{ default false .GRAPHITE_ENABLED }} 102 | bind-address = {{ default ":2003" .GRAPHITE_BIND_ADDRESS | quote }} 103 | protocol = {{ default "tcp" .GRAPHITE_PROTOCOL | quote }} 104 | consistency-level = {{ default "one" .GRAPHITE_CONSISTENCY_LEVEL | quote }} 105 | separator = {{ default "." .GRAPHITE_SEPERATOR | quote }} 106 | {{ if .GRAPHITE_TAGS }}tags = [{{ .GRAPHITE_TAGS | quote }}]{{end}} 107 | {{ if .GRAPHITE_TEMPLATES }}templates = [{{ .GRAPHITE_TEMPLATES | quote }}]{{end}} 108 | 109 | [[udp]] 110 | enabled = {{ default false .UDP_ENABLED }} 111 | bind-address = {{ default ":8089" .GRAPHITE_BIND_ADDRESS | quote }} 112 | database = {{ default "udp" .UDP_DATABASE | quote }} 113 | batch-size = {{ default "1000" .UDP_BATCH_SIZE }} 114 | batch-timeout = {{ default "1s" .UDP_BATCH_TIMEOUT | quote }} 115 | batch-pending = {{ default "5" .UDP_BATCH_PENDING }} 116 | read-buffer ={{ default "0" .UDP_READ_BUFFER }} 117 | -------------------------------------------------------------------------------- /influxdb/rootfs/home/influxdb/start-influx: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Building config.toml!" 4 | ./envtpl -in config.toml.tpl >> config.toml 5 | echo "Finished building toml..." 6 | echo "###########################################" 7 | echo "###########################################" 8 | cat config.toml 9 | echo "###########################################" 10 | echo "###########################################" 11 | exec influxd -config config.toml 12 | -------------------------------------------------------------------------------- /telegraf/Makefile: -------------------------------------------------------------------------------- 1 | SHORT_NAME ?= telegraf 2 | SHELL_SCRIPTS = rootfs/start-telegraf 3 | 4 | include ../default.mk 5 | -------------------------------------------------------------------------------- /telegraf/README.md: -------------------------------------------------------------------------------- 1 | # [Telegraf](https://influxdata.com/time-series-platform/telegraf/) 2 | [![Docker Repository on Quay](https://quay.io/repository/deisci/telegraf/status "Docker Repository on Quay")](https://quay.io/repository/deisci/telegraf) 3 | 4 | ## Description 5 | Telegraf is a metrics collection daemon from InfluxData. It contains numerous input and output plugins that allows the user to customize what data they collect and where it is sent. This image is based on the official [deis base image](https://github.com/deis/docker-base). 6 | 7 | ## Configuration 8 | Telegraf configuration is based largely on a toml file that is passed in when the binary starts. The issue with doing this in a containerized environment is how can you "dynamically" build this file based on values passed into the container at runtime. Therefore, this image relies on a project called [envtpl](https://github.com/arschles/envtpl) to produce the telegraf configuration file. It can take environment variables and through using go templates produce the necessary stanzas in the toml file to start telegraf. Currently, the go template only supports basic if checks and outputting values that have been set. 9 | 10 | ## Host information 11 | You must do 2 things if you want to receive host level metrics from telegraf. 12 | * - Set the volume mounts for both `/sys` and `/proc` 13 | * - Set the environment variables `HOST_PROC` and `HOST_SYS` to the values of where `/sys` and `/proc` are mounted in the container. Example entries can be found in the [manifest](manifests/deis-monitor-telegraf-daemon.yaml). 14 | 15 | ## Environment Variables 16 | The configuration is driven via environment variables which are published to the `config.toml` file passed to telegraf when it starts. The following table gives the environment variable name and the default value if it is not set. 17 | 18 | | Name | Default | Description | 19 | |-----------|---------------|---------------| 20 | | AGENT_INTERVAL | 10s | Default data collection interval for all inputs | 21 | | AGENT_ROUND_INTERVAL | true | Rounds collection interval to 'interval' ie, if interval="10s" then always collect on :00, :10, :20, etc. | 22 | | AGENT_BUFFER_LIMIT | 10000 | Telegraf will cache metric_buffer_limit metrics for each output, and will flush this buffer on a successful write. | 23 | | AGENT_COLLECTION_JITTER | 0s | Collection jitter is used to jitter the collection by a random amount. Each plugin will sleep for a random time within jitter before collecting. This can be used to avoid many plugins querying things like sysfs at the same time, which can have a measurable effect on the system. | 24 | | AGENT_FLUSH_INTERVAL | 10s | Default data flushing interval for all outputs. You should not set this below interval. Maximum flush_interval will be flush_interval + flush_jitter | 25 | | AGENT_FLUSH_JITTER | 0s | Jitter the flush interval by a random amount. This is primarily to avoid large write spikes for users running a large number of telegraf instances. ie, a jitter of 5s and flush_interval 10s means flushes will happen every 10-15s. | 26 | | AGENT_DEBUG | false | Run telegraf in debug mode. | 27 | | AGENT_QUIET | false | Run telegraf in quiet mode. | 28 | | AGENT_HOSTNAME | NodeName | Override default hostname | 29 | 30 | 31 | ## Development 32 | The provided `Makefile` has various targets to help support building and publishing new images into a kubernetes cluster. 33 | 34 | ### Environment variables 35 | There are a few key environment variables you should be aware of when interacting with the `make` targets. 36 | 37 | * `BUILD_TAG` - The tag provided to the docker image when it is built (defaults to the git-sha) 38 | * `SHORT_NAME` - The name of the image (defaults to `grafana`) 39 | * `DEIS_REGISTRY` - This is the registry you are using (default `dockerhub`) 40 | * `IMAGE_PREFIX` - This is the account for the registry you are using (default `deis`) 41 | 42 | ### Make targets 43 | 44 | * `make build` - Build docker image 45 | * `make push` - Push docker image to a registry 46 | * `make upgrade` - Replaces the running grafana instance with a new one 47 | 48 | The typical workflow will look something like this - `DEIS_REGISTRY=quay.io/ IMAGE_PREFIX=foouser make build push upgrade`` 49 | -------------------------------------------------------------------------------- /telegraf/rootfs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM quay.io/deis/base:v0.3.6 2 | 3 | COPY . / 4 | 5 | RUN mkdir -p /usr/local/bin/ \ 6 | # This will come back once the kuberentes plugin is release in November 7 | && curl -fsSL -o /tmp/telegraf.deb https://dl.influxdata.com/telegraf/releases/telegraf_1.3.0-1_amd64.deb \ 8 | && dpkg -i /tmp/telegraf.deb \ 9 | && rm /tmp/telegraf.deb \ 10 | && curl -fsSL -o /usr/bin/envtpl https://github.com/arschles/envtpl/releases/download/0.2.3/envtpl_linux_amd64 \ 11 | && chmod +x /usr/bin/envtpl \ 12 | && curl -fsSL -o /usr/bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64 \ 13 | && chmod +x /usr/bin/jq 14 | 15 | CMD ["/start-telegraf"] 16 | -------------------------------------------------------------------------------- /telegraf/rootfs/config.toml.tpl: -------------------------------------------------------------------------------- 1 | # Set Tag Configuration 2 | [tags] 3 | 4 | {{ if .GLOBAL_TAGS }} 5 | [global_tags] 6 | {{ range $index, $item := split "," .GLOBAL_TAGS }} 7 | {{ $value := split ":" $item }}{{ $value._0 }}={{ $value._1 | quote }} 8 | {{end}} 9 | {{ end }} 10 | 11 | # Set Agent Configuration 12 | [agent] 13 | interval = {{ default "10s" .AGENT_INTERVAL | quote }} 14 | round_interval = {{ default true .AGENT_ROUND_INTERVAL }} 15 | metric_buffer_limit = {{ default "10000" .AGENT_BUFFER_LIMIT }} 16 | collection_jitter = {{ default "1s" .AGENT_COLLECTION_JITTER | quote }} 17 | flush_interval = {{ default "1s" .AGENT_FLUSH_INTERVAL | quote }} 18 | flush_jitter = {{ default "0s" .AGENT_FLUSH_JITTER | quote }} 19 | debug = {{ default false .AGENT_DEBUG }} 20 | quiet = {{ default false .AGENT_QUIET }} 21 | flush_buffer_when_full = {{ default true .AGENT_FLUSH_BUFFER }} 22 | {{ if .AGENT_HOSTNAME }}hostname = {{ .AGENT_HOSTNAME | quote }} {{ end }} 23 | 24 | # Set output configuration 25 | {{ if .AMON_INSTANCE }} 26 | [[outputs.amon]] 27 | server_key = {{ .AMON_SERVER_KEY | quote }} 28 | amon_instance = {{ .AMON_INSTANCE | quote }} 29 | timeout = {{ default "5s" .AMON_TIMEOUT | quote }} 30 | {{ end }} 31 | 32 | {{ if .AMQP_URL }} 33 | [[outputs.amqp]] 34 | url = {{ .AMQP_URL | quote }} 35 | exchange = {{ default "telegraf" .AMQP_EXCHANGE | quote }} 36 | routing_tag = {{ default "host" .AMQP_ROUTING_TAG | quote }} 37 | {{ if .AMQP_SSL_CA }} ssl_ca = {{ .AMQP_SSL_CA | quote }} {{ end }} 38 | {{ if .AMQP_SSL_CERT }} ssl_cert = {{ .AMQP_SSL_CERT | quote }} {{ end }} 39 | {{ if .AMQP_SSL_KEY }} ssl_key = {{ .AMQP_SSL_KEY | quote }} {{ end }} 40 | retention_policy = {{ default "default" .AMQP_RETENTION_POLICY | quote }} 41 | database = = {{ default "telegraf" .AMQP_DATABASE | quote }} 42 | precision = {{ default "s" .AMQP_PRECISION | quote }} 43 | {{ end }} 44 | 45 | {{ if .DATADOG_API_KEY }} 46 | [[outputs.datadog]] 47 | apikey = {{ .DATADOG_API_KEY | quote }} 48 | {{ end }} 49 | 50 | {{ if .GRAPHITE_SERVERS }} 51 | [[outputs.graphite]] 52 | servers = [{{ .GRAPHITE_SERVERS }}] 53 | prefix = {{ default "" .GRAPHITE_PREFIX | quote }} 54 | timeout = {{ default 2 .GRAPHITE_TIMEOUT }} 55 | {{ end }} 56 | 57 | {{ if .INFLUXDB_URLS}} 58 | [[outputs.influxdb]] 59 | urls = [{{ .INFLUXDB_URLS }}] 60 | database = {{default "kubernetes" .INFLUXDB_DATABASE | quote }} 61 | precision = {{ default "ns" .INFLUXDB_PRECISION | quote }} 62 | timeout = {{ default "5s" .INFLUXDB_TIMEOUT | quote }} 63 | {{ if .INFLUXDB_USERNAME}} username = {{ .INFLUXDB_USERNAME | quote }} {{ end }} 64 | {{ if .INFLUXDB_PASSWORD}} password = {{ .INFLUXDB_PASSWORD | quote }} {{ end }} 65 | {{ if .INFLUXDB_USER_AGENT}} user_agent = {{ .INFLUXDB_USER_AGENT | quote }} {{ end }} 66 | {{ if .INFLUXDB_UDP_PAYLOAD}} udp_payload = {{ .INFLUXDB_UDP_PAYLOAD | quote }} {{ end }} 67 | {{ end }} 68 | 69 | {{ if .KAFKA_BROKERS}} 70 | [[outputs.kafka]] 71 | brokers = [{{ .KAFKA_BROKERS }}] 72 | topic = {{ default "telegraf" .KAFKA_TOPIC | quote }} 73 | routing_tag = {{ .KAFKA_ROUTING_TAG | quote }} 74 | {{ if .KAFKA_CERTIFICATE }} certificate = {{ .KAFKA_CERTIFICATE | quote }} {{ end }} 75 | {{ if .KAFKA_KEY }} key = {{ .KAFKA_KEY | quote }} {{ end }} 76 | {{ if .KAFKA_CA }} ca = {{ .KAFKA_CA | quote }} {{ end }} 77 | {{ if .KAFKA_VERIFY_SSL }} verify_ssl = {{ .KAFKA_VERIFY_SSL }} {{ end }} 78 | {{ end }} 79 | 80 | {{ if .LIBRATO_API_TOKEN }} 81 | [[outputs.librato]] 82 | api_user = {{ .LIBRATO_API_USER | quote }} 83 | api_token = {{ .LIBRATO_API_TOKEN | quote }} 84 | source_tag = {{ .LIBRATO_SOURCE_TAG | quote }} 85 | {{ end }} 86 | 87 | {{ if .NSQ_SERVER }} 88 | [[outputs.nsq]] 89 | server = {{ .NSQ_SERVER | quote }} 90 | topic = {{ .NSQ_TOPIC | quote }} 91 | {{ end }} 92 | 93 | {{ if .OPEN_TSDB_HOST }} 94 | prefix = {{ .OPEN_TSDB_PREFIX | quote }} 95 | host = {{ .OPEN_TSDB_HOST | quote }} 96 | port = {{ .OPEN_TSDB_PORT }} 97 | debug = {{ .OPEN_TSDB_DEUBG }} 98 | {{ end }} 99 | 100 | {{ if .RIEMANN_URL }} 101 | [[outputs.riemann]] 102 | url = {{ .RIEMANN_URL | quote }} 103 | transport = {{ .RIEMANN_TRANSPORT | quote }} 104 | {{ end }} 105 | 106 | # Set Input Configuration 107 | [[inputs.netstat]] 108 | [[inputs.swap]] 109 | [[inputs.system]] 110 | [[inputs.mem]] 111 | [[inputs.cpu]] 112 | percpu = true 113 | totalcpu = true 114 | 115 | {{ if .ENABLE_ZFS }}[[inputs.zfs]]{{ end }} 116 | 117 | [[inputs.disk]] 118 | {{ if .DISK_MOUNT_POINTS }} mount_points = [{{ .DISK_MOUNT_POINTS }}] {{ end }} 119 | 120 | 121 | [[inputs.diskio]] 122 | {{ if .DISKIO_DEVICES }} devices = [{{ .DISKIO_DEVICES }}] {{ end }} 123 | {{ if .DISKIO_SKIP_SERIAL_NUMBER }} skip_serial_number = {{ .DISKIO_SKIP_SERIAL_NUMBER }} {{ end }} 124 | 125 | [[inputs.net]] 126 | {{ if .NET_INTERFACES }} interfaces = [{{ .NET_INTERFACES}}] {{ end }} 127 | 128 | {{ if .APACHE_URLS }} 129 | [[inputs.apache]] 130 | servers = [{{ .APACHE_URLS }}] 131 | {{ end }} 132 | 133 | {{ if .DISQUE_SERVERS }} 134 | [[inputs.disque]] 135 | servers = [{{ .DISQUE_SERVERS }}] 136 | {{ end }} 137 | 138 | {{ if .DOCKER_ENDPOINT }} 139 | [[inputs.docker]] 140 | endpoint = {{ .DOCKER_ENDPOINT | quote }} 141 | container_names = [{{ if .DOCKER_CONTAINER_NAMES }}{{ .DOCKER_CONTAINER_NAMES }}{{ end }}] 142 | {{ end }} 143 | 144 | {{ if .ELASTIC_SEARCH_SERVERS }} 145 | [[inputs.elasticsearch]] 146 | servers = [{{ .ELASTIC_SEARCH_SERVERS }}] 147 | local = {{ .ELASTIC_SEARCH_LOCAL }} 148 | cluster_health = {{ .ELASTIC_SEARCH_CLUSTER_HEALTH }} 149 | {{ end }} 150 | 151 | {{ if .HAPROXY_SERVERS }} 152 | [[inputs.haproxy]] 153 | servers = [{{ .HAPROXY_SERVERS }}] 154 | {{ end }} 155 | 156 | {{ if .HTTP_JSON_SERVERS }} 157 | [[inputs.httpjson]] 158 | name = {{ .HTTP_JSON_NAME | quote }} 159 | servers = [{{ .HTTP_JSON_SERVERS }}] 160 | method = {{ .HTTP_JSON_METHOD | quote }} 161 | tag_keys = [{{ .HTTP_JSON_TAG_KEYS }}] 162 | [json.parameters] 163 | event_type = {{ .HTTP_JSON_EVENT_TYPE | quote }} 164 | threshold = {{ .HTTP_JSON_THRESHOLD | quote }} 165 | {{end}} 166 | 167 | {{ if .ENABLE_INFLUXDB_INPUT }} 168 | [[inputs.influxdb]] 169 | urls = [{{ .INFLUXDB_INPUT_URLS }}] 170 | {{ end }} 171 | 172 | {{ if and .KUBERNETES_URL .ENABLE_KUBERNETES }} 173 | [[inputs.kubernetes]] 174 | url = {{ .KUBERNETES_URL | quote }} 175 | bearer_token = {{ .KUBERNETES_BEARER_TOKEN_PATH | quote }} 176 | {{ if .KUBERNETES_SSL_CA }} ssl_ca = {{ .KUBERNETES_SSL_CA | quote }} {{ end }} 177 | {{ if .KUBERNETES_SSL_CERT }} ssl_cert = {{ .KUBERNETES_SSL_CERT | quote }} {{ end }} 178 | {{ if .KUBERNETES_SSL_KEY }} ssl_key = {{ .KUBERNETES_SSL_KEY | quote }} {{ end }} 179 | insecure_skip_verify = {{ default true .KUBERNETES_INSECURE_SKIP_VERIFY }} 180 | {{ end }} 181 | 182 | {{ if .MEMCACHED_SERVERS }} 183 | [[inputs.memcached]] 184 | servers = [{{ .MEMCACHED_SERVERS }}] 185 | {{ end }} 186 | 187 | {{ if .MONGODB_SERVERS }} 188 | [[inputs.mongodb]] 189 | servers = [{{ .MONGODB_SERVERS }}] 190 | {{ end }} 191 | 192 | {{ if .MYSQL_SERVERS }} 193 | [[inputs.mysql]] 194 | servers = [{{ .MYSQL_SERVERS }}] 195 | {{ end }} 196 | 197 | {{ if .NGINX_URLS }} 198 | [[inputs.nginx]] 199 | urls = [{{ .NGINX_URLS }}] 200 | {{ end }} 201 | 202 | {{ if .NSQ_ENDPOINTS }} 203 | [[inputs.nsq]] 204 | endpoints = [{{ .NSQ_ENDPOINTS }}] 205 | interval = {{ default "1s" .AGENT_INTERVAL | quote }} 206 | {{ end }} 207 | 208 | {{ if .POSTGRESQL_ADDRESS }} 209 | [[inputs.postgresql]] 210 | address = {{ .POSTGRESQL_ADDRESS | quote }} 211 | {{ if .POSTGRESQL_DATABASES }} databases = [{{ .POSTGRESQL_DATABASES }}] {{ end }} 212 | {{ end }} 213 | 214 | {{ if and .PROMETHEUS_URLS .ENABLE_PROMETHEUS }} 215 | [[inputs.prometheus]] 216 | urls = [{{ .PROMETHEUS_URLS }}] 217 | insecure_skip_verify = {{ default true .PROMETHEUS_INSECURE_SKIP_VERIFY }} 218 | bearer_token = {{ .PROMETHEUS_BEARER_TOKEN_PATH | quote }} 219 | {{ end }} 220 | 221 | {{ if .ENABLE_ETCD }} 222 | [[inputs.prometheus]] 223 | urls = [{{ .ETCD_URLS }}] 224 | {{ end }} 225 | 226 | {{ if .RABBITMQ_URL }} 227 | [[inputs.rabbitmq]] 228 | url = {{ .RABBITMQ_URL | quote }} 229 | {{ if .RABBITMQ_NAME}} name = {{ .RABBITMQ_NAME | quote }} {{ end }} 230 | {{ if .RABBITMQ_USERNAME }} username = {{ .RABBITMQ_USERNAME | quote }} {{ end }} 231 | {{ if .RABBITMQ_PASSWORD }} password = {{ .RABBITMQ_PASSWORD | quote }} {{ end }} 232 | {{ if .RABBITMQ_NODES }} nodes = [{{ .RABBITMQ_NODES}}] {{ end }} 233 | {{ end }} 234 | 235 | {{ if .REDIS_SERVERS }} 236 | [[inputs.redis]] 237 | servers = [{{ .REDIS_SERVERS }}] 238 | {{ end }} 239 | 240 | {{ if .RETHINKDB_SERVERS }} 241 | [[inputs.rethinkdb]] 242 | servers = [{{ .RETHINKDB_SERVERS }}] 243 | {{ end }} 244 | 245 | {{ if .ZOOKEEPER_SERVERS }} 246 | [[inputs.zookeeper]] 247 | servers = [{{ .ZOOKEEPER_SERVERS }}] 248 | {{ end }} 249 | 250 | # Set Service Input Configuration 251 | {{ if .KAFKA_CONSUMER_TOPICS }} 252 | [[inputs.kafka_consumer]] 253 | topics = [{{ .KAFKA_CONSUMER_TOPICS }}] 254 | zookeeper_peers = [{{ .KAFKA_CONSUMER_ZOOKEEPER_PEERS }}] 255 | consumer_group = {{ .KAFKA_CONSUMER_GROUP | quote }} 256 | point_buffer = {{ .KAFKA_CONSUMER_POINT_BUFFER }} 257 | offset = {{ .KAFKA_CONSUMER_OFFSET | quote }} 258 | {{ end }} 259 | 260 | {{ if .NSQ_CONSUMER_SERVER }} 261 | [[inputs.nsq_consumer]] 262 | server = {{ .NSQ_CONSUMER_SERVER | quote }} 263 | topic = {{ default "telegraf" .NSQ_CONSUMER_TOPIC | quote }} 264 | channel = {{ default "consumer" .NSQ_CONSUMER_CHANNEL | quote }} 265 | max_in_flight = {{ default 100 .NSQ_CONSUMER_MAX_IN_FLIGHT }} 266 | data_format = {{ default "influx" .NSQ_CONSUMER_DATA_FORMAT | quote }} 267 | {{ end }} 268 | 269 | {{ if .STATSD_SERVICE_ADDRESS }} 270 | [[inputs.statsd]] 271 | service_address = {{ .STATSD_SERVICE_ADDRESS | quote }} 272 | delete_gauges = {{ default false .STATSD_DELETE_GAUGES }} 273 | delete_counters = {{ default false .STATSD_DELETE_COUNTERS }} 274 | delete_sets = {{ default false .STATSD_DELETE_SETS }} 275 | delete_timings = {{ default true .STATSD_DELETE_TIMINGS}} 276 | percentiles = [{{ default 90 .STATSD_PERCENTILES }}] 277 | convert_names = {{ default true .STATSD_CONVERT_NAMES }} 278 | {{ if .STATSD_TEMPLATES}} templates = [{{ .STATSD_TEMPLATES }}] {{ end }} 279 | allowed_pending_messages = {{ default 10000 .STATSD_ALLOWED_PENDING_MESSAGES }} 280 | percentile_limit = {{ default 1000 .STATSD_PERCENTILE_LIMIT }} 281 | udp_packet_size = {{ default 1500 .STATSD_UDP_PACKET_SIZE }} 282 | {{ end }} 283 | -------------------------------------------------------------------------------- /telegraf/rootfs/start-telegraf: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | API_URL=${API_URL:-"https://$KUBERNETES_SERVICE_HOST:$KUBERNETES_SERVICE_PORT"} 5 | NSQ_TOPIC_URL=${NSQ_TOPIC_URL:-"http://$DEIS_NSQD_SERVICE_HOST:$DEIS_NSQD_SERVICE_PORT/topic/create?topic=$NSQ_CONSUMER_TOPIC"} 6 | 7 | export BEARER_TOKEN_PATH TOKEN NODE_NAME NODE_IP AGENT_HOSTNAME 8 | BEARER_TOKEN_PATH=/var/run/secrets/kubernetes.io/serviceaccount/token 9 | TOKEN="$(cat $BEARER_TOKEN_PATH)" 10 | NODE_NAME="$(curl -s "$API_URL/api/v1/namespaces/$POD_NAMESPACE/pods/$HOSTNAME" --header "Authorization: Bearer $TOKEN" --insecure | jq -r '.spec.nodeName')" 11 | echo "Node Name set (${NODE_NAME})" 12 | NODE_IP="$(curl -s "$API_URL/api/v1/namespaces/$POD_NAMESPACE/pods/$HOSTNAME" --header "Authorization: Bearer $TOKEN" --insecure | jq -r '.status.hostIP')" 13 | echo "Node IP set (${NODE_IP})" 14 | AGENT_HOSTNAME=$NODE_NAME 15 | 16 | if [ -n "$DEIS_NSQD_SERVICE_HOST" ]; then 17 | echo "Creating topic with URL: ${NSQ_TOPIC_URL}" 18 | curl -s -X POST "${NSQ_TOPIC_URL}" 19 | fi 20 | 21 | if [ -n "$ENABLE_KUBERNETES" ]; then 22 | export KUBERNETES_BEARER_TOKEN_PATH=${BEARER_TOKEN_PATH} 23 | export KUBERNETES_URL="http://${NODE_IP}:10255" 24 | echo "Setting KUBERNETES_URL: $KUBERNETES_URL" 25 | fi 26 | 27 | if [ -n "$ENABLE_PROMETHEUS" ]; then 28 | export PROMETHEUS_BEARER_TOKEN_PATH=${BEARER_TOKEN_PATH} 29 | export PROMETHEUS_URLS="\"$API_URL/api/v1/proxy/nodes/$NODE_NAME/metrics\", \"$API_URL/metrics\"" 30 | echo "Setting PROMETHEUS_URLS: $PROMETHEUS_URLS" 31 | fi 32 | 33 | # if the influxdb url does not start with a quote, assume it's singular and quote it 34 | if [ "${INFLUXDB_URLS:0:1}" != "\"" ]; then 35 | export INFLUXDB_URLS="\"$INFLUXDB_URLS\"" 36 | fi 37 | 38 | echo "Building config.toml!" 39 | envtpl -in config.toml.tpl | sed '/^$/d' > config.toml 40 | 41 | echo "Finished building toml..." 42 | echo "###########################################" 43 | echo "###########################################" 44 | cat config.toml 45 | echo "###########################################" 46 | echo "###########################################" 47 | telegraf -config config.toml -quiet 48 | -------------------------------------------------------------------------------- /versioning.mk: -------------------------------------------------------------------------------- 1 | MUTABLE_VERSION ?= canary 2 | VERSION ?= git-$(shell git rev-parse --short HEAD) 3 | 4 | IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${VERSION} 5 | MUTABLE_IMAGE := ${DEIS_REGISTRY}${IMAGE_PREFIX}/${SHORT_NAME}:${MUTABLE_VERSION} 6 | 7 | info: 8 | @echo "Build tag: ${VERSION}" 9 | @echo "Registry: ${DEIS_REGISTRY}" 10 | @echo "Immutable tag: ${IMAGE}" 11 | @echo "Mutable tag: ${MUTABLE_IMAGE}" 12 | 13 | .PHONY: docker-push 14 | docker-push: docker-mutable-push docker-immutable-push 15 | 16 | .PHONY: docker-immutable-push 17 | docker-immutable-push: 18 | docker push ${IMAGE} 19 | 20 | .PHONY: docker-mutable-push 21 | docker-mutable-push: 22 | docker push ${MUTABLE_IMAGE} 23 | --------------------------------------------------------------------------------