![]() ![]() Therefore you need to add a WHERE clause to the query to filter out values.įor example a query on a % battery for sensor. Querying your data in Influx Sensorsįor sensors with a unit of measurement defined the unit of measurement is used as the measurement name and entries are tagged with the second part of the entity_id. When you remove key columns Influx merges tables, allowing you to make many tables that share a schema for _value into one. As you can see in the example above, a good way to do this is with the keep or drop filters. You can still create aggregate metrics across multiple sensors though. This is a lot more tables compared to 1.xx queries, where you essentially had one table per unit_of_measurement across all entities. If you are operating on data created by the InfluxDB history integration, this means by default, you will have a table for each entity and each attribute of each entity (other then unit_of_measurement and any others you promoted to tags). Note that when working with Flux queries, the resultset is broken into tables, you can see how this works in the Data Explorer of the UI. Sensor : - platform : influxdb api_version : 2 token : GENERATED_AUTH_TOKEN organization : RANDOM_16_DIGIT_HEX_ID bucket : BUCKET_NAME queries_flux : - range_start : " -1d" name : " How long have I been here" query : > filter(fn: (r) => r._domain = "person" and r._entity_id = "me" and r._value != "" - range_start : " -1d" bucket : Glances Bucket name : " Average CPU temp today" query : " filter(fn: (r) => r._field = \" value \" and r.entity_id = \" glances_cpu_temperature \" )" group_function : mean ? - The question mark represents a single character Examples Full configuration for 1.xx installations * - The asterisk represents zero, one, or multiple characters The following characters can be used in entity globs: ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |