Filip Pytloun | d6fa6ab | 2016-08-03 15:59:49 +0200 | [diff] [blame] | 1 | |
| 2 | ======== |
| 3 | InfluxDB |
| 4 | ======== |
| 5 | |
| 6 | InfluxData is based on the TICK stack, the first open source platform for managing IoT time-series data at scale. |
| 7 | |
| 8 | Sample pillars |
| 9 | ============== |
| 10 | |
| 11 | Single-node influxdb, enabled http frontend and admin web interface: |
| 12 | |
| 13 | .. code-block:: yaml |
| 14 | |
| 15 | influxdb: |
| 16 | server: |
| 17 | enabled: true |
| 18 | http: |
| 19 | enabled: true |
| 20 | bind: |
| 21 | address: 0.0.0.0 |
| 22 | port: 8086 |
| 23 | admin: |
| 24 | enabled: true |
| 25 | bind: |
| 26 | address: 0.0.0.0 |
| 27 | port: 8083 |
| 28 | |
| 29 | Single-node influxdb, SSL for http frontend: |
| 30 | |
| 31 | .. code-block:: yaml |
| 32 | |
| 33 | influxdb: |
| 34 | server: |
| 35 | enabled: true |
| 36 | http: |
| 37 | bind: |
| 38 | ssl: |
| 39 | enabled: true |
| 40 | key_file: /etc/influxdb/ssl/key.pem |
| 41 | cert_file: /etc/influxdb/ssl/cert.pem |
| 42 | |
Guillaume Thouvenin | 1091d46 | 2016-11-14 11:53:10 +0100 | [diff] [blame] | 43 | Single-node influxdb where you specify paths for data and metastore directories. You |
| 44 | need to ensure that directories exist: |
| 45 | |
| 46 | .. code-block:: yaml |
| 47 | |
| 48 | influxdb: |
| 49 | server: |
| 50 | enabled: true |
| 51 | data: |
| 52 | dir: '/opt/influxdb/data' |
| 53 | wal_dir: '/opt/influxdb/wal' |
| 54 | meta: |
| 55 | dir: '/opt/influxdb/meta' |
| 56 | |
Guillaume Thouvenin | 071a93e | 2016-10-24 17:22:23 +0200 | [diff] [blame] | 57 | Single-node influxdb with an admin user: |
| 58 | |
| 59 | .. code-block:: yaml |
| 60 | |
| 61 | influxdb: |
| 62 | server: |
| 63 | enabled: true |
| 64 | http: |
| 65 | enabled: true |
| 66 | bind: |
| 67 | address: 0.0.0.0 |
| 68 | port: 8086 |
| 69 | admin: |
| 70 | enabled: true |
| 71 | bind: |
| 72 | address: 0.0.0.0 |
| 73 | port: 8083 |
| 74 | user: |
| 75 | enabled: true |
| 76 | name: root |
| 77 | password: secret |
| 78 | |
| 79 | Single-node influxdb with new users: |
| 80 | |
| 81 | .. code-block:: yaml |
| 82 | |
| 83 | influxdb: |
| 84 | server: |
| 85 | user: |
| 86 | user1: |
| 87 | enabled: true |
| 88 | admin: true |
| 89 | name: username1 |
| 90 | password: keepsecret1 |
| 91 | user2: |
| 92 | enabled: true |
| 93 | admin: false |
| 94 | name: username2 |
| 95 | password: keepsecret2 |
| 96 | |
| 97 | Single-node influxdb with new databases: |
| 98 | |
| 99 | .. code-block:: yaml |
| 100 | |
| 101 | influxdb: |
| 102 | server: |
| 103 | database: |
| 104 | mydb1: |
| 105 | enabled: true |
| 106 | name: mydb1 |
| 107 | mydb2: |
| 108 | enabled: true |
| 109 | name: mydb2 |
| 110 | |
Swann Croiset | 1eaf361 | 2016-12-02 14:42:48 +0100 | [diff] [blame] | 111 | Manage the retention policies for a database: |
| 112 | |
| 113 | .. code-block:: yaml |
| 114 | |
| 115 | influxdb: |
| 116 | server: |
| 117 | database: |
| 118 | mydb1: |
| 119 | enabled: true |
| 120 | name: mydb1 |
| 121 | retention_policy: |
| 122 | - name: rp_db1 |
| 123 | duration: 30d |
| 124 | replication: 1 |
| 125 | is_default: true |
| 126 | |
| 127 | Where default values are: |
| 128 | |
| 129 | * name = autogen |
| 130 | * duration = INF |
| 131 | * replication = 1 |
| 132 | * is_default: false |
| 133 | |
| 134 | |
Guillaume Thouvenin | 071a93e | 2016-10-24 17:22:23 +0200 | [diff] [blame] | 135 | Here is how to manage grants on database: |
| 136 | |
| 137 | .. code-block:: yaml |
| 138 | |
| 139 | influxdb: |
| 140 | server: |
| 141 | grant: |
| 142 | username1_mydb1: |
| 143 | enabled: true |
| 144 | user: username1 |
| 145 | database: mydb1 |
| 146 | privilege: all |
| 147 | username2_mydb1: |
| 148 | enabled: true |
| 149 | user: username2 |
| 150 | database: mydb1 |
| 151 | privilege: read |
| 152 | username2_mydb2: |
| 153 | enabled: true |
| 154 | user: username2 |
| 155 | database: mydb2 |
| 156 | privilege: write |
| 157 | |
Filip Pytloun | d6fa6ab | 2016-08-03 15:59:49 +0200 | [diff] [blame] | 158 | InfluxDB relay: |
| 159 | |
| 160 | .. code-block:: yaml |
| 161 | |
| 162 | influxdb: |
| 163 | server: |
| 164 | enabled: true |
| 165 | http: |
| 166 | enabled: true |
| 167 | output: |
| 168 | idb01: |
| 169 | location: http://idb01.local:8086/write |
| 170 | timeout: 10 |
| 171 | idb02: |
| 172 | location: http://idb02.local:8086/write |
| 173 | timeout: 10 |
| 174 | udp: |
| 175 | enabled: true |
| 176 | output: |
| 177 | idb01: |
| 178 | location: idb01.local:9096 |
| 179 | idb02: |
| 180 | location: idb02.local:9096 |
| 181 | |
Filip Pytloun | e93852a | 2016-08-03 16:42:42 +0200 | [diff] [blame] | 182 | InfluxDB cluster: |
| 183 | |
| 184 | .. code-block:: yaml |
| 185 | |
| 186 | influxdb: |
| 187 | server: |
| 188 | enabled: true |
| 189 | meta: |
| 190 | bind: |
| 191 | address: 0.0.0.0 |
| 192 | port: 8088 |
| 193 | http_address: 0.0.0.0 |
| 194 | http_port: 8091 |
| 195 | cluster: |
| 196 | members: |
| 197 | - host: idb01.local |
| 198 | port: 8091 |
| 199 | - host: idb02.local |
| 200 | port: 8091 |
| 201 | - host: idb03.local |
| 202 | port: 8091 |
| 203 | |
Filip Pytloun | d6fa6ab | 2016-08-03 15:59:49 +0200 | [diff] [blame] | 204 | Deploy influxdb apt repository (using linux formula): |
| 205 | |
| 206 | .. code-block:: yaml |
| 207 | |
| 208 | linux: |
| 209 | system: |
| 210 | os: ubuntu |
| 211 | dist: xenial |
Guillaume Thouvenin | fa42e98 | 2016-10-21 12:23:23 +0200 | [diff] [blame] | 212 | repo: |
| 213 | influxdb: |
| 214 | enabled: true |
| 215 | source: 'deb https://repos.influxdata.com/${linux:system:os} ${linux:system:dist} stable' |
| 216 | key_url: 'https://repos.influxdata.com/influxdb.key' |
Filip Pytloun | d6fa6ab | 2016-08-03 15:59:49 +0200 | [diff] [blame] | 217 | |
| 218 | Read more |
| 219 | ========= |
| 220 | |
| 221 | * https://influxdata.com/time-series-platform/influxdb/ |