github.com/simpleiot/simpleiot@v0.18.3/docs/user/database.md (about) 1 # Database Client 2 3 The main [SIOT store](../ref/store.md) is SQLite. SIOT supports additional 4 database clients for purposes such as storing time-series data. 5 6 ## InfluxDB 2.x 7 8 Point data can be stored in an InfluxDB 2.0 Database by adding a Database node: 9 10 <img src="assets/image-20240319111031186.png" alt="image-20240319111031186" style="zoom:50%;" /> 11 12 The following InfluxDB tags are added to every point: 13 14 - `node.id` (typically a UUID) 15 - `node.type` (extracted from the type field in the edge data structure) 16 - `node.description` (generated from the `description` point from the node) 17 18 ### Custom InfluxDB Tags 19 20 Additional tag tag points can be specified. The DB client will query and cache 21 node points of these types for any point flowing through the system and then 22 InfluxDB tags in the format: `node.<point type>.<point key>`. In the below 23 example, we added a machine tag to the signal generator node generating the 24 data. 25 26 <img src="assets/image-20240319112828216.png" alt="image-20240319112828216" style="zoom:50%;" /> 27 28 When the `tag` field is specified in the database node, this `machine` tag is 29 now added to the Influx tags for every sample. 30 31 - `value` and `type` and fields from the point 32 - `node.description` and `node.type` are automatically added 33 - `node.tag.machine` got added because the `tag` point was added to the list of 34 node points that get added as tags. 35 36  37 38 See the [Graphing documentation](graphing.md) for information on how to 39 automatically map tags to graph labels. 40 41 InfluxDB indexes tags, so generally there is not a huge cost to adding tags to 42 samples as the long string is only stored once. 43 44 ## Victoria Metrics 45 46 Victoria Metrics 47 [supports the InfluxDB v2](https://docs.victoriametrics.com/#how-to-send-data-in-influxdb-v2-format) 48 line protocol; therefore, it can be used for numerical data. Victoria Metrics 49 [does not support storing strings](https://stackoverflow.com/questions/66406899/does-victoriametrics-have-some-way-to-store-string-value-instead-float64).