├── .circleci └── config.yml ├── .env ├── CHANGELOG.md ├── LICENSE ├── README.md ├── docker-compose.yml ├── grafana ├── dashboards │ └── Samples │ │ └── mainDashboard1.json ├── grafana.env ├── grafana.ini └── provisioning │ ├── dashboards │ └── dashboardReference.yml │ └── datasources │ └── influxDB.yml ├── influxdb ├── config.yml └── influxdb.env ├── postgres └── postgres.env └── telegraf ├── telegraf.conf └── telegraf.env /.circleci/config.yml: -------------------------------------------------------------------------------- 1 | version: 2.1 2 | jobs: 3 | build: 4 | machine: 5 | image: ubuntu-2004:current 6 | steps: 7 | - checkout 8 | 9 | - run: 10 | name: Install Docker Compose 11 | environment: 12 | COMPOSE_VERSION: "1.29.2" 13 | command: | 14 | curl -L "https://github.com/docker/compose/releases/download/${COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m)" -o ~/docker-compose 15 | chmod +x ~/docker-compose 16 | sudo mv ~/docker-compose /usr/local/bin/docker-compose 17 | 18 | - run: 19 | name: Start Docker Compose service 20 | command: COMPOSE_PROFILES=grafana,telegraf docker-compose up -d 21 | 22 | - run: 23 | name: Wait service warmup 24 | command: sleep 30 25 | 26 | - run: 27 | name: Check InfluxDB is up and running 28 | command: docker run --network influx-frontend appropriate/curl --retry 10 --retry-delay 1 --retry-connrefused http://dsig-influx:8086/ping 29 | 30 | - run: 31 | name: Check Grafana is up and running 32 | command: docker run --network influx-frontend appropriate/curl --retry 10 --retry-delay 1 --retry-connrefused http://dsig-grafana:3000/api/health -------------------------------------------------------------------------------- /.env: -------------------------------------------------------------------------------- 1 | INFLUXDB_VERSION=2.1.1 2 | TELEGRAF_VERSION=1.21 3 | POSTGRES_VERSION=14.2.0 4 | GRAFANA_VERSION=8.4.4 -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Docker StatsD InfluxDB Grafana integrated service 2 | ----------------------------------- 3 | 4 | ### Warning: UPGRADE FROM VERSION 2.3.0 TO VERSION 3.0.0 IS NOT POSSIBLE due internal architecture changes. 5 | 6 | ## v3.0.0 (2022-03-23) 7 | * Full rewrite with Docker Compose service file 8 | * Upgraded InfluxDB to version 2.1.1 9 | * Upgraded Telegraf to version 1.21 10 | * Upgraded Grafana to version 8.4.4 11 | * Changed Grafana DB to Postgres with dedicated container 12 | 13 | ## v2.3.0 (2019-03-25) 14 | * Upgraded Telegraf to version 1.9.4-1 15 | * Upgraded InfluxDB to version 1.7.3 16 | * Upgraded Grafana to version 6.0.0 17 | * Upgraded Chronograf to version 1.7.8 18 | * Upgraded NodeJS to version 11 19 | * Updated Docker image to Ubuntu 18.04 LTS 20 | * Removed traces of SSH server and credentials (use docker exec) 21 | * Set provisioned datasource (InfluxDB) as default 22 | 23 | ## v2.2.0 (2018-11-11) 24 | * Upgraded Telegraf to version 1.8.3-1 25 | * Upgraded InfluxDB to version 1.7.0 26 | * Upgraded Grafana to version 5.3.2 27 | * Upgraded Chronograf to version 1.7.2 28 | * Upgraded NodeJS to version 8 29 | * Configure Grafana Provisioning Feature 30 | 31 | 32 | ## v2.1.0 (2018-06-11) 33 | 34 | * Upgraded Grafana 5.1 35 | * Installed Chronograf 1.5 36 | 37 | ## v2.0.0 (2017-01-28) 38 | 39 | ### Warning: upgrade from version 1.0.x is not supported, all persisted data in volumes will be lost if you delete the container. 40 | 41 | * Ubuntu 16.04 LTS is the new Docker base image 42 | * New init system with Supervisord 43 | * StatsD InfluxDB backend connector removed 44 | * StatsD Etsy removed 45 | * StatsD has been fully replaced with InfluxData Telegraf, that supports StatsD protocol 46 | * Upgraded InfluxDB to version 1.2 47 | * Upgraded Grafana to version 4.1.1 48 | 49 | ## v1.0.2 (2016-09-15) 50 | 51 | * Fix for bad proxy hash sum mismatch 52 | 53 | ## v1.0.1 (2016-06-27) 54 | 55 | * Upgraded StatsD to version 0.8.0 56 | * Upgraded InfluxDB to version 0.13.0 57 | * Upgraded Grafana to version 3.0.4 58 | * Changed StatsD backend connector for InfluxDB new version 59 | 60 | ## v1.0.0 (2015-07-19) 61 | 62 | * Initial release 63 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Samuele Bistoletti 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 | # Docker service with Telegraf (StatsD), InfluxDB and Grafana 2 | 3 | :facepunch: Battle-tested 4 | 5 | [![CircleCI](https://circleci.com/gh/samuelebistoletti/docker-statsd-influxdb-grafana.svg?style=svg)](https://circleci.com/gh/samuelebistoletti/docker-statsd-influxdb-grafana) 6 | 7 | ## Versions 8 | 9 | ### Warning: UPGRADE FROM OLDER VERSIONS TO VERSION 3.0.0 IS NOT POSSIBLE, SEE CHANGELOG.MD 10 | 11 | * Main version: 3.0.0 12 | * InfluxDB: 2.1.1 13 | * Telegraf (StatsD): 1.21 14 | * Postgres: 14.2.0 15 | * Grafana: 8.4.4 16 | 17 | 18 | ## Quick Start 19 | 20 | First download and install the latest available version of Docker Compose 21 | 22 | In order to start the service the first time launch: 23 | 24 | ```sh 25 | COMPOSE_PROFILES=grafana,telegraf docker-compose up -d 26 | ``` 27 | 28 | You can replace `COMPOSE_PROFILES=grafana,telegraf` with the desired profiles to launch, you can launch only InfluxDB (default with no profiles). 29 | 30 | To stop the service launch: 31 | 32 | ```sh 33 | COMPOSE_PROFILES=grafana,telegraf docker-compose down 34 | ``` 35 | 36 | ## Mapped Ports 37 | 38 | ``` 39 | Host Container Service 40 | 41 | 3003 3003 grafana 42 | 8086 8086 influxdb 43 | 8125 8125 statsd 44 | ``` 45 | 46 | ## Grafana 47 | 48 | Open 49 | 50 | ``` 51 | Username: root 52 | Password: root 53 | ``` 54 | 55 | ### Data source on Grafana 56 | 57 | InfluxDB data source is automatically provisioned with new Flux language support flag. 58 | 59 | ## InfluxDB 60 | 61 | ### Web Interface 62 | 63 | Open 64 | 65 | ``` 66 | Username: admin 67 | Password: admin123456 68 | Port: 8086 69 | ``` 70 | 71 | ## Customizations 72 | 73 | You can customize all settings in the attached config files, then you can stop and start the service in order to reload the new configurations. 74 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.9" 2 | 3 | volumes: 4 | influxdb_data: {} 5 | postgres_data: {} 6 | grafana_data: {} 7 | 8 | networks: 9 | influx: 10 | name: influx-frontend 11 | postgres: 12 | external: false 13 | 14 | services: 15 | influxdb: 16 | container_name: dsig-influx 17 | image: influxdb:${INFLUXDB_VERSION} 18 | networks: 19 | - influx 20 | ports: 21 | - 8086:8086 22 | healthcheck: 23 | test: ["CMD", "curl", "-f", "http://localhost:8086/ping"] 24 | interval: 10s 25 | timeout: 10s 26 | retries: 5 27 | start_period: 40s 28 | restart: always 29 | env_file: 30 | - ./influxdb/influxdb.env 31 | volumes: 32 | - influxdb_data:/var/lib/influxdb2 33 | - ./influxdb/config.yml:/etc/influxdb2/config.yml 34 | 35 | telegraf: 36 | container_name: dsig-telegraf 37 | image: telegraf:${TELEGRAF_VERSION} 38 | profiles: ["telegraf"] 39 | networks: 40 | - influx 41 | ports: 42 | - 8125:8125/udp 43 | restart: always 44 | depends_on: 45 | - influxdb 46 | env_file: 47 | - ./telegraf/telegraf.env 48 | volumes: 49 | - ./telegraf/telegraf.conf:/etc/telegraf/telegraf.conf:ro 50 | 51 | postgres: 52 | container_name: dsig-postgres 53 | image: bitnami/postgresql:${POSTGRES_VERSION} 54 | profiles: ["grafana"] 55 | networks: 56 | - postgres 57 | restart: always 58 | env_file: 59 | - ./postgres/postgres.env 60 | volumes: 61 | - postgres_data:/bitnami/postgresql 62 | 63 | grafana: 64 | container_name: dsig-grafana 65 | image: grafana/grafana-enterprise:${GRAFANA_VERSION} 66 | profiles: ["grafana"] 67 | networks: 68 | - postgres 69 | - influx 70 | ports: 71 | - 3000:3000 72 | healthcheck: 73 | test: ["CMD", "curl", "-f", "http://localhost:3000/api/health"] 74 | interval: 10s 75 | timeout: 10s 76 | retries: 5 77 | start_period: 40s 78 | restart: always 79 | depends_on: 80 | - postgres 81 | - influxdb 82 | env_file: 83 | - ./grafana/grafana.env 84 | volumes: 85 | - grafana_data:/var/lib/grafana 86 | - ./grafana/provisioning:/etc/grafana/provisioning 87 | - ./grafana/dashboards:/etc/dashboards -------------------------------------------------------------------------------- /grafana/dashboards/Samples/mainDashboard1.json: -------------------------------------------------------------------------------- 1 | { 2 | "annotations": { 3 | "list": [ 4 | { 5 | "builtIn": 1, 6 | "datasource": "InfluxDB", 7 | "enable": true, 8 | "hide": true, 9 | "iconColor": "rgba(0, 211, 255, 1)", 10 | "name": "Annotations & Alerts", 11 | "type": "dashboard" 12 | } 13 | ] 14 | }, 15 | "editable": false, 16 | "gnetId": null, 17 | "graphTooltip": 0, 18 | "hideControls": false, 19 | "id": null, 20 | "links": [], 21 | "panels": [ 22 | { 23 | "aliasColors": {}, 24 | "bars": false, 25 | "dashLength": 10, 26 | "dashes": false, 27 | "datasource": null, 28 | "fill": 1, 29 | "gridPos": { 30 | "h": 8, 31 | "w": 24, 32 | "x": 0, 33 | "y": 0 34 | }, 35 | "id": 2, 36 | "legend": { 37 | "avg": false, 38 | "current": false, 39 | "max": false, 40 | "min": false, 41 | "show": true, 42 | "total": false, 43 | "values": false 44 | }, 45 | "lines": true, 46 | "linewidth": 1, 47 | "links": [], 48 | "nullPointMode": "null", 49 | "percentage": false, 50 | "pointradius": 5, 51 | "points": false, 52 | "renderer": "flot", 53 | "seriesOverrides": [], 54 | "spaceLength": 10, 55 | "stack": false, 56 | "steppedLine": false, 57 | "targets": [ 58 | { 59 | "expr": "node_cpu{mode=\"user\"}", 60 | "format": "time_series", 61 | "intervalFactor": 1, 62 | "legendFormat": "{{ cpu }}", 63 | "refId": "A" 64 | } 65 | ], 66 | "thresholds": [], 67 | "timeFrom": null, 68 | "timeShift": null, 69 | "title": "cpu", 70 | "tooltip": { 71 | "shared": true, 72 | "sort": 0, 73 | "value_type": "individual" 74 | }, 75 | "type": "graph", 76 | "xaxis": { 77 | "buckets": null, 78 | "mode": "time", 79 | "name": null, 80 | "show": true, 81 | "values": [] 82 | }, 83 | "yaxes": [ 84 | { 85 | "format": "short", 86 | "label": null, 87 | "logBase": 1, 88 | "max": null, 89 | "min": null, 90 | "show": true 91 | }, 92 | { 93 | "format": "short", 94 | "label": null, 95 | "logBase": 1, 96 | "max": null, 97 | "min": null, 98 | "show": true 99 | } 100 | ] 101 | } 102 | ], 103 | "schemaVersion": 16, 104 | "style": "dark", 105 | "tags": [], 106 | "templating": { 107 | "list": [] 108 | }, 109 | "time": { 110 | "from": "now-15m", 111 | "to": "now" 112 | }, 113 | "timepicker": { 114 | "refresh_intervals": [ 115 | "5s", 116 | "10s", 117 | "30s", 118 | "1m", 119 | "5m", 120 | "15m", 121 | "30m", 122 | "1h", 123 | "2h", 124 | "1d" 125 | ], 126 | "time_options": [ 127 | "5m", 128 | "15m", 129 | "1h", 130 | "6h", 131 | "12h", 132 | "24h", 133 | "2d", 134 | "7d", 135 | "30d" 136 | ] 137 | }, 138 | "timezone": "", 139 | "title": "Main Dashboard 1", 140 | "uid": "dw3aBiqk7", 141 | "version": 1 142 | } 143 | -------------------------------------------------------------------------------- /grafana/grafana.env: -------------------------------------------------------------------------------- 1 | GF_DEFAULT_INSTANCE_NAME=setup 2 | GF_SECURITY_ADMIN_USER=admin 3 | GF_SECURITY_ADMIN_PASSWORD=admin 4 | GF_DATABASE_TYPE=postgres 5 | GF_DATABASE_HOST=postgres 6 | GF_DATABASE_NAME=grafana 7 | GF_DATABASE_USER=grafana 8 | GF_DATABASE_PASSWORD=grafana -------------------------------------------------------------------------------- /grafana/grafana.ini: -------------------------------------------------------------------------------- 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 = production 8 | 9 | # instance name, defaults to HOSTNAME environment variable value or hostname if HOSTNAME var is empty 10 | ; instance_name = ${HOSTNAME} 11 | 12 | #################################### Paths #################################### 13 | [paths] 14 | # Path to where grafana can store temp files, sessions, and the sqlite3 db (if that is used) 15 | # 16 | ;data = /var/lib/grafana 17 | # 18 | # Directory where grafana can store logs 19 | # 20 | ;logs = /var/log/grafana 21 | # 22 | # Directory where grafana will automatically scan and look for plugins 23 | # 24 | ;plugins = /var/lib/grafana/plugins 25 | 26 | # folder that contains provisioning config files 27 | # that grafana will apply on startup and while running. 28 | provisioning = /etc/grafana/provisioning 29 | # 30 | #################################### Server #################################### 31 | [server] 32 | # Protocol (http or https) 33 | protocol = http 34 | 35 | # The ip address to bind to, empty will bind to all interfaces 36 | ;http_addr = 37 | 38 | # The http port to use 39 | http_port = 3003 40 | 41 | # The public facing domain name used to access grafana from a browser 42 | ;domain = localhost 43 | 44 | # Redirect to correct domain if host header does not match domain 45 | # Prevents DNS rebinding attacks 46 | ;enforce_domain = false 47 | 48 | # The full public facing url you use in browser, used for redirects and emails 49 | # If you use reverse proxy and sub path specify full url (with sub path) 50 | root_url = http://localhost:3003 51 | 52 | # Log web requests 53 | ;router_logging = false 54 | 55 | # the path relative working path 56 | ;static_root_path = public 57 | 58 | # enable gzip 59 | ;enable_gzip = false 60 | 61 | # https certs & key file 62 | ;cert_file = 63 | ;cert_key = 64 | 65 | #################################### Database #################################### 66 | [database] 67 | # You can configure the database connection by specifying type, host, name, user and password 68 | # as seperate properties or as on string using the url propertie. 69 | 70 | # Either "mysql", "postgres" or "sqlite3", it's your choice 71 | type = mysql 72 | host = 127.0.0.1:3306 73 | name = grafana 74 | user = grafana 75 | # If the password contains # or ; you have to wrap it with trippel quotes. Ex """#password;""" 76 | password = grafana 77 | 78 | # Use either URL or the previous fields to configure the database 79 | # Example: mysql://user:secret@host:port/database 80 | ;url = 81 | 82 | # For "postgres" only, either "disable", "require" or "verify-full" 83 | ;ssl_mode = disable 84 | 85 | # For "sqlite3" only, path relative to data_path setting 86 | ;path = grafana.db 87 | 88 | #################################### Session #################################### 89 | [session] 90 | # Either "memory", "file", "redis", "mysql", "postgres", default is "file" 91 | ;provider = file 92 | 93 | # Provider config options 94 | # memory: not have any config yet 95 | # file: session dir path, is relative to grafana data_path 96 | # redis: config like redis server e.g. `addr=127.0.0.1:6379,pool_size=100,db=grafana` 97 | # mysql: go-sql-driver/mysql dsn config string, e.g. `user:password@tcp(127.0.0.1:3306)/database_name` 98 | # postgres: user=a password=b host=localhost port=5432 dbname=c sslmode=disable 99 | ;provider_config = sessions 100 | 101 | # Session cookie name 102 | ;cookie_name = grafana_sess 103 | 104 | # If you use session in https only, default is false 105 | ;cookie_secure = false 106 | 107 | # Session life time, default is 86400 108 | ;session_life_time = 86400 109 | 110 | #################################### Analytics #################################### 111 | [analytics] 112 | # Server reporting, sends usage counters to stats.grafana.org every 24 hours. 113 | # No ip addresses are being tracked, only simple counters to track 114 | # running instances, dashboard and error counts. It is very helpful to us. 115 | # Change this option to false to disable reporting. 116 | ;reporting_enabled = true 117 | 118 | # Set to false to disable all checks to https://grafana.net 119 | # for new vesions (grafana itself and plugins), check is used 120 | # in some UI views to notify that grafana or plugin update exists 121 | # This option does not cause any auto updates, nor send any information 122 | # only a GET request to http://grafana.net to get latest versions 123 | ;check_for_updates = true 124 | 125 | # Google Analytics universal tracking code, only enabled if you specify an id here 126 | ;google_analytics_ua_id = 127 | 128 | #################################### Security #################################### 129 | [security] 130 | # default admin user, created on startup 131 | admin_user = root 132 | 133 | # default admin password, can be changed before first start of grafana, or in profile settings 134 | admin_password = root 135 | 136 | # used for signing 137 | ;secret_key = SW2YcwTIb9zpOOhoPsMm 138 | 139 | # Auto-login remember days 140 | ;login_remember_days = 7 141 | ;cookie_username = grafana_user 142 | ;cookie_remember_name = grafana_remember 143 | 144 | # disable gravatar profile images 145 | ;disable_gravatar = false 146 | 147 | # data source proxy whitelist (ip_or_domain:port separated by spaces) 148 | ;data_source_proxy_whitelist = 149 | 150 | [snapshots] 151 | # snapshot sharing options 152 | ;external_enabled = true 153 | ;external_snapshot_url = https://snapshots-origin.raintank.io 154 | ;external_snapshot_name = Publish to snapshot.raintank.io 155 | 156 | # remove expired snapshot 157 | ;snapshot_remove_expired = true 158 | 159 | # remove snapshots after 90 days 160 | ;snapshot_TTL_days = 90 161 | 162 | #################################### Users #################################### 163 | [users] 164 | # disable user signup / registration 165 | ;allow_sign_up = true 166 | 167 | # Allow non admin users to create organizations 168 | ;allow_org_create = true 169 | 170 | # Set to true to automatically assign new users to the default organization (id 1) 171 | ;auto_assign_org = true 172 | 173 | # Default role new users will be automatically assigned (if disabled above is set to true) 174 | ;auto_assign_org_role = Viewer 175 | 176 | # Background text for the user field on the login page 177 | ;login_hint = email or username 178 | 179 | # Default UI theme ("dark" or "light") 180 | ;default_theme = dark 181 | 182 | [auth] 183 | # Set to true to disable (hide) the login form, useful if you use OAuth, defaults to false 184 | ;disable_login_form = false 185 | 186 | #################################### Anonymous Auth ########################## 187 | [auth.anonymous] 188 | # enable anonymous access 189 | ;enabled = false 190 | 191 | # specify organization name that should be used for unauthenticated users 192 | ;org_name = Main Org. 193 | 194 | # specify role for unauthenticated users 195 | ;org_role = Viewer 196 | 197 | #################################### Github Auth ########################## 198 | [auth.github] 199 | ;enabled = false 200 | ;allow_sign_up = true 201 | ;client_id = some_id 202 | ;client_secret = some_secret 203 | ;scopes = user:email,read:org 204 | ;auth_url = https://github.com/login/oauth/authorize 205 | ;token_url = https://github.com/login/oauth/access_token 206 | ;api_url = https://api.github.com/user 207 | ;team_ids = 208 | ;allowed_organizations = 209 | 210 | #################################### Google Auth ########################## 211 | [auth.google] 212 | ;enabled = false 213 | ;allow_sign_up = true 214 | ;client_id = some_client_id 215 | ;client_secret = some_client_secret 216 | ;scopes = https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email 217 | ;auth_url = https://accounts.google.com/o/oauth2/auth 218 | ;token_url = https://accounts.google.com/o/oauth2/token 219 | ;api_url = https://www.googleapis.com/oauth2/v1/userinfo 220 | ;allowed_domains = 221 | 222 | #################################### Generic OAuth ########################## 223 | [auth.generic_oauth] 224 | ;enabled = false 225 | ;name = OAuth 226 | ;allow_sign_up = true 227 | ;client_id = some_id 228 | ;client_secret = some_secret 229 | ;scopes = user:email,read:org 230 | ;auth_url = https://foo.bar/login/oauth/authorize 231 | ;token_url = https://foo.bar/login/oauth/access_token 232 | ;api_url = https://foo.bar/user 233 | ;team_ids = 234 | ;allowed_organizations = 235 | 236 | #################################### Grafana.net Auth #################### 237 | [auth.grafananet] 238 | ;enabled = false 239 | ;allow_sign_up = true 240 | ;client_id = some_id 241 | ;client_secret = some_secret 242 | ;scopes = user:email 243 | ;allowed_organizations = 244 | 245 | #################################### Auth Proxy ########################## 246 | [auth.proxy] 247 | ;enabled = false 248 | ;header_name = X-WEBAUTH-USER 249 | ;header_property = username 250 | ;auto_sign_up = true 251 | ;ldap_sync_ttl = 60 252 | ;whitelist = 192.168.1.1, 192.168.2.1 253 | 254 | #################################### Basic Auth ########################## 255 | [auth.basic] 256 | ;enabled = true 257 | 258 | #################################### Auth LDAP ########################## 259 | [auth.ldap] 260 | ;enabled = false 261 | ;config_file = /etc/grafana/ldap.toml 262 | ;allow_sign_up = true 263 | 264 | #################################### SMTP / Emailing ########################## 265 | [smtp] 266 | ;enabled = false 267 | ;host = localhost:25 268 | ;user = 269 | ;password = 270 | ;cert_file = 271 | ;key_file = 272 | ;skip_verify = false 273 | ;from_address = admin@grafana.localhost 274 | 275 | [emails] 276 | ;welcome_email_on_sign_up = false 277 | 278 | #################################### Logging ########################## 279 | [log] 280 | # Either "console", "file", "syslog". Default is console and file 281 | # Use space to separate multiple modes, e.g. "console file" 282 | ;mode = console file 283 | 284 | # Either "trace", "debug", "info", "warn", "error", "critical", default is "info" 285 | ;level = info 286 | 287 | # optional settings to set different levels for specific loggers. Ex filters = sqlstore:debug 288 | ;filters = 289 | 290 | 291 | # For "console" mode only 292 | [log.console] 293 | ;level = 294 | 295 | # log line format, valid options are text, console and json 296 | ;format = console 297 | 298 | # For "file" mode only 299 | [log.file] 300 | ;level = 301 | 302 | # log line format, valid options are text, console and json 303 | ;format = text 304 | 305 | # This enables automated log rotate(switch of following options), default is true 306 | ;log_rotate = true 307 | 308 | # Max line number of single file, default is 1000000 309 | ;max_lines = 1000000 310 | 311 | # Max size shift of single file, default is 28 means 1 << 28, 256MB 312 | ;max_size_shift = 28 313 | 314 | # Segment log daily, default is true 315 | ;daily_rotate = true 316 | 317 | # Expired days of log file(delete after max days), default is 7 318 | ;max_days = 7 319 | 320 | [log.syslog] 321 | ;level = 322 | 323 | # log line format, valid options are text, console and json 324 | ;format = text 325 | 326 | # Syslog network type and address. This can be udp, tcp, or unix. If left blank, the default unix endpoints will be used. 327 | ;network = 328 | ;address = 329 | 330 | # Syslog facility. user, daemon and local0 through local7 are valid. 331 | ;facility = 332 | 333 | # Syslog tag. By default, the process' argv[0] is used. 334 | ;tag = 335 | 336 | 337 | #################################### AMQP Event Publisher ########################## 338 | [event_publisher] 339 | ;enabled = false 340 | ;rabbitmq_url = amqp://localhost/ 341 | ;exchange = grafana_events 342 | 343 | ;#################################### Dashboard JSON files ########################## 344 | [dashboards.json] 345 | ;enabled = false 346 | ;path = /var/lib/grafana/dashboards 347 | 348 | #################################### Alerting ###################################### 349 | [alerting] 350 | # Makes it possible to turn off alert rule execution. 351 | ;execute_alerts = true 352 | 353 | #################################### Internal Grafana Metrics ########################## 354 | # Metrics available at HTTP API Url /api/metrics 355 | [metrics] 356 | # Disable / Enable internal metrics 357 | ;enabled = true 358 | 359 | # Publish interval 360 | ;interval_seconds = 10 361 | 362 | # Send internal metrics to Graphite 363 | [metrics.graphite] 364 | # Enable by setting the address setting (ex localhost:2003) 365 | ;address = 366 | ;prefix = prod.grafana.%(instance_name)s. 367 | 368 | #################################### Internal Grafana Metrics ########################## 369 | # Url used to to import dashboards directly from Grafana.net 370 | [grafana_net] 371 | ;url = https://grafana.net 372 | 373 | #################################### External image storage ########################## 374 | [external_image_storage] 375 | # Used for uploading images to public servers so they can be included in slack/email messages. 376 | # you can choose between (s3, webdav) 377 | ;provider = 378 | 379 | [external_image_storage.s3] 380 | ;bucket_url = 381 | ;access_key = 382 | ;secret_key = 383 | 384 | [external_image_storage.webdav] 385 | ;url = 386 | ;username = 387 | ;password = 388 | -------------------------------------------------------------------------------- /grafana/provisioning/dashboards/dashboardReference.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | providers: 4 | - name: 'dashboards' 5 | orgId: 1 6 | type: file 7 | updateIntervalSeconds: 30 8 | options: 9 | path: /etc/dashboards 10 | foldersFromFilesStructure: true -------------------------------------------------------------------------------- /grafana/provisioning/datasources/influxDB.yml: -------------------------------------------------------------------------------- 1 | apiVersion: 1 2 | 3 | datasources: 4 | - name: InfluxDB 5 | type: influxdb 6 | access: proxy 7 | url: http://influxdb:8086 8 | secureJsonData: 9 | token: myadmintoken 10 | jsonData: 11 | version: Flux 12 | organization: myorganization 13 | defaultBucket: mybucket 14 | tlsSkipVerify: true -------------------------------------------------------------------------------- /influxdb/config.yml: -------------------------------------------------------------------------------- 1 | assets-path: "" 2 | bolt-path: /var/lib/influxdb2/influxd.bolt 3 | e2e-testing: false 4 | engine-path: /var/lib/influxdb2/engine 5 | feature-flags: {} 6 | flux-log-enabled: false 7 | http-bind-address: :8086 8 | http-idle-timeout: 3m0s 9 | http-read-header-timeout: 10s 10 | http-read-timeout: 0s 11 | http-write-timeout: 0s 12 | influxql-max-select-buckets: 0 13 | influxql-max-select-point: 0 14 | influxql-max-select-series: 0 15 | key-name: "" 16 | log-level: info 17 | metrics-disabled: false 18 | nats-max-payload-bytes: 1048576 19 | nats-port: 4222 20 | no-tasks: false 21 | pprof-disabled: false 22 | query-concurrency: 1024 23 | query-initial-memory-bytes: 0 24 | query-max-memory-bytes: 0 25 | query-memory-bytes: 9223372036854775807 26 | query-queue-size: 1024 27 | reporting-disabled: false 28 | secret-store: bolt 29 | session-length: 60 30 | session-renew-disabled: false 31 | sqlite-path: "" 32 | storage-cache-max-memory-size: 1073741824 33 | storage-cache-snapshot-memory-size: 26214400 34 | storage-cache-snapshot-write-cold-duration: 10m0s 35 | storage-compact-full-write-cold-duration: 4h0m0s 36 | storage-compact-throughput-burst: 50331648 37 | storage-max-concurrent-compactions: 0 38 | storage-max-index-log-file-size: 1048576 39 | storage-no-validate-field-size: false 40 | storage-retention-check-interval: 30m0s 41 | storage-series-file-max-concurrent-snapshot-compactions: 0 42 | storage-series-id-set-cache-size: 0 43 | storage-shard-precreator-advance-period: 30m0s 44 | storage-shard-precreator-check-interval: 10m0s 45 | storage-tsm-use-madv-willneed: false 46 | storage-validate-keys: false 47 | storage-wal-fsync-delay: 0s 48 | storage-wal-max-concurrent-writes: 0 49 | storage-wal-max-write-delay: 10m0s 50 | storage-write-timeout: 10s 51 | store: disk 52 | testing-always-allow-setup: false 53 | tls-cert: "" 54 | tls-key: "" 55 | tls-min-version: "1.2" 56 | tls-strict-ciphers: false 57 | tracing-type: "" 58 | ui-disabled: false 59 | vault-addr: "" 60 | vault-cacert: "" 61 | vault-capath: "" 62 | vault-client-cert: "" 63 | vault-client-key: "" 64 | vault-client-timeout: 0s 65 | vault-max-retries: 0 66 | vault-skip-verify: false 67 | vault-tls-server-name: "" 68 | vault-token: "" 69 | -------------------------------------------------------------------------------- /influxdb/influxdb.env: -------------------------------------------------------------------------------- 1 | DOCKER_INFLUXDB_INIT_MODE=setup 2 | DOCKER_INFLUXDB_INIT_USERNAME=admin 3 | DOCKER_INFLUXDB_INIT_PASSWORD=admin123456 4 | DOCKER_INFLUXDB_INIT_ORG=myorganization 5 | DOCKER_INFLUXDB_INIT_BUCKET=mybucket 6 | DOCKER_INFLUXDB_INIT_ADMIN_TOKEN=myadmintoken -------------------------------------------------------------------------------- /postgres/postgres.env: -------------------------------------------------------------------------------- 1 | POSTGRESQL_USERNAME=grafana 2 | POSTGRESQL_PASSWORD=grafana 3 | POSTGRESQL_DATABASE=grafana -------------------------------------------------------------------------------- /telegraf/telegraf.env: -------------------------------------------------------------------------------- 1 | INFLUXDB_INIT_ORG=myorganization 2 | INFLUXDB_INIT_BUCKET=mybucket 3 | INFLUXDB_INIT_ADMIN_TOKEN=myadmintoken --------------------------------------------------------------------------------