iobroker.influxdb 1.9.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +111 -69
  3. package/RetentionPolicies.md +48 -0
  4. package/admin/custom_m.html +0 -156
  5. package/admin/i18n/de/translations.json +54 -42
  6. package/admin/i18n/en/translations.json +53 -41
  7. package/admin/i18n/es/translations.json +53 -41
  8. package/admin/i18n/fr/translations.json +53 -41
  9. package/admin/i18n/it/translations.json +53 -41
  10. package/admin/i18n/nl/translations.json +53 -41
  11. package/admin/i18n/pl/translations.json +53 -41
  12. package/admin/i18n/pt/translations.json +53 -41
  13. package/admin/i18n/ru/translations.json +53 -41
  14. package/admin/i18n/zh-cn/translations.json +55 -0
  15. package/admin/index_m.html +39 -6
  16. package/admin/influxdb.png +0 -0
  17. package/admin/jsonConfig.json +267 -0
  18. package/admin/jsonCustom.json +269 -0
  19. package/admin/words.js +53 -455
  20. package/docs/de/img/influxdb_Filtern_loggen.jpg +0 -0
  21. package/docs/de/img/influxdb_ioBroker_Adapter_SQL_objects_Data.jpg +0 -0
  22. package/docs/de/img/influxdb_ioBroker_Adapter_SQL_objects_filter.jpg +0 -0
  23. package/docs/de/img/influxdb_ioBroker_Adapter_SQL_objects_timerange.jpg +0 -0
  24. package/docs/de/img/influxdb_ioBroker_Adapter_SQL_objects_type.jpg +0 -0
  25. package/docs/de/img/influxdb_ioBroker_Adapter_influxDB_Konfig.jpg +0 -0
  26. package/docs/de/img/influxdb_ioBroker_Adapter_influxDB_objects.jpg +0 -0
  27. package/docs/de/img/influxdb_ioBroker_Adapter_rickshaw03.jpg +0 -0
  28. package/docs/de/img/influxdb_ioBroker_adapter_History_devices.jpg +0 -0
  29. package/docs/de/influxdb.md +101 -0
  30. package/io-package.json +227 -313
  31. package/lib/Database.js +29 -0
  32. package/lib/DatabaseInfluxDB1x.js +130 -0
  33. package/lib/DatabaseInfluxDB2x.js +352 -0
  34. package/lib/tools.js +99 -0
  35. package/main.js +609 -229
  36. package/package.json +27 -14
  37. package/.github/ISSUE_TEMPLATE/bug_report.md +0 -32
  38. package/.github/ISSUE_TEMPLATE/feature_request.md +0 -20
  39. package/.github/dependabot.yml +0 -16
  40. package/.github/stale.yml +0 -78
  41. package/.github/workflows/test-and-release.yml +0 -159
  42. package/admin/custom.html +0 -180
  43. package/admin/index.html +0 -240
  44. package/lib/node-influx/README.md +0 -453
  45. package/lib/node-influx/index.js +0 -478
  46. package/lib/node-influx/lib/InfluxRequest.js +0 -135
  47. package/lib/node-influx/package.json +0 -40
  48. package/lib/node-influx-3.5.0/README.md +0 -300
  49. package/lib/node-influx-3.5.0/index.js +0 -379
  50. package/lib/node-influx-3.5.0/lib/InfluxRequest.js +0 -144
  51. package/lib/node-influx-3.5.0/package.json +0 -33
  52. package/lib/node-influx-3.5.0/test.js +0 -467
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016-2020 bluefox <dogafox@gmail.com>, apollon77
3
+ Copyright (c) 2016-2021 bluefox <dogafox@gmail.com>, apollon77
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,25 +1,66 @@
1
1
  ![Logo](admin/influxdb.png)
2
2
  # ioBroker.influxdb
3
3
 
4
- ![Number of Installations](http://iobroker.live/badges/influxdb-installed.svg) ![Number of Installations](http://iobroker.live/badges/influxdb-stable.svg) [![NPM version](http://img.shields.io/npm/v/iobroker.influxdb.svg)](https://www.npmjs.com/package/iobroker.influxdb)
5
- [![Downloads](https://img.shields.io/npm/dm/iobroker.influxdb.svg)](https://www.npmjs.com/package/iobroker.influxdb)
6
- [![Tests](http://img.shields.io/travis/ioBroker/ioBroker.history/master.svg)](https://travis-ci.org/ioBroker/ioBroker.history)
4
+ ![Number of Installations](http://iobroker.live/badges/influxdb-installed.svg)
5
+ ![Number of Installations](http://iobroker.live/badges/influxdb-stable.svg)
6
+ [![NPM version](http://img.shields.io/npm/v/iobroker.influxdb.svg)](https://www.npmjs.com/package/iobroker.influxdb)
7
7
 
8
- [![NPM](https://nodei.co/npm/iobroker.influxdb.png?downloads=true)](https://nodei.co/npm/iobroker.influxdb/) [![Greenkeeper badge](https://badges.greenkeeper.io/ioBroker/ioBroker.influxdb.svg)](https://greenkeeper.io/)
8
+ ![Test and Release](https://github.com/ioBroker/ioBroker.influxdb/workflows/Test%20and%20Release/badge.svg)
9
+ [![Translation status](https://weblate.iobroker.net/widgets/adapters/-/influxdb/svg-badge.svg)](https://weblate.iobroker.net/engage/adapters/?utm_source=widget)
10
+ [![Downloads](https://img.shields.io/npm/dm/iobroker.influxdb.svg)](https://www.npmjs.com/package/iobroker.influxdb)
9
11
 
10
12
  This adapter saves state history into InfluxDB.
11
13
 
12
- **Only InfluxDB >= v0.9 supported, v1.0 recommended**
14
+ **The Adapter supports InfluxDB 1.x and 2.x**
13
15
 
14
16
  **This adapter uses Sentry libraries to automatically report exceptions and code errors to the developers.** For more details and for information how to disable the error reporting see [Sentry-Plugin Documentation](https://github.com/ioBroker/plugin-sentry#plugin-sentry)! Sentry reporting is used starting with js-controller 3.0.
15
17
 
18
+ ## InfluxDB version support
19
+
20
+ ### InfluxDB 1.x
21
+ If you have an InfluxDB 1.x installation (preferably 1.8.x or 1.9.x) then you choose " 1.x" in the adapter configuration and enter the Host-IP and Port together with Username and Password for the Access.
22
+ You can also define a database name. The default is "iobroker". On first adapter start this database is created.
23
+
24
+ When doing custom queries via the "query" message you can use InfluxQL to select the data you want.
25
+
26
+ ### InfluxDB 2.x
27
+ Since 2.0 of the adapter also InfluxDB 2.x is supported which works a bit different.
28
+ Here beside the Host-IP and Port the following data are required:
29
+ * **Organization**: You need to create an organization on the commandline and need to enter the name or ID of that organization here. If you created one Organization when doing the InfluxDB setup you have created an initial organization and can use this here, else use `influx org list` to see available organizations.
30
+ * **Authentication Token**: You need to create an Authentication token that have sufficient rights to basically do all actions on the provided organization! **Important: For now just use the initial owner auth token because we still struggle on how to create a token that has sufficient permissions. The Owner Token was generated on InfluxDB setup process. If you know how to create the right tokens let us now :-)**
31
+
32
+ You can also define a database name - this is used as Bucket. The default is "iobroker". On first adapter start this bucket is created in the configured organization.
33
+
34
+ When doing custom queries via the "query" message you can use Flux queries to select the data you want. Details on Flux can be found at https://docs.influxdata.com/influxdb/v2.0/reference/flux/
35
+
36
+ #### Store metadata information as tags instead of fields
37
+ For Influx 1.x state value, as well as associated metadata fields (`q`, `ack` and `from`) are stored as fields within InfluxDB. When using Flux-commands to retrieve this data (instead of InfluxQL) the data is returned in separate tables, which makes it more difficult to view the data in a joined way when using external database clients or Influx CLI `query` command. This is by design, as Influx only supports one field per data-point.
38
+
39
+ With Influx 2.x it is now also possible, to store this metadata-information besides the actual value of the state as Influx Tags. Tags are indexed and allow for faster search queries. In addition they are closely linked to the measurement stored within the db, meaning they will be returned in one table with the queried measurement which makes them much easier to handle, when used outside of this adapter. There are limitations with this however:
40
+ - The use of tags for metadata needs to be enabled under `Advanced Settings`. It is disabled by default.
41
+ - If you decide to use tags, you cannot continue to use old measurements that were gathered with Influx 1.x, as they are stored in fields.
42
+ - Attempting to use an existing database that was setup without enabling the Tag-feature will cause the adapter to fail to initialize and you will see an error message about it in the log.
43
+ - This also is valid the other way: Once you start using the Tag-feature in a new database, you cannot switch back to using fields for this database.
44
+ - This feature is currently only available, if you use Influx 2.x. And only if you use the new responsive GUI of Admin 5.
45
+
46
+ ### Migration from InfluxDB 1 to 2
47
+
48
+ Please refer to the [official guides on how to migrate](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/) from InfluxDB 1.x to 2.x. Especially the [migration instructions for time series data](https://docs.influxdata.com/influxdb/v2.0/upgrade/v1-to-v2/manual-upgrade/#migrate-time-series-data) have been verified to work during adapter testing. Please always create a backup of your data before performing the migration.
49
+
50
+ After the migration, the adapter is able to work with the old data (e.g. for history-queries) as well. This only applies, if you don't decide to [use Tags for storing metadata fields](#Store-metadata-information-as-tags-instead-of-fields).
51
+
52
+ ## Retention Policy
53
+ While Influx 1.x supports the concept of multiple **retention policies** for one database, Influx 2 by design allows only one **retention period** per bucket. Therefore, it is only possible to set one policy for the whole database/bucket with this adapter via _Default Settings -> Storage retention_. The retention selected here will be applied on the fly and can be changed at any time. Retention policies set by the adapter will never be deleted, but instead altered if required, as otherwise Influx 1.x would delete all data that the policy applied to.
54
+
55
+ Please also read [Understanding Retention Policies](RetentionPolicies.md).
56
+
16
57
  ## Direct writes or buffered writes?
17
- With the default configuration the adapter stores each single datapoint directly into the database and only use the internal buffer if the database is not available. If database was not available the buffer is flushed at the given interval, so it can take the defined interval till the missing points are written!
58
+ With the default configuration the adapter stores each single datapoint directly into the database and only use the internal buffer if the database is not available. If the database was not available the buffer is flushed at the given interval, so it can take the defined interval till the missing points are written!
18
59
 
19
60
  By changing the configuration it is possible to cache new datapoints up to a defined count or a defined maximum interval after which all points are stored into the database. This also gives better performance and less system load compared to writing the datapoints directly.
20
61
  InfluxDB has a limitation of the maximum size for writes which is at around 2MB. It should be save to have up to 15.000 datapoints as buffer maximum, maybe also 20.000, but this highly depends on the length of your datapoint-IDs.
21
62
 
22
- On exit of the adapter the buffer is stored and reinitialized with next start, so no datapoints should be lost and will be written after next start.
63
+ On exit of the adapter the buffer is storedon disk and reinitialized with next adapter start, so no datapoints should be lost and will be written after next start.
23
64
 
24
65
  ## InfluxDB and datatypes
25
66
  InfluxDB is very strict on datatypes. The datatype for a measurement value is defined with it's first write.
@@ -29,32 +70,14 @@ errors into the InfluxDB. The adapter detects this and will write these potentia
29
70
  Additionally InfluxDB do not support "null" values, so these are not written at all into the DB.
30
71
 
31
72
  ## Installation of InfluxDB
73
+ Please refer to the official InfluxDB pages for installationinstructions depending on your OS.
32
74
 
33
- **Only influxDB >= v0.9 supported, v1.0 recommended**
34
-
35
- The installation package for windows and other OS's can be downloaded [here](https://www.influxdata.com/downloads/).
75
+ * InfluxDB 1.x: https://docs.influxdata.com/influxdb/v1.8/introduction/install/
76
+ * InfluxDB 2.x: https://docs.influxdata.com/influxdb/v2.0/install/
36
77
 
37
- Before you start influxd.exe under windows, you must edit influxdb.conf file to remove all linux paths. You can use ioBroker certificate as certificate:
78
+ ### Setup authentication for InfluxDB 1.x (optional)
79
+ **NOTE:** Influx DB V2.x relies on organization/token login, instead of username/password! This is only applicable for InfluxDB 1.x
38
80
 
39
- ```
40
- https-certificate = "C:/ioBroker/node_modules/ioBroker.js-controller/conf.key"
41
- ```
42
-
43
- Under debian you can install it with:
44
- ```
45
- sudo apt-get update
46
- sudo apt-get install influxdb
47
- ```
48
-
49
- Best is to add the Influxdata repository before to get the most current version:
50
-
51
- ```
52
- curl -sL https://repos.influxdata.com/influxdb.key | sudo apt-key add -
53
- source /etc/lsb-release
54
- echo "deb https://repos.influxdata.com/${DISTRIB_ID,,} ${DISTRIB_CODENAME} stable" | sudo tee /etc/apt/sources.list.d/influxdb.list
55
- ```
56
-
57
- ### Setup authentication for influxDB (can be omitted)
58
81
  If you use DB localy you may leave authentication disabled and skip this part.
59
82
 
60
83
  - Start service: ``` service influxdb start ```
@@ -80,11 +103,11 @@ Enable authentication, by editing /etc/influxdb/influxdb.conf:
80
103
  ```
81
104
  - Restart service: ``` service influxdb restart ```
82
105
 
83
- ## Installation of Grafana
106
+ ## Installation of Grafana (Charting Tool)
84
107
  There is additional charting tool for InfluxDB - Grafana.
85
108
  It must be installed additionally.
86
109
 
87
- Try to install a current v3.x version of Grafana because InfluxDB support is enhanced there in comparism to v2.x
110
+ Install a current version of Grafana 3.x+ because InfluxDB support is enhanced there in comparism to earlier Grafana versions.
88
111
 
89
112
  Under debian you can install it as described at http://docs.grafana.org/installation/debian/ .
90
113
  For ARM platforms your can check vor v3.x at https://github.com/fg2it/grafana-on-raspberry.
@@ -100,6 +123,7 @@ The multi-query feature is also supported. You can send multiple queries separat
100
123
 
101
124
  That's why the result is always an array with one numbered index for each query.
102
125
 
126
+ ### Influx 1.x
103
127
  Example with one query:
104
128
 
105
129
  ```
@@ -127,6 +151,37 @@ sendTo('influxdb.0', 'query', 'SELECT * FROM iobroker.global."system.adapter.adm
127
151
  ```
128
152
  **NOTE:** The values are coming back in the result array in filename "value" (instead of "val" as normal in ioBroker)
129
153
 
154
+ ### Influx 2.x
155
+ In InfluxDB v2.0 onwards the SQL-based query language *InfluxQL* is deprecated in favour of *Flux*. For more information please refer to [the offical InfluxDB 2.0 documentation](https://docs.influxdata.com/influxdb/v2.0/reference/flux/).
156
+
157
+ Example with one query:
158
+
159
+ ```
160
+ sendTo('influxdb.0', 'query', 'from(bucket: "iobroker") |> range(start: -3h)', function (result) {
161
+ if (result.error) {
162
+ console.error(result.error);
163
+ } else {
164
+ // show result
165
+ console.log('Rows: ' + JSON.stringify(result));
166
+ }
167
+ });
168
+ ```
169
+ Two queries:
170
+ **NOTE:** By default you cannot execute 2 queries at once via Flux-language, as there is no delimiter available. This adapter emulates this behaviour by defining ; as delimiter, so you can still run two queries in one statement.
171
+
172
+ ```
173
+ sendTo('influxdb.0', 'query', 'from(bucket: "iobroker") |> range(start: -3h); from(bucket: "iobroker") |> range(start: -1h)" LIMIT 100', function (result) {
174
+ if (result.error) {
175
+ console.error(result.error);
176
+ } else {
177
+ // show result
178
+ console.log('Rows First: ' + JSON.stringify(result.result[0])); //Values from last 3 hours
179
+ console.log('Rows Second: ' + JSON.stringify(result.result[1])); //Values from last hour
180
+ }
181
+ });
182
+ ```
183
+ **NOTE:** The values are coming back in the result array in filename "value" (instead of "val" as normal in ioBroker)
184
+
130
185
  ## Get history
131
186
  Additional to custom queries, you can use build in system function **getHistory** to access the stored history for datapoints:
132
187
  ```
@@ -245,8 +300,29 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
245
300
  });
246
301
  ```
247
302
 
248
-
303
+ <!--
304
+ Placeholder for the next version (at the beginning of the line):
305
+ ### __WORK IN PROGRESS__
306
+ -->
249
307
  ## Changelog
308
+ ### 2.3.0 (2021-12-14)
309
+ * (bluefox) Support only `js.controller` >= 3.3.x
310
+ * (bluefox) Used system/custom view for collecting the objects
311
+ * (bluefox) Implemented option to ignore zero- or/and below zero- values
312
+
313
+ ### 2.2.0 (2021-08-25)
314
+ * (Excodibur) Added option to store metadata (q, ack, from) as tags instead of fields for Influx 2.x - see README!
315
+ * (Excodibur) Failure to update/set retention policy will now cause warning instead of error/restart, to support more restrictive DB setups
316
+ * (Excodibur/Apollon77) Bug fixes and adjustments
317
+
318
+ ### 2.1.1 (2021-08-13)
319
+ * IMPORTANT: The adapter now requires Admin 5.1.15+ and js-controller 3.3+! For other admin or js-controller versions please use the former v1.9.5 of thi adapter.
320
+ * (Excodibur) Added InfluxDB 2.0 support
321
+ * (Excodibur) Adjust Retention handling on Database level to work for InfluxDB 1.x and 2.x
322
+ * (Excodibur) Removed retention options on datapoint level because never worked and also not supported really by InfluxDB anymore
323
+
324
+ ### 1.9.5 (2021-04-19)
325
+ * (bluefox) Added the support of Admin5
250
326
 
251
327
  ### 1.9.4 (2021-01-17)
252
328
  * (Apollon77) Optimize stop handling
@@ -282,7 +358,7 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
282
358
  * (Apollon77) make sure disabling of datapoints do not crash adapter (Sentry IOBROKER-INFLUXDB-4)
283
359
 
284
360
  ### 1.8.3 (2020-04-29)
285
- * (Apollon77) Fix pot crash case when deleting objects while saving values (Sentry)
361
+ * (Apollon77) Fix pot crash case when deleting objects while saving values (Sentry)
286
362
 
287
363
  ### 1.8.2 (2020-04-19)
288
364
  * __Requires js-controller >= 2.0.0__
@@ -291,40 +367,6 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
291
367
  * (Apollon77) Add Sentry for Error Reporting with js-controller 3.0
292
368
  * (Apollon77) Make sure value undefined is ignored
293
369
 
294
- ## 1.7.0 (2019-12-23)
295
- * (bluefox) Support of compact mode
296
-
297
- ## 1.6.0 (2018-06-19)
298
- * (Apollon77) Add option to log datapoints as other ID (alias) to easier migrate devices and such
299
-
300
- ## 1.5.2 (2018-01-31)
301
- * (Bluefox) Admin3 Fixes
302
-
303
- ## 1.5.1 (2018-01-28)
304
- * (Apollon77) Admin3 Fixes
305
-
306
- ## 1.5.0 (2018-01-14)
307
- * (bluefox) Ready for Admin3
308
-
309
- ## 1.4.8 (2017-10-04)
310
- * (Apollon77) fix relog value feature and enhance type conflict resolving
311
-
312
- ## 1.4.7 (2017-09-11)
313
- * (Apollon77) fixes to save last value
314
- * (Apollon77) add better support when no start date is set for getHistory (used by Admin)
315
-
316
- ## 1.4.6 (2017-08-12)
317
- * (bluefox) add "save last value"
318
-
319
- ## 1.4.5 (2017-08-03)
320
- * (Apollon77) fix behaviour of log interval to always log the current value
321
-
322
- ## 1.4.4 (2017-06-29)
323
- * fix connected datapoint
324
-
325
- ## 1.4.3 (2017-04-07)
326
- * fix in datatype conversions
327
-
328
370
  ### 1.4.2 (2017-03-02)
329
371
  * (Apollon77) Add option to define storage datatype per datapoint inclusing converting the value if needed
330
372
 
@@ -418,7 +460,7 @@ sendTo('influxdb.0', 'getEnabledDPs', {}, function (result) {
418
460
 
419
461
  The MIT License (MIT)
420
462
 
421
- Copyright (c) 2015-2020 bluefox, apollon77
463
+ Copyright (c) 2015-2021 bluefox, apollon77
422
464
 
423
465
  Permission is hereby granted, free of charge, to any person obtaining a copy
424
466
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,48 @@
1
+ # Understanding retention policies
2
+
3
+ It is important to understand how **Retention Policies** and **Shard Group Durations** are related in order to determine how long data will be kept in InfluxDB.
4
+
5
+
6
+
7
+ Influx stores all measurements within a given time range into the same **Shard** which itself is part of a **Shard Group**. The Shard Group enforces a time range defined by `Shard Group Duration` to all shards, but it is set differently depending on the Influx release.
8
+
9
+ When exceeding the configured `Shard Group Duration`,
10
+
11
+ - a new Shard is created which stores newer measurement data from that point onwards
12
+ - the old Shard with all its measurement-data is still kept in the database, but will be dropped, once the retention policy for the measurement is exceeded
13
+
14
+
15
+ Measurement data-points are not deleted by Influx via "looking" at their retention policies individually, but instead the Shard as a whole is subject to retention policy check and will be dropped, if the retention policy is exceeded. The check however will only be performed on old Shards, meaning Shards that are still active are not checked, as they also still can receive new measurement data points.
16
+
17
+ *Please refer to https://docs.influxdata.com/influxdb/v1.4/concepts/schema_and_data_layout/#shard-group-duration-management for more explanation and examples.*
18
+
19
+
20
+ The following two examples illustrate how the same retention period will be enforced differently, depeding on the configured Shard Group Duration.
21
+
22
+ | | Example 1 | Example 2 |
23
+ |--|--|--|
24
+ | Retention Period | 2 hours | 2 hours |
25
+ | Shard Group Duration | 1 hour | 1 day |
26
+ | How long will data be kept at max? | 2 hours | 1 day |
27
+ | Why? | The Shard is switched every hour, hence Influx will enforce the configured RP once **every hour** and keep only data from the **last 2 hours**. | The Shard is switched once a day, and Influx will then enforce the configured RP, meaning it will only keep data from the last **2 hours**. Because of this, measurement-data inserted at the beginning of the Shard-lifetime in theory should only be kept for 2 hours, but effectively will be kept a **whole day**. |
28
+
29
+ ## iobroker.influxdb Adapter
30
+ The Influx Adapter only allows you to select a **Retention Period** and itself will automatically choose the **Shard Group Duration** according to [official InfluxDB recommendations](https://docs.influxdata.com/influxdb/v2.0/reference/internals/shards/#shard-group-duration).
31
+
32
+ | Bucket retention period | Default shard group duration |
33
+ |--|--|
34
+ | less than 2 days | 1h |
35
+ | between 2 days and 6 months | 1d |
36
+ | greater than 6 months |7d |
37
+
38
+
39
+ The Shard Group Duration can still be altered manually in the DB itself, but in order to keep the adapter configuration manageable, it can not be changed directly within ioBroker.
40
+
41
+ By design the adapter enforces only one global retention policy that applies to all measurements - regardless of the DB version that is used. The policy can be changed at any time, but for the reasons described earlier it might take a while for the changes to take effect.
42
+
43
+ ## Additional considerations
44
+
45
+ - The shard group duration is often configured shorter than the retention period, in order to be enforced effectively. But it is difficult to state this as a general advice, since other factors, like performance should be considered, too. If shard group durations are configured extremely short, this might be beneficial for housekeeping, but it could negatively impact performance, like causing longer query times, or slow write speeds.
46
+ - A retention policy may not be lower than 1 hour. This was a choice made by Influx devs (https://github.com/influxdata/influxdb/issues/5198#issuecomment-166629531) and can only be bypassed by building InfluxDB from latest source with changed values directly.
47
+ - Retention policies are checked by default every 30 minutes. This can be changed however in [server configuration for Influx 1.x](https://docs.influxdata.com/influxdb/v1.8/administration/config/#retention-policy-settings) and [server configuration for Influx 2.x](https://docs.influxdata.com/influxdb/v2.0/reference/config-options/#storage-retention-check-interval). This does **not** bypass the principles explained earlier.
48
+ - **Influx 1.x**: For existing dbs the adapter is able to detect the current default retention policy and will update it. If you modified retention policies manually and now are still experiencing missing data in the adapter, it might be related to the changed default-policy. See also here for more information: https://docs.influxdata.com/influxdb/v1.7/troubleshooting/frequently-asked-questions/#why-am-i-missing-data-after-creating-a-new-default-retention-policy.
@@ -26,28 +26,6 @@
26
26
  <label class="translate">log changes minimal delta (0 = disable delta check)</label>
27
27
  </div>
28
28
  </div>
29
- <div class="row">
30
- <div class="col s4">
31
- </div>
32
- <div class="col s4">
33
- </div>
34
- <div class="col s4">
35
- <select data-field="retention" data-default="31536000">
36
- <option value="0" class="translate">keep forever</option>
37
- <option value="63072000" class="translate">2 years</option>
38
- <option value="31536000" class="translate">1 year</option>
39
- <option value="15811200" class="translate">6 months</option>
40
- <option value="7948800" class="translate">3 months</option>
41
- <option value="2678400" class="translate">1 months</option>
42
- <option value="1209600" class="translate">2 weeks</option>
43
- <option value="604800" class="translate">1 week</option>
44
- <option value="432000" class="translate">5 days</option>
45
- <option value="259200" class="translate">3 days</option>
46
- <option value="86400" class="translate">1 day</option>
47
- </select>
48
- <label class="translate">Storage retention</label>
49
- </div>
50
- </div>
51
29
  <div class="row">
52
30
  <div class="col s4">
53
31
  </div>
@@ -77,116 +55,6 @@
77
55
  <!-- translations -->
78
56
  <script type="text/javascript">
79
57
  systemDictionary = $.extend(systemDictionary, {
80
- "1 day": {
81
- "en": "1 day",
82
- "de": "1 Tag",
83
- "ru": "1 день",
84
- "pt": "1 dia",
85
- "nl": "1 dag",
86
- "fr": "Un jour",
87
- "it": "1 giorno",
88
- "es": "1 día",
89
- "pl": "1 dzień"
90
- },
91
- "1 months": {
92
- "en": "1 months",
93
- "de": "1 Monat",
94
- "ru": "1 месяц",
95
- "pt": "1 mês",
96
- "nl": "1 maanden",
97
- "fr": "1 mois",
98
- "it": "1 mese",
99
- "es": "1 mes",
100
- "pl": "1 miesiąc"
101
- },
102
- "1 week": {
103
- "en": "1 week",
104
- "de": "1 Woche",
105
- "ru": "1 неделя",
106
- "pt": "1 semana",
107
- "nl": "1 week",
108
- "fr": "1 semaine",
109
- "it": "1 settimana",
110
- "es": "1 semana",
111
- "pl": "1 tydzień"
112
- },
113
- "1 year": {
114
- "en": "1 year",
115
- "de": "1 Jahr",
116
- "ru": "1 год",
117
- "pt": "1 ano",
118
- "nl": "1 jaar",
119
- "fr": "1 an",
120
- "it": "1 anno",
121
- "es": "1 año",
122
- "pl": "1 rok"
123
- },
124
- "2 weeks": {
125
- "en": "2 weeks",
126
- "de": "2 Wochen",
127
- "ru": "2 недели",
128
- "pt": "2 semanas",
129
- "nl": "2 weken",
130
- "fr": "2 semaines",
131
- "it": "2 settimane",
132
- "es": "2 semanas",
133
- "pl": "2 tygodnie"
134
- },
135
- "2 years": {
136
- "en": "2 years",
137
- "de": "2 Jahre",
138
- "ru": "2 года",
139
- "pt": "2 anos",
140
- "nl": "2 jaar",
141
- "fr": "2 ans",
142
- "it": "2 anni",
143
- "es": "2 años",
144
- "pl": "2 lata"
145
- },
146
- "3 days": {
147
- "en": "3 days",
148
- "de": "3 Tage",
149
- "ru": "3 дня",
150
- "pt": "3 dias",
151
- "nl": "3 dagen",
152
- "fr": "3 jours",
153
- "it": "3 giorni",
154
- "es": "3 días",
155
- "pl": "3 dni"
156
- },
157
- "3 months": {
158
- "en": "3 months",
159
- "de": "3 Monate",
160
- "ru": "3 месяца",
161
- "pt": "3 meses",
162
- "nl": "3 maanden",
163
- "fr": "3 mois",
164
- "it": "3 mesi",
165
- "es": "3 meses",
166
- "pl": "3 miesiące"
167
- },
168
- "5 days": {
169
- "en": "5 days",
170
- "de": "5 Tage",
171
- "ru": "5 дней",
172
- "pt": "5 dias",
173
- "nl": "5 dagen",
174
- "fr": "5 jours",
175
- "it": "5 giorni",
176
- "es": "5 dias",
177
- "pl": "5 dni"
178
- },
179
- "6 months": {
180
- "en": "6 months",
181
- "de": "6 Monate",
182
- "ru": "6 месяцев",
183
- "pt": "6 meses",
184
- "nl": "6 maanden",
185
- "fr": "6 mois",
186
- "it": "6 mesi",
187
- "es": "6 meses",
188
- "pl": "6 miesięcy"
189
- },
190
58
  "Store as": {
191
59
  "en": "Store as",
192
60
  "de": "Speichern als",
@@ -254,17 +122,6 @@
254
122
  "pl": "Zignoruj ​​zmiany, aż wartość pozostanie niezmieniona przez X Milliseconds <br> (Czas odbicia)",
255
123
  "zh-cn": "忽略更改,直到值保持不变为X毫秒<br>(去抖时间)"
256
124
  },
257
- "Storage retention": {
258
- "en": "Storage retention",
259
- "de": "Storage Vorhaltezeit",
260
- "ru": "Сохранять в файле",
261
- "pt": "Retenção de armazenamento",
262
- "nl": "Opslag retentie",
263
- "fr": "Conservation du stockage",
264
- "it": "Conservazione di memoria",
265
- "es": "Retención de almacenamiento",
266
- "pl": "Przechowywanie danych"
267
- },
268
125
  "enabled": {
269
126
  "en": "enabled",
270
127
  "de": "Aktiviert",
@@ -276,17 +133,6 @@
276
133
  "es": "habilitado",
277
134
  "pl": "włączony"
278
135
  },
279
- "keep forever": {
280
- "en": "keep forever",
281
- "de": "keine automatische Löschung",
282
- "ru": "хранить вечно",
283
- "pt": "mantenha para sempre",
284
- "nl": "blijf voor altijd",
285
- "fr": "garde pour toujours",
286
- "it": "tienilo per sempre",
287
- "es": "mantener para siempre",
288
- "pl": "zachowaj na zawsze"
289
- },
290
136
  "log changes interval(s) (0 = disable)": {
291
137
  "en": "still record the same values (seconds)<br>(0 = disable)",
292
138
  "de": "trotzdem gleiche Werte aufzeichnen (Sekunden) <br> (0 = deaktivieren)",
@@ -369,7 +215,6 @@
369
215
  changesOnly: false,
370
216
  debounce: 0,
371
217
  maxLength: 10,
372
- retention: instanceObj.native.retention,
373
218
  changesRelogInterval: instanceObj.native.changesRelogInterval,
374
219
  changesMinDelta: 0,
375
220
  storageType: '',
@@ -381,7 +226,6 @@
381
226
  changesOnly: true,
382
227
  debounce: instanceObj.native.debounce,
383
228
  maxLength: instanceObj.native.maxLength,
384
- retention: instanceObj.native.retention,
385
229
  changesRelogInterval: instanceObj.native.changesRelogInterval,
386
230
  changesMinDelta: instanceObj.native.changesMinDelta,
387
231
  storageType: '',
@@ -1,43 +1,55 @@
1
1
  {
2
- "History adapter settings": "History-Adapter Einstellungen",
3
- "note": "History Einstellungen mussen für jeden State einzeln gemacht werden auf der Lasche \"States\" und nur wenn adapter aktiv ist",
4
- "Default settings": "Default Einstellungen für Zuständen",
5
- "Start or enable adapter first": "Adapter muss zuerst aktiviert werden",
6
- "debounce": "Entprellzeit(ms)",
7
- "log changes interval(s)": "Gleiche Werte aufzeichnen(s)",
8
- "log changes minimal delta": "Minimale Abweichung vom letzten Wert für Aufzeichnung",
9
- "0 = disable delta check": "0 = Abweichungsprüfung deaktivieren",
10
- "0 = disable": "0 = Deaktivieren",
11
- "retention": "Storage Vorhaltezeit",
12
- "keep forever": "keine automatische Löschung",
13
- "2 years": "2 Jahre",
14
- "1 year": "1 Jahr",
15
- "6 months": "6 Monate",
16
- "3 months": "3 Monate",
17
- "1 months": "1 Monat",
18
- "2 weeks": "2 Wochen",
19
- "1 week": "1 Woche",
20
- "5 days": "5 Tage",
21
- "3 days": "3 Tage",
22
- "1 day": "1 Tag",
23
- "SQL history adapter settings": "SQL history adapter Einstellungen",
24
- "DB settings:": "DB Einstellungen:",
25
- "DB Type": "DB Typ",
26
- "DB Name": "DB Name",
27
- "Save last previous value": "Speichere letztes Wert bei Änderung",
28
- "Host": "Host",
29
- "Port": "Port",
30
- "User": "Login",
31
- "Password": "Kennwort",
32
- "Password confirm": "Kennwort-Wiederholung",
33
- "Encrypt:": "Verschlüsseln:",
34
- "Test connection": "Verbindung testen",
35
- "Round real to": "Aufrunden auf",
36
- "Buffer Datapoints": "Schreibaktionen sammeln",
37
- "use 0 to not buffer at all": "Wert 0 schreibt Werte direkt",
38
- "Buffer Flush Interval": "Schreibintervall",
39
- "Seconds": "Sekunden",
40
- "Are you sure? All data will be dropped.": "Sind Sie sicher? ALLE Daten werden geöscht.",
41
- "Reset DB": "Alle Daten in DB löschen",
42
- "Ok": "Ok"
43
- }
2
+ "0 = disable": "0 = Deaktivieren",
3
+ "0 = disable delta check": "0 = Abweichungsprüfung deaktivieren",
4
+ "1 day": "1 Tag",
5
+ "1 months": "1 Monat",
6
+ "1 week": "1 Woche",
7
+ "1 year": "1 Jahr",
8
+ "2 weeks": "2 Wochen",
9
+ "2 years": "2 Jahre",
10
+ "3 days": "3 Tage",
11
+ "3 months": "3 Monate",
12
+ "5 days": "5 Tage",
13
+ "6 months": "6 Monate",
14
+ "Apply lower retention": "Geringere Vorhaltezeit anwenden",
15
+ "Are you sure? All data will be dropped.": "Sollen wirklich alle Daten gelöscht werden? ",
16
+ "Buffer Datapoints": "Schreibaktionen zusammenfassen",
17
+ "Buffer Flush Interval": "Schreibintervall",
18
+ "Confirmation required.": "Bestätigung erforderlich.",
19
+ "DB Name": "DB Name",
20
+ "DB Type": "DB Typ",
21
+ "DB settings:": "DB Einstellungen:",
22
+ "DB version": "DB-Version",
23
+ "De-bounce time": "Entprellzeit",
24
+ "Default settings": "Standardeinstellungen",
25
+ "Encrypt:": "Verschlüsseln:",
26
+ "Expert Settings": "Experteneinstellungen",
27
+ "History adapter settings": "History-Adapter Einstellungen",
28
+ "Host": "Server",
29
+ "Lowering the retention period should be considered with caution: Past data exceeding the retention period will be lost.": "Eine Verkürzung der Vorhaltezeit ist mit Vorsicht zu genießen: Vergangene Daten, die die Vorhaltezeit überschreiten, gehen verloren.",
30
+ "Ok": "Ok",
31
+ "Organization": "Organisation",
32
+ "Password": "Passwort",
33
+ "Password confirm": "Passwort-Wiederholung",
34
+ "Please confirm!": "Bitte bestätigen!",
35
+ "Port": "Port",
36
+ "Reset DB": "Alle Daten in Datenbank löschen",
37
+ "Round real to": "Aufrunden auf",
38
+ "SQL history adapter settings": "SQL History Adapter Einstellungen",
39
+ "Save last previous value": "Speichere vorherigen Wert",
40
+ "Seconds": "Sekunden",
41
+ "Start or enable adapter first": "Adapter muss zuerst aktiviert werden",
42
+ "Test connection": "Verbindung testen",
43
+ "This feature can only be used on databases that are empty, or already were setup with this feature enabled. Otherwise it will cause errors (see logs).": "Diese Funktion kann nur für Datenbanken verwendet werden, die leer sind oder bereits mit aktivierter Funktion eingerichtet wurden. Andernfalls kommt es zu Fehlern (siehe Protokolle).",
44
+ "Token": "Token",
45
+ "Use tags to store metadata information, instead of fields": "Verwende Tags, anstelle von Feldern, um Metadateninformationen zu speichern",
46
+ "User": "Benutzer",
47
+ "debounce": "Änderungen ignorieren, bis der Wert für X Millisekunden unverändert bleibt",
48
+ "keep forever": "keine automatische Löschung",
49
+ "log changes interval(s)": "trotzdem gleiche Werte aufzeichnen (Sekunden)",
50
+ "log changes minimal delta": "Minimale Differenz zum letzten Wert",
51
+ "note": "History Einstellungen müssen für jeden State einzeln gemacht werden, im Tab \"States\" und nur wenn die Adapter Instanz aktiv ist",
52
+ "retention": "Storage Vorhaltezeit",
53
+ "use 0 to not buffer at all": "Wert 0 schreibt Werte direkt",
54
+ "usetags help": "Weitere Informationen finden Sie in der Dokumentation: https://github.com/ioBroker/ioBroker.influxdb/blob/master/README.md#Store-metadata-information-as-tags-instead-of-fields"
55
+ }