{"id":24991213,"url":"https://github.com/bjoern-hempel/influxdb-react-app","last_synced_at":"2026-01-08T02:07:10.084Z","repository":{"id":275304339,"uuid":"925694938","full_name":"bjoern-hempel/influxdb-react-app","owner":"bjoern-hempel","description":null,"archived":false,"fork":false,"pushed_at":"2025-02-01T14:37:36.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T15:29:40.477Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bjoern-hempel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-01T14:14:43.000Z","updated_at":"2025-02-01T14:37:40.000Z","dependencies_parsed_at":"2025-02-01T15:30:34.986Z","dependency_job_id":"b5715280-7c4c-4d6d-91eb-ef1704a25eee","html_url":"https://github.com/bjoern-hempel/influxdb-react-app","commit_stats":null,"previous_names":["bjoern-hempel/influxdb-react-app"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Finfluxdb-react-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Finfluxdb-react-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Finfluxdb-react-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bjoern-hempel%2Finfluxdb-react-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bjoern-hempel","download_url":"https://codeload.github.com/bjoern-hempel/influxdb-react-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246187240,"owners_count":20737462,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-04T13:47:33.376Z","updated_at":"2026-01-08T02:07:10.040Z","avatar_url":"https://github.com/bjoern-hempel.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# InfluxDB ReactJS App\r\n\r\n## Start InfluxDB Server\r\n\r\nCopy credential files:\r\n\r\n```shell\r\ncp .env.influxdb2-admin-password.dist .env.influxdb2-admin-password\r\ncp .env.influxdb2-admin-username.dist .env.influxdb2-admin-username\r\ncp .env.influxdb2-admin-token.dist .env.influxdb2-admin-token\r\n```\r\n\r\nCustomize these as you wish.\r\n\r\nStart the InfluxDB Server:\r\n\r\n```shell\r\ndocker compose up -d\r\n```\r\n\r\nFind out the InfluxDB Version:\r\n\r\n```shell\r\ndocker compose exec influxdb2 influxd version\r\n```\r\n\r\n```shell\r\nInfluxDB v2.7.11 (git: fbf5d4ab5e) build_date: 2024-12-02T17:48:15Z\r\n```\r\n\r\nOpen the project in your browser:\r\n\r\n* http://localhost:8086 (InfluxDB backend)\r\n\r\n\u003e Hint: If you want to use real urls instead of using port numbers, try to use https://github.com/bjoern-hempel/local-traefik-proxy\r\n\u003e\r\n\u003e * https://www.influxdb.localhost\r\n\r\n## InfluxDB Terminology\r\n\r\n| Term               | Description                                                                                                    |\r\n|--------------------|----------------------------------------------------------------------------------------------------------------|\r\n| **Bucket**         | A named storage container in InfluxDB that holds time-series data. Each bucket has a defined retention period. |\r\n| **Retention Time** | The duration for which data is stored in a bucket before being automatically deleted.                          |\r\n| **Measurement**    | A logical grouping of time-series data, similar to a table in relational databases.                            |\r\n| **Field**          | A key-value pair representing a metric or recorded value. Fields store actual data and are not indexed.        |\r\n| **Value**          | The actual recorded data associated with a field, such as numbers, strings, or booleans.                       |\r\n| **Tag**            | A key-value pair used for metadata to organize and filter data efficiently. Tags are indexed for fast queries. |\r\n| **Point**          | A single data record in InfluxDB that consists of a measurement, timestamp, tags, and fields.                  |\r\n| **Schema**         | The design of how data is structured within InfluxDB, including measurements, fields, and tags.                |\r\n| **Task**           | A scheduled automation script that executes Flux queries to process or transform data periodically.            |\r\n| **Aggregation**    | A function that summarizes data over a time range, such as `mean()`, `sum()`, `min()`, `max()`, or `count()`.  |\r\n\r\n## First manual entries\r\n\r\n### Create new bucket\r\n\r\nMenu:\r\n\r\n* Load Data \u003e Buckets \u003e Create bucket \u003e `climate`\r\n* Retention Time \u003e Older than 30 days\r\n\r\n### InfluxDb Format\r\n\r\n* See: https://docs.influxdata.com/influxdb/v2/reference/syntax/line-protocol/\r\n\r\n```text\r\nmeasurementName,tagKey=tagValue fieldKey=\"fieldValue\" 1465839830100400200\r\n--------------- --------------- --------------------- -------------------\r\n       |               |                  |                    |\r\n  Measurement       Tag set           Field set            Timestamp\r\n```\r\n\r\n### Add data\r\n\r\n#### Via Line Protocol\r\n\r\n* See for good schemas: https://docs.influxdata.com/influxdb/v2/write-data/best-practices/schema-design/\r\n\r\nMenu:\r\n\r\n* Load Data \u003e Sources \u003e Line Protocol \u003e `climate` \u003e Enter manually\r\n\r\n```\r\nweather,city=Dresden,country=de temperature=0.0,humidity=76,pressure=1032,visibility=11.0 1738340461698853888\r\nweather,city=Dresden,country=de temperature=5.5,humidity=87,pressure=1026,visibility=9.9 1738344061698853888\r\nweather,city=Dresden,country=de temperature=4.4,humidity=78,pressure=1026,visibility=10.8 1738347661698853888\r\nweather,city=Dresden,country=de temperature=1.0,humidity=83,pressure=1031,visibility=10.3 1738351261698853888\r\nweather,city=Dresden,country=de temperature=4.9,humidity=78,pressure=1030,visibility=9.5 1738354861698853888\r\nweather,city=Dresden,country=de temperature=3.1,humidity=83,pressure=1035,visibility=8.7 1738358461698853888\r\nweather,city=Dresden,country=de temperature=2.0,humidity=86,pressure=1034,visibility=8.9 1738362061698853888\r\nweather,city=Dresden,country=de temperature=0.9,humidity=80,pressure=1033,visibility=10.2 1738365661698853888\r\nweather,city=Dresden,country=de temperature=4.2,humidity=87,pressure=1033,visibility=10.4 1738369261698853888\r\nweather,city=Dresden,country=de temperature=2.7,humidity=85,pressure=1031,visibility=11.1 1738372861698853888\r\nweather,city=Dresden,country=de temperature=3.3,humidity=79,pressure=1033,visibility=10.8 1738376461698853888\r\nweather,city=Dresden,country=de temperature=2.1,humidity=82,pressure=1030,visibility=9.6 1738380061698853888\r\nweather,city=Dresden,country=de temperature=1.6,humidity=90,pressure=1027,visibility=8.1 1738383661698853888\r\nweather,city=Dresden,country=de temperature=3.8,humidity=79,pressure=1031,visibility=9.0 1738387261698853888\r\nweather,city=Dresden,country=de temperature=5.3,humidity=76,pressure=1029,visibility=11.5 1738390861698853888\r\nweather,city=Dresden,country=de temperature=2.5,humidity=81,pressure=1028,visibility=10.7 1738394461698853888\r\nweather,city=Dresden,country=de temperature=3.0,humidity=85,pressure=1032,visibility=9.4 1738398061698853888\r\nweather,city=Dresden,country=de temperature=1.7,humidity=88,pressure=1034,visibility=8.2 1738401661698853888\r\nweather,city=Dresden,country=de temperature=4.4,humidity=77,pressure=1031,visibility=10.1 1738405261698853888\r\nweather,city=Dresden,country=de temperature=2.8,humidity=80,pressure=1032,visibility=9.8 1738408861698853888\r\nweather,city=Dresden,country=de temperature=3.5,humidity=86,pressure=1029,visibility=9.3 1738412461698853888\r\nweather,city=Dresden,country=de temperature=1.3,humidity=84,pressure=1032,visibility=10.9 1738416061698853888\r\nweather,city=Dresden,country=de temperature=3.9,humidity=75,pressure=1030,visibility=11.2 1738419661698853888\r\nweather,city=Dresden,country=de temperature=4.0,humidity=83,pressure=1031,visibility=10.0 1738423261698853888\r\n```\r\n\r\n#### Via http request (raw - curl)\r\n\r\nCreate API token:\r\n\r\n* Load Data \u003e API token \u003e Generate API token \u003e All Access API token\r\n\r\n```text\r\nQsY...amA==\r\n```\r\n\r\nGet organisation:\r\n\r\n* User \u003e About \u003e Organization Profile\r\n\r\n```text\r\ndocs\r\n```\r\n\r\nGet bucket:\r\n\r\n* `climate`\r\n\r\nBuild curl command\r\n\r\n```shell\r\ncurl -X POST \\\r\n--data 'weather,city=Dresden,country=de temperature=4.0,humidity=83,pressure=1031,visibility=10.0 1738423261698853888' \\\r\n-H 'Authorization: Token QsY...amA==' \\\r\n-H 'Content-Type: text/plain' \\\r\n'http://localhost:8086/api/v2/write?bucket=climate\u0026org=docs'\r\n```\r\n\r\n### Query data (Flux Query Language)\r\n\r\n* See: https://docs.influxdata.com/influxdb/v1/flux/\r\n\r\n#### Simple example: Show hourly mean aggregation of humidity and temperature\r\n\r\n```javascript\r\nfrom(bucket: \"climate\")\r\n  |\u003e range(start: 2025-02-01T00:01:01Z, stop: 2025-02-01T23:59:21Z)\r\n  |\u003e filter(fn: (r) =\u003e r._measurement == \"weather\")\r\n  |\u003e filter(fn: (r) =\u003e r.city == \"Dresden\")\r\n  |\u003e filter(fn: (r) =\u003e r.country == \"de\")\r\n  |\u003e filter(fn: (r) =\u003e r._field == \"humidity\" or r._field == \"temperature\")\r\n  |\u003e aggregateWindow(every: 30m, fn: mean, createEmpty: false)\r\n  |\u003e yield(name: \"mean\")\r\n```\r\n\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoern-hempel%2Finfluxdb-react-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbjoern-hempel%2Finfluxdb-react-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbjoern-hempel%2Finfluxdb-react-app/lists"}