diff --git a/.gitignore b/.gitignore index 20fef5ab8..650f31962 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ node_modules !telegraf-build/templates !telegraf-build/scripts !telegraf-build/README.md +/cypress/downloads /cypress/screenshots/* /cypress/videos/* test-results.xml diff --git a/assets/js/release-toc.js b/assets/js/release-toc.js index 42858fccc..c27a9deaf 100644 --- a/assets/js/release-toc.js +++ b/assets/js/release-toc.js @@ -5,13 +5,13 @@ * release notes pages. */ -// Use jQuery filter to get an array of all the *release* h2 elements -const releases = $('h2').filter( - (_i, el) => !el.id.match(/checkpoint-releases/) +// Get all h2 elements that are not checkpoint-releases +const releases = Array.from(document.querySelectorAll('h2')).filter( + el => !el.id.match(/checkpoint-releases/) ); // Extract data about each release from the array of releases -releaseData = releases.map((_i, el) => ({ +const releaseData = releases.map(el => ({ name: el.textContent, id: el.id, class: el.getAttribute('class'), @@ -19,8 +19,8 @@ releaseData = releases.map((_i, el) => ({ })); // Use release data to generate a list item for each release -getReleaseItem = (releaseData) => { - var li = document.createElement("li"); +function getReleaseItem(releaseData) { + const li = document.createElement("li"); if (releaseData.class !== null) { li.className = releaseData.class; } @@ -29,9 +29,10 @@ getReleaseItem = (releaseData) => { return li; } -// Use jQuery each to build the release table of contents -releaseData.each((_i, release) => { - $('#release-toc ul')[0].appendChild(getReleaseItem(release)); +// Build the release table of contents +const releaseTocUl = document.querySelector('#release-toc ul'); +releaseData.forEach(release => { + releaseTocUl.appendChild(getReleaseItem(release)); }); /* @@ -39,20 +40,30 @@ releaseData.each((_i, release) => { * number specified in the `show` attribute of `ul.release-list`. * Once all the release items are visible, the "Show More" button is hidden. */ -$('#release-toc .show-more').click(function () { - const itemHeight = 1.885; // Item height in rem - const releaseNum = releaseData.length; - const maxHeight = releaseNum * itemHeight; - const releaseIncrement = Number($('#release-list')[0].getAttribute('show')); - const currentHeight = Number( - $('#release-list')[0].style.height.match(/\d+\.?\d+/)[0] - ); - const potentialHeight = currentHeight + releaseIncrement * itemHeight; - const newHeight = potentialHeight > maxHeight ? maxHeight : potentialHeight; +const showMoreBtn = document.querySelector('#release-toc .show-more'); +if (showMoreBtn) { + showMoreBtn.addEventListener('click', function () { + const itemHeight = 1.885; // Item height in rem + const releaseNum = releaseData.length; + const maxHeight = releaseNum * itemHeight; + const releaseList = document.getElementById('release-list'); + const releaseIncrement = Number(releaseList.getAttribute('show')); + const currentHeightMatch = releaseList.style.height.match(/\d+\.?\d+/); + const currentHeight = currentHeightMatch + ? Number(currentHeightMatch[0]) + : 0; + const potentialHeight = currentHeight + releaseIncrement * itemHeight; + const newHeight = potentialHeight > maxHeight ? maxHeight : potentialHeight; - $('#release-list')[0].style.height = `${newHeight}rem`; + releaseList.style.height = `${newHeight}rem`; - if (newHeight >= maxHeight) { - $('#release-toc .show-more').fadeOut(100); - } -}); + if (newHeight >= maxHeight) { + // Simple fade out + showMoreBtn.style.transition = 'opacity 0.1s'; + showMoreBtn.style.opacity = 0; + setTimeout(() => { + showMoreBtn.style.display = 'none'; + }, 100); + } + }); +} diff --git a/assets/styles/layouts/_homepage.scss b/assets/styles/layouts/_homepage.scss index a0583b4c9..ca92588e9 100644 --- a/assets/styles/layouts/_homepage.scss +++ b/assets/styles/layouts/_homepage.scss @@ -105,7 +105,7 @@ .product { padding: 0 1rem; display: flex; - flex: 1 1 50%; + flex: 1 1 33%; flex-direction: column; justify-content: space-between; max-width: 33%; @@ -118,11 +118,10 @@ line-height: 1.5rem; color: rgba($article-text, .7); } - } - &.new { - .product-info h3::after { - content: "New"; + h3[state] { + &::after { + content: attr(state); margin-left: .5rem; font-size: 1rem; padding: .25em .5em .25em .4em; @@ -132,6 +131,8 @@ font-style: italic; vertical-align: middle; } + + } } ul.product-links { @@ -227,6 +228,30 @@ background: $article-bg; } + .categories { + display: flex; + flex-direction: row; + flex-wrap: wrap; + // margin: 0 -1rem; + width: calc(100% + 2rem); + + .category { + &.full-width { + width: 100%; + } + &.two-thirds { + width: 66.66%; + .product { max-width: 50%; } + } + &.one-third { + width: 33.33%; + .product { + max-width: 100%; + } + } + } + } + .category-head{ margin: 1rem 0 2rem; &::after { @@ -234,6 +259,7 @@ display: block; border-top: 1px solid $article-hr; margin-top: -1.15rem; + width: calc(100% - 2rem); } } } @@ -441,6 +467,16 @@ ul {margin-bottom: 0;} } } + .categories .category { + &.two-thirds { + width: 100%; + .product { max-width: 100%; } + } + &.one-third { + width: 100%; + .product { max-width: 100%; } + } + } } #telegraf { flex-direction: column; diff --git a/assets/styles/layouts/article/_blocks.scss b/assets/styles/layouts/article/_blocks.scss index 090ee9560..62b205491 100644 --- a/assets/styles/layouts/article/_blocks.scss +++ b/assets/styles/layouts/article/_blocks.scss @@ -96,4 +96,5 @@ blockquote { "blocks/tip", "blocks/important", "blocks/warning", - "blocks/caution"; + "blocks/caution", + "blocks/beta"; diff --git a/assets/styles/layouts/article/blocks/_beta.scss b/assets/styles/layouts/article/blocks/_beta.scss new file mode 100644 index 000000000..b3ab3a70c --- /dev/null +++ b/assets/styles/layouts/article/blocks/_beta.scss @@ -0,0 +1,105 @@ +.block.beta { + @include gradient($grad-burningDusk); + padding: 4px; + border: none; + border-radius: 25px !important; + + .beta-content { + background: $article-bg; + border-radius: 21px; + padding: calc(1.65rem - 4px) calc(2rem - 4px) calc(.1rem + 4px) calc(2rem - 4px); + + h4 { + color: $article-heading; + } + + p {margin-bottom: 1rem;} + + .expand-wrapper { + border: none; + margin: .5rem 0 1.5rem; + } + .expand { + border: none; + padding: 0; + + .expand-content p { + margin-left: 2rem; + } + + ul { + + margin-top: -1rem; + + &.feedback-channels { + + padding: 0; + margin: -1rem 0 1.5rem 2rem; + list-style: none; + + a { + color: $article-heading; + font-weight: $medium; + position: relative; + + &.discord:before { + content: url('/svgs/discord.svg'); + display: inline-block; + height: 1.1rem; + width: 1.25rem; + vertical-align: top; + margin: 2px .65rem 0 0; + } + + &.community:before { + content: "\e900"; + color: $article-heading; + margin: 0 .65rem 0 0; + font-size: 1.2rem; + font-family: 'icomoon-v2'; + vertical-align: middle; + } + + &.slack:before { + content: url('/svgs/slack.svg'); + display: inline-block; + height: 1.1rem; + width: 1.1rem; + vertical-align: text-top; + margin-right: .65rem; + } + + &.reddit:before { + content: url('/svgs/reddit.svg'); + display: inline-block; + height: 1.1rem; + width: 1.2rem; + vertical-align: top; + margin: 2px .65rem 0 0; + } + + &::after { + content: "\e90a"; + font-family: 'icomoon-v4'; + font-weight: bold; + font-size: 1.3rem; + display: inline-block; + position: absolute; + @include gradient($grad-burningDusk); + background-clip: text; + -webkit-text-fill-color: transparent; + right: 0; + transform: translateX(.25rem); + opacity: 0; + transition: transform .2s, opacity .2s; + } + + &:hover { + &::after {transform: translateX(1.5rem); opacity: 1;} + } + } + } + } + } + } +} \ No newline at end of file diff --git a/content/enterprise_influxdb/v1/concepts/schema_and_data_layout.md b/content/enterprise_influxdb/v1/concepts/schema_and_data_layout.md index 43c781460..c60e8ccef 100644 --- a/content/enterprise_influxdb/v1/concepts/schema_and_data_layout.md +++ b/content/enterprise_influxdb/v1/concepts/schema_and_data_layout.md @@ -22,7 +22,7 @@ We recommend the following design guidelines for most use cases: Your queries should guide what data you store in [tags](/enterprise_influxdb/v1/concepts/glossary/#tag) and what you store in [fields](/enterprise_influxdb/v1/concepts/glossary/#field) : -- Store commonly queried and grouping ([`group()`](/flux/v0.x/stdlib/universe/group) or [`GROUP BY`](/enterprise_influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags. +- Store commonly queried and grouping ([`group()`](/flux/v0/stdlib/universe/group) or [`GROUP BY`](/enterprise_influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags. - Store data in fields if each data point contains a different value. - Store numeric values as fields ([tag values](/enterprise_influxdb/v1/concepts/glossary/#tag-value) only support string values). diff --git a/content/flux/v0/release-notes.md b/content/flux/v0/release-notes.md index 3d731055e..597a651f1 100644 --- a/content/flux/v0/release-notes.md +++ b/content/flux/v0/release-notes.md @@ -433,7 +433,7 @@ representative of the Flux SPEC. details. - Add tagging support to Flux tests. - Add new function [`experimental.catch()`](/flux/v0/stdlib/experimental/catch/). -- Add new function [`testing.shouldError()`](/flux/v0.x/stdlib/testing/shoulderror/). +- Add new function [`testing.shouldError()`](/flux/v0/stdlib/testing/shoulderror/). ### Bug fixes diff --git a/content/influxdb/cloud/account-management/data-usage.md b/content/influxdb/cloud/account-management/data-usage.md index 40969ea56..9efb3e144 100644 --- a/content/influxdb/cloud/account-management/data-usage.md +++ b/content/influxdb/cloud/account-management/data-usage.md @@ -12,8 +12,8 @@ menu: parent: Account management name: View data usage related: - - /flux/v0.x/stdlib/experimental/usage/from/ - - /flux/v0.x/stdlib/experimental/usage/limits/ + - /flux/v0/stdlib/experimental/usage/from/ + - /flux/v0/stdlib/experimental/usage/limits/ alt_links: cloud-serverless: /influxdb3/cloud-serverless/admin/billing/data-usage/ --- diff --git a/content/influxdb/cloud/account-management/limits.md b/content/influxdb/cloud/account-management/limits.md index b1ea7636d..b4670cf88 100644 --- a/content/influxdb/cloud/account-management/limits.md +++ b/content/influxdb/cloud/account-management/limits.md @@ -9,8 +9,8 @@ menu: parent: Account management name: Adjustable quotas and limits related: - - /flux/v0.x/stdlib/experimental/usage/from/ - - /flux/v0.x/stdlib/experimental/usage/limits/ + - /flux/v0/stdlib/experimental/usage/from/ + - /flux/v0/stdlib/experimental/usage/limits/ - /influxdb/cloud/write-data/best-practices/resolve-high-cardinality/ alt_links: cloud-serverless: /influxdb3/cloud-serverless/admin/billing/limits/ @@ -97,7 +97,7 @@ Combine delete predicate expressions (if possible) into a single request. Influx The {{< product-name >}} UI displays a notification message when service quotas or limits are exceeded. The error messages correspond with the relevant [API error responses](#api-error-responses). -Errors can also be viewed in the [Usage page](/influxdb/cloud/account-management/data-usage/) under **Limit Events**, e.g. `event_type_limited_query`, `event_type_limited_write`,`event_type_limited_cardinality`, or `event_type_limited_delete_rate`. +Errors can also be viewed in the [Usage page](/influxdb/cloud/account-management/data-usage/) under **Limit Events**, for example: `event_type_limited_query`, `event_type_limited_write`,`event_type_limited_cardinality`, or `event_type_limited_delete_rate`. ## API error responses diff --git a/content/influxdb/cloud/admin/organizations/migrate-org.md b/content/influxdb/cloud/admin/organizations/migrate-org.md index 9d7809aa9..a03aaa43d 100644 --- a/content/influxdb/cloud/admin/organizations/migrate-org.md +++ b/content/influxdb/cloud/admin/organizations/migrate-org.md @@ -40,7 +40,7 @@ To replicate the state of an organization: ### Write data with Flux Perform a query to return all specified data. Write results directly to a bucket in the new organization with the Flux -[`to()` function](/flux/v0.x/stdlib/influxdata/influxdb/to/). +[`to()` function](/flux/v0/stdlib/influxdata/influxdb/to/). {{% note %}} If writes are prevented by rate limiting, diff --git a/content/influxdb/cloud/reference/cli/influx/transpile/_index.md b/content/influxdb/cloud/reference/cli/influx/transpile/_index.md index 72b7485fb..1f56fa658 100644 --- a/content/influxdb/cloud/reference/cli/influx/transpile/_index.md +++ b/content/influxdb/cloud/reference/cli/influx/transpile/_index.md @@ -13,7 +13,7 @@ prepend: | > [Use InfluxQL to query InfluxDB](/influxdb/cloud/query-data/influxql/). > For information about manually converting InfluxQL queries to Flux, see: > - > - [Get started with Flux](/flux/v0.x/get-started/) + > - [Get started with Flux](/flux/v0/get-started/) > - [Query data with Flux](/influxdb/cloud/query-data/flux/) > - [Migrate continuous queries to Flux tasks](/influxdb/cloud/upgrade/v1-to-cloud/migrate-cqs/) source: /shared/influxdb-v2/reference/cli/influx/transpile/_index.md diff --git a/content/influxdb/cloud/reference/release-notes/cloud-updates.md b/content/influxdb/cloud/reference/release-notes/cloud-updates.md index 70a7ab533..d6cea7c84 100644 --- a/content/influxdb/cloud/reference/release-notes/cloud-updates.md +++ b/content/influxdb/cloud/reference/release-notes/cloud-updates.md @@ -188,7 +188,7 @@ Now, you can add the following buckets with sample data to your notebooks: ### Add ability to share notebooks -Add ability to [share a notebook](/influxdb/cloud/tools/notebooks/manage-notebooks/#share-a-notebook) in the the InfluxDB Cloud notebook UI. +Add ability to [share a notebook](/influxdb/cloud/tools/notebooks/manage-notebooks/#share-a-notebook) in the InfluxDB Cloud notebook UI. ## October 2021 @@ -209,7 +209,7 @@ Refresh the look and feel of InfluxDB Cloud UI. The updated icons, fonts, and la ### Flux update -Upgrade to [Flux v0.139](/flux/v0.x/release-notes/). +Upgrade to [Flux v0.139](/flux/v0/release-notes/). ### Telegraf configuration UI @@ -347,7 +347,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ ## Features - **InfluxDB OSS 2.0 alpha-17** – - _See the [alpha-17 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha17) for details._ + _See the [alpha-17 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha17) for details._ - Alerts and Notifications to Slack (Free Plan), PagerDuty and HTTP (Usage-based Plan). - Rate limiting on cardinality for Free Plan. - Billing notifications. @@ -359,7 +359,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ ### Features - **InfluxDB OSS 2.0 alpha-15** – - _See the [alpha-9 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha15) for details._ + _See the [alpha-9 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha15) for details._ - Usage-based Plan. - Adjusted Free Plan rate limits. - Timezone selection in the user interface. @@ -386,7 +386,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ ### Features - **InfluxDB OSS 2.0 alpha-9** – - _See the [alpha-9 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha9) for details._ + _See the [alpha-9 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha9) for details._ ### Bug fixes @@ -403,7 +403,7 @@ Install and customize any [InfluxDB community template](https://github.com/influ ### Features - **InfluxDB OSS 2.0 alpha-7** – - _See the [alpha-7 release notes](/influxdb/v2%2E0/reference/release-notes/influxdb/#v200-alpha7) for details._ + _See the [alpha-7 release notes](/influxdb/v2/reference/release-notes/influxdb/#v200-alpha7) for details._ ### Bug fixes diff --git a/content/influxdb/v1/concepts/schema_and_data_layout.md b/content/influxdb/v1/concepts/schema_and_data_layout.md index 5824c4477..f1006cc22 100644 --- a/content/influxdb/v1/concepts/schema_and_data_layout.md +++ b/content/influxdb/v1/concepts/schema_and_data_layout.md @@ -22,7 +22,7 @@ We recommend the following design guidelines for most use cases: Your queries should guide what data you store in [tags](/influxdb/v1/concepts/glossary/#tag) and what you store in [fields](/influxdb/v1/concepts/glossary/#field) : -- Store commonly queried and grouping ([`group()`](/flux/v0.x/stdlib/universe/group) or [`GROUP BY`](/influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags. +- Store commonly queried and grouping ([`group()`](/flux/v0/stdlib/universe/group) or [`GROUP BY`](/influxdb/v1/query_language/explore-data/#group-by-tags)) metadata in tags. - Store data in fields if each data point contains a different value. - Store numeric values as fields ([tag values](/influxdb/v1/concepts/glossary/#tag-value) only support string values). diff --git a/content/influxdb/v1/flux/guides/exists.md b/content/influxdb/v1/flux/guides/exists.md index 036e04905..c4c3ad77e 100644 --- a/content/influxdb/v1/flux/guides/exists.md +++ b/content/influxdb/v1/flux/guides/exists.md @@ -83,7 +83,7 @@ customSumProduct = (tables=<-) => tables #### Check if a statically defined record contains a key -When you use the [record literal syntax](/flux/v0.x/data-types/composite/record/#record-syntax) +When you use the [record literal syntax](/flux/v0/data-types/composite/record/#record-syntax) to statically define a record, Flux knows the record type and what keys to expect. - If the key exists in the static record, `exists` returns `true`. diff --git a/content/influxdb3/cloud-serverless/admin/billing/data-usage.md b/content/influxdb3/cloud-serverless/admin/billing/data-usage.md index 9db594efa..0ae2e30a9 100644 --- a/content/influxdb3/cloud-serverless/admin/billing/data-usage.md +++ b/content/influxdb3/cloud-serverless/admin/billing/data-usage.md @@ -9,8 +9,8 @@ menu: parent: Manage billing name: View data usage related: - - /flux/v0.x/stdlib/experimental/usage/from/ - - /flux/v0.x/stdlib/experimental/usage/limits/ + - /flux/v0/stdlib/experimental/usage/from/ + - /flux/v0/stdlib/experimental/usage/limits/ alt_links: cloud: /influxdb/cloud/account-management/data-usage/ aliases: diff --git a/content/influxdb3/cloud-serverless/admin/billing/limits.md b/content/influxdb3/cloud-serverless/admin/billing/limits.md index cc14d2fb5..2d5eca88a 100644 --- a/content/influxdb3/cloud-serverless/admin/billing/limits.md +++ b/content/influxdb3/cloud-serverless/admin/billing/limits.md @@ -9,8 +9,8 @@ menu: parent: Manage billing name: Adjustable quotas and limits related: - - /flux/v0.x/stdlib/experimental/usage/from/ - - /flux/v0.x/stdlib/experimental/usage/limits/ + - /flux/v0/stdlib/experimental/usage/from/ + - /flux/v0/stdlib/experimental/usage/limits/ - /influxdb3/cloud-serverless/write-data/best-practices/ alt_links: cloud: /influxdb/cloud/account-management/limits/ diff --git a/content/influxdb3/clustered/admin/upgrade.md b/content/influxdb3/clustered/admin/upgrade.md index 1664e9a72..26ad743ef 100644 --- a/content/influxdb3/clustered/admin/upgrade.md +++ b/content/influxdb3/clustered/admin/upgrade.md @@ -51,7 +51,7 @@ Use the following command to return the image Kubernetes uses to build your InfluxDB cluster: ```sh -kubectl get appinstances.kubecfg.dev influxdb -o jsonpath='{.spec.package.image}' +kubectl get appinstances.kubecfg.dev influxdb -n influxdb -o jsonpath='{.spec.package.image}' ``` The package version number is at the end of the returned string (after `influxdb:`): @@ -66,8 +66,8 @@ us-docker.pkg.dev/influxdb2-artifacts/clustered/influxdb:PACKAGE_VERSION ### Identify the version to upgrade to -All available InfluxDB Clustered package versions are provided at -[oci.influxdata.com](https://oci.influxdata.com). +All available InfluxDB Clustered package versions are provided in the +[InfluxDB Clustered release notes](/influxdb3/clustered/reference/release-notes/clustered/). Find the package version you want to upgrade to and copy the version number. @@ -76,7 +76,7 @@ Find the package version you want to upgrade to and copy the version number. Some InfluxDB Clustered releases are _checkpoint releases_ that introduce a breaking change to an InfluxDB component. Checkpoint releases are only made when absolutely necessary and are clearly -identified at [oci.influxdata.com](https://oci.influxdata.com). +identified in the [InfluxDB Clustered release notes](/influxdb3/clustered/reference/release-notes/clustered/). **When upgrading, always upgrade to each checkpoint release first, before proceeding to newer versions.** diff --git a/content/influxdb3/core/_index.md b/content/influxdb3/core/_index.md index 82dfea7d1..ef374524f 100644 --- a/content/influxdb3/core/_index.md +++ b/content/influxdb3/core/_index.md @@ -9,9 +9,10 @@ menu: influxdb3_core: name: InfluxDB 3 Core weight: 1 -source: /shared/v3-core-get-started/_index.md +source: /shared/influxdb3/_index.md --- \ No newline at end of file diff --git a/content/influxdb3/core/get-started/_index.md b/content/influxdb3/core/get-started/_index.md index fd81839af..16398f32f 100644 --- a/content/influxdb3/core/get-started/_index.md +++ b/content/influxdb3/core/get-started/_index.md @@ -13,7 +13,7 @@ related: - /influxdb3/core/admin/query-system-data/ - /influxdb3/core/write-data/ - /influxdb3/core/query-data/ -source: /shared/v3-core-get-started/_index.md +source: /shared/influxdb3-get-started/_index.md prepend: | > [!Note] > InfluxDB 3 Core is purpose-built for real-time data monitoring and recent data. @@ -26,5 +26,5 @@ prepend: | diff --git a/content/influxdb3/enterprise/_index.md b/content/influxdb3/enterprise/_index.md index df990c211..bcf454928 100644 --- a/content/influxdb3/enterprise/_index.md +++ b/content/influxdb3/enterprise/_index.md @@ -9,9 +9,10 @@ menu: influxdb3_enterprise: name: InfluxDB 3 Enterprise weight: 1 -source: /shared/v3-enterprise-get-started/_index.md +source: /shared/influxdb3/_index.md --- diff --git a/content/influxdb3/enterprise/get-started/_index.md b/content/influxdb3/enterprise/get-started/_index.md index 8255d737d..f14095083 100644 --- a/content/influxdb3/enterprise/get-started/_index.md +++ b/content/influxdb3/enterprise/get-started/_index.md @@ -13,10 +13,10 @@ related: - /influxdb3/enterprise/admin/query-system-data/ - /influxdb3/enterprise/write-data/ - /influxdb3/enterprise/query-data/ -source: /shared/v3-enterprise-get-started/_index.md +source: /shared/influxdb3-get-started/_index.md --- diff --git a/content/influxdb3/explorer/_index.md b/content/influxdb3/explorer/_index.md new file mode 100644 index 000000000..5078f75bb --- /dev/null +++ b/content/influxdb3/explorer/_index.md @@ -0,0 +1,48 @@ +--- +title: InfluxDB 3 Explorer documentation +description: > + InfluxDB 3 Explorer is a standalone web-based interface for interacting with InfluxDB 3 Core and Enterprise. Visualize, query, and manage your time series data efficiently. +menu: + influxdb3_explorer: + name: InfluxDB 3 Explorer +weight: 1 +--- + +InfluxDB 3 Explorer is the standalone web application designed for visualizing, querying, and managing your data stored in InfluxDB 3 Core and Enterprise. +Explorer provides an intuitive interface for interacting with your time series data, streamlining database operations and enhancing data insights. + +> [!Important] +> #### InfluxDB 3 Core or Enterprise v3.1.0 or later required +> +> InfluxDB 3 Explorer is compatible with the following: +> +> - [InfluxDB 3 Core v3.1.0 or later](/influxdb3/core/install/) +> - [InfluxDB 3 Enterprise v3.1.0 or later](/influxdb3/enterprise/install/) + +## Key features + +Use InfluxDB 3 Explorer for: + +- **Database and query management**: Create and manage InfluxDB 3 databases, admin and resource tokens, and configure new InfluxDB 3 Enterprise instances +- **Data visualization and analysis**: Query data with a built-in visualizer for enhanced data insights +- **Data ingestion**: Write new data and setup Telegraf configurations + +## Quick start + +Run the Docker image to start InfluxDB 3 Explorer: + +```sh +# Pull the Docker image +docker pull quay.io/influxdb/influxdb3-explorer:latest + +# Run the Docker container +docker run --detach \ + --name influxdb3-explorer \ + --publish 8888:80 \ + --publish 8889:8888 \ + quay.io/influxdb/influxdb3-explorer:latest \ + --mode=admin +``` + +Install and run InfluxDB 3 Explorer +Get started with InfluxDB 3 Explorer diff --git a/content/influxdb3/explorer/about/_index.md b/content/influxdb3/explorer/about/_index.md new file mode 100644 index 000000000..9054300a4 --- /dev/null +++ b/content/influxdb3/explorer/about/_index.md @@ -0,0 +1,28 @@ +--- +title: About the InfluxDB 3 Explorer project +description: > + Learn about InfluxDB 3 Explorer, the user interface and query tool for InfluxDB 3. +menu: + influxdb3_explorer: + name: About Explorer +weight: 10 +--- + +InfluxDB 3 Explorer is the user interface component of the InfluxDB 3 platform. +It provides visual management of databases and tokens and an easy way to querying +your time series data. Explorer is fully-featured for [InfluxDB 3 Core](/influxdb3/core/) +and [Enterprise](/influxdb3/enterprise/). In a future release it will also be able to +be used to query [InfluxDB Cloud Serverless](/influxdb3/cloud-serverless/), +[InfluxDB Cloud Dedicated](/influxdb3/cloud-dedicated/) +and [InfluxDB Clustered](/influxdb3/clustered/). + +## Third Party Software + +InfluxData products contain third party software, which means the copyrighted, +patented, or otherwise legally protected software of third parties that is +incorporated in InfluxData products. + +Third party suppliers make no representation nor warranty with respect to such +third party software or any portion thereof. Third party suppliers assume no +liability for any claim that might arise with respect to such third party software, +nor for a customer’s use of or inability to use the third party software. diff --git a/content/influxdb3/explorer/get-started/_index.md b/content/influxdb3/explorer/get-started/_index.md new file mode 100644 index 000000000..e15e4a3c4 --- /dev/null +++ b/content/influxdb3/explorer/get-started/_index.md @@ -0,0 +1,14 @@ +--- +title: Get started using InfluxDB 3 Explorer +description: Follow steps to get started using InfluxDB 3 Explorer. +menu: + influxdb3_explorer: + name: Get started +weight: 3 +--- + +Follow steps to get started using InfluxDB 3 Explorer. + +{{< youtube "zW2Hi1Ki4Eo" >}} + + diff --git a/content/influxdb3/explorer/get-started/connect.md b/content/influxdb3/explorer/get-started/connect.md new file mode 100644 index 000000000..7d717c024 --- /dev/null +++ b/content/influxdb3/explorer/get-started/connect.md @@ -0,0 +1,12 @@ +--- +title: Connect to a server +description: + Use InfluxDB 3 Explorer to connect to an InfluxDB 3 server. +menu: + influxdb3_explorer: + parent: Get started +weight: 101 +draft: true +--- + +Use InfluxDB 3 Explorer to connect to an InfluxDB 3 server. \ No newline at end of file diff --git a/content/influxdb3/explorer/install.md b/content/influxdb3/explorer/install.md new file mode 100644 index 000000000..a1858d2a2 --- /dev/null +++ b/content/influxdb3/explorer/install.md @@ -0,0 +1,222 @@ +--- +title: Install and run InfluxDB 3 Explorer +description: > + Use [Docker](https://docker.com) to install and run **InfluxDB 3 Explorer**. +menu: + influxdb3_explorer: + name: Install Explorer +weight: 2 +--- + +Use [Docker](https://docker.com) to install and run **InfluxDB 3 Explorer**. + + +- [Run the InfluxDB 3 Explorer Docker container](#run-the-influxdb-3-explorer-docker-container) +- [Enable TLS/SSL (HTTPS)](#enable-tlsssl-https) +- [Pre-configure InfluxDB connection settings](#pre-configure-influxdb-connection-settings) +- [Run in query or admin mode](#run-in-query-or-admin-mode) + - [Run in query mode](#run-in-query-mode) + - [Run in admin mode](#run-in-admin-mode) +- [Environment Variables](#environment-variables) +- [Volume Reference](#volume-reference) +- [Exposed Ports](#exposed-ports) + - [Custom port mapping](#custom-port-mapping) + + +## Run the InfluxDB 3 Explorer Docker container + +1. **Install Docker** + + If you haven't already, install [Docker](https://docs.docker.com/engine/) or + [Docker Desktop](https://docs.docker.com/desktop/). + +2. **Pull the {{% product-name %}} Docker image** + + ```bash + docker pull quay.io/influxdb/influxdb3-explorer:latest + ``` + +3. **Create local directories** _(optional)_ + + {{% product-name %}} can mount the following directories on your local + machine: + + | Directory | Description | Permissions | + | :--------- | :------------------------------------------------------------------------------------------------ | :---------: | + | `./db` | Stores {{% product-name %}} application data | 700 | + | `./config` | Stores [pre-configured InfluxDB connection settings](#pre-configure-influxdb-connection-settings) | 755 | + | `./ssl` | Stores TLS/SSL certificates _(Required when [using TLS/SSL](#enable-tlsssl-https))_ | 755 | + + > [!Important] + > If you don't create and mount a local `./db` directory, {{% product-name %}} + > stores application data in the container's file system. + > This data will be lost when the container is deleted. + + To create these directories with the appropriate permissions, run the + following commands from your current working directory: + + ```bash + mkdir -m 700 ./db + mkdir -m 755 ./config + mkdir -m 755 ./ssl + ``` + +4. **Run the {{% product-name %}} container** + + Use the `docker run` command to start the {{% product-name %}} container. + Include the following: + + - Port mappings: + - `8888` to `80` (or `443` if using TLS/SSL) + - `8889` to `8888` + - Mounted volumes: + - `$(pwd)/db:/db:rw` + - `$(pwd)/config:/app-root/config:ro` + - `$(pwd)/ssl:/etc/nginx/ssl:ro` + - Any of the available [environment variables](#environment-variables) + + ```bash + docker run --detach \ + --name influxdb3-explorer \ + --publish 8888:80 \ + --publish 8889:8888 \ + --volume $(pwd)/config:/app-root/config:ro \ + --volume $(pwd)/db:/db:rw \ + --volume $(pwd)/ssl:/etc/nginx/ssl:ro \ + quay.io/influxdb/influxdb3-explorer:latest \ + --mode=admin + ``` + +5. **Access the {{% product-name %}} user interface (UI) at **. + +--- + +## Enable TLS/SSL (HTTPS) + +To enable TLS/SSL, mount valid certificate and key files into the container: + +1. **Place your TLS/SSL certificate files your local `./ssl` directory** + + Required files: + + - Certificate: `server.crt` or `fullchain.pem` + - Private key: `server.key` + +2. **When running your container, mount the SSL directory and map port 443 to port 8888** + + Include the following options when running your Docker container: + + ```sh + --volume $(pwd)/ssl:/etc/nginx/ssl:ro \ + --publish 8888:443 + ``` + +The nginx web server automatically uses certificate files when they are present +in the mounted path. + +--- + +## Pre-configure InfluxDB connection settings + +You can predefine InfluxDB connection settings using a `config.json` file. + +{{% code-placeholders "INFLUXDB3_HOST|INFLUXDB_DATABASE_NAME|INFLUXDB3_AUTH_TOKEN|INFLUXDB3_SERVER_NAME" %}} + +1. **Create a `config.json` file in your local `./config` directory** + + ```json + { + "DEFAULT_INFLUX_SERVER": "INFLUXDB3_HOST", + "DEFAULT_INFLUX_DATABASE": "INFLUXDB_DATABASE_NAME", + "DEFAULT_API_TOKEN": "INFLUXDB3_AUTH_TOKEN", + "DEFAULT_SERVER_NAME": "INFLUXDB3_SERVER_NAME" + } + ``` + + > [!Important] + > If connecting to an InfluxDB 3 Core or Enterprise instance running on + > localhost (outside of the container), use the internal Docker network to + > in your InfluxDB 3 host value--for example: + > + > ```txt + > http://host.docker.internal:8181 + > ``` + +2. **Mount the configuration directory** + + Include the following option when running your Docker container: + + ```sh + --volume $(pwd)/config:/app-root/config:ro + ``` + +{{% /code-placeholders %}} + +These settings will be used as defaults when the container starts. + +--- + +## Run in query or admin mode + +{{% product-name %}} has the following operational modes: + +- **Query mode (default):** Read-only UI and query interface +- **Admin mode:** Full UI and API access for administrators + +You can control the operational mode using the `--mode=` option in your +`docker run` command (after the image name). + +### Run in query mode {note="(default)"} + +```sh +docker run \ + ... + --mode=query +``` + +### Run in admin mode + +```sh +docker run \ + ... + --mode=admin +``` + +If `--mode` is not set, the container defaults to query mode. + +--- + +## Environment Variables + +Use the following environment variables to customize {{% product-name %}} settings +in your container. + +| Variable | Description | Default | +|----------------|--------------------------------------------------|----------------------| +| `DATABASE_URL` | Path to SQLite DB inside container | `/db/sqlite.db` | + +--- + +## Volume Reference + +| Container Path | Purpose | Host Example | +|----------------------|------------------------------|----------------------------| +| `/db` | SQLite DB storage | `./db` | +| `/app-root/config` | JSON config for defaults | `./config` | +| `/etc/nginx/ssl` | SSL certs for HTTPS | `./ssl` | + +--- + +## Exposed Ports + +| Port | Protocol | Purpose | +|------|----------|-------------------------| +| 80 | HTTP | Web access (unencrypted) | +| 443 | HTTPS | Web access (encrypted) | + +### Custom port mapping + +```sh +# Map ports to custom host values +--publish 8888:80 --publish 8443:443 +``` diff --git a/content/kapacitor/v1/guides/anomaly_detection.md b/content/kapacitor/v1/guides/anomaly_detection.md index 1009c943b..f1a91261d 100644 --- a/content/kapacitor/v1/guides/anomaly_detection.md +++ b/content/kapacitor/v1/guides/anomaly_detection.md @@ -407,15 +407,15 @@ if __name__ == '__main__': agent.handler = h # Anything printed to STDERR from a UDF process gets captured into the Kapacitor logs. - print >> sys.stderr, "Starting agent for TTestHandler" + print("Starting agent for TTestHandler", file=sys.stderr) agent.start() agent.wait() - print >> sys.stderr, "Agent finished" + print("Agent finished", file=sys.stderr) ``` That was a lot, but now we are ready to configure Kapacitor to run our -code. Create a scratch dir for working through the rest of this +code. Make sure that `scipy` is installed (`$ pip3 install scipy`). Create a scratch dir for working through the rest of this guide: ```bash @@ -434,7 +434,7 @@ Add this snippet to your Kapacitor configuration file (typically located at `/et [udf.functions] [udf.functions.tTest] # Run python - prog = "/usr/bin/python2" + prog = "/usr/bin/python3" # Pass args to python # -u for unbuffered STDIN and STDOUT # and the path to the script @@ -468,8 +468,8 @@ correctly: service kapacitor restart ``` -Check the logs (`/var/log/kapacitor/`) to make sure you see a -*Listening for signals* line and that no errors occurred. If you +Check the logs (`/var/log/kapacitor/` or `journalctl -f -n 256 -u kapacitor.service`) to make sure you see a +_Listening for signals_ line and that no errors occurred. If you don't see the line, it's because the UDF process is hung and not responding. It should be killed after a timeout, so give it a moment to stop properly. Once stopped, you can fix any errors and try again. @@ -544,6 +544,20 @@ the Kapacitor task: kapacitor define print_temps -tick print_temps.tick ``` +Ensure that the task is enabled: + +```bash +kapacitor enable print_temps +``` + +And then list the tasks: + +```bash +kapacitor list tasks +ID Type Status Executing Databases and Retention Policies +print_temps stream enabled true ["printer"."autogen"] +``` + ### Generating test data To simulate our printer for testing, we will write a simple Python @@ -557,7 +571,7 @@ to use real data for testing our TICKscript and UDF, but this is faster (and much cheaper than a 3D printer). ```python -#!/usr/bin/python2 +#!/usr/bin/env python from numpy import random from datetime import timedelta, datetime @@ -672,7 +686,11 @@ fake data so that we can easily iterate on the task: ```sh # Start the recording in the background kapacitor record stream -task print_temps -duration 24h -no-wait -# Grab the ID from the output and store it in a var +# List recordings to find the ID +kapacitor list recordings +ID Type Status Size Date +7bd3ced5-5e95-4a67-a0e1-f00860b1af47 stream running 0 B 04 May 16 11:34 MDT +# Copy the ID and store it in a variable rid=7bd3ced5-5e95-4a67-a0e1-f00860b1af47 # Run our python script to generate data chmod +x ./printer_data.py diff --git a/content/kapacitor/v1/reference/about_the_project/release-notes.md b/content/kapacitor/v1/reference/about_the_project/release-notes.md index 4fb722a07..beb05a02a 100644 --- a/content/kapacitor/v1/reference/about_the_project/release-notes.md +++ b/content/kapacitor/v1/reference/about_the_project/release-notes.md @@ -9,6 +9,22 @@ aliases: - /kapacitor/v1/about_the_project/releasenotes-changelog/ --- +## v1.7.7 {date="2025-05-27"} + +> [!Warning] +> #### Python 2 UDFs deprecated +> +> Python 2-based UDFs are deprecated** as of Kapacitor 1.7.7 and will be removed in **Kapacitor 1.8.0**. +> +> In preparation for Kapacitor 1.8.0, update your User-Defined Functions (UDFs) to be Python 3-compatible. +> This required change aligns with modern security practices and ensures your custom functions will continue to work after upgrading. + +### Dependency updates + +- Upgrade Go to 1.22.12. + +--- + ## v1.7.6 {date="2024-10-28"} ### Features @@ -105,7 +121,7 @@ aliases: ### Bug fixes - Update the `Kafka` client to fix a bug regarding write latency. -- Update to [Flux v0.171.0](/flux/v0.x/release-notes/#v01710) to fix "interface {} is nil, not string" issue. +- Update to [Flux v0.171.0](/flux/v0/release-notes/#v01710) to fix "interface {} is nil, not string" issue. --- diff --git a/content/resources/how-to-guides/assigning-more-than-four-states.md b/content/resources/how-to-guides/assigning-more-than-four-states.md index 8b54d8c9e..eda43b7b1 100644 --- a/content/resources/how-to-guides/assigning-more-than-four-states.md +++ b/content/resources/how-to-guides/assigning-more-than-four-states.md @@ -8,7 +8,7 @@ menu: weight: 101 --- ## Problem -You may want to use the [`monitor` package](/flux/v0.x/stdlib/influxdata/influxdb/monitor/) and take advantage of functions like [monitor.stateChangesOnly()](/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly/). However, `monitor.stateChangesOnly()` only allows you to monitor four states: "crit", "warn", "ok", and "info". What if you want to be able to assign and monitor state changes across custom states or more than four states? +You may want to use the [`monitor` package](/flux/v0/stdlib/influxdata/influxdb/monitor/) and take advantage of functions like [monitor.stateChangesOnly()](/flux/v0/stdlib/influxdata/influxdb/monitor/statechangesonly/). However, `monitor.stateChangesOnly()` only allows you to monitor four states: "crit", "warn", "ok", and "info". What if you want to be able to assign and monitor state changes across custom states or more than four states? ## Solution Define your own custom `stateChangesOnly()` function. Use the function from the source code here and alter it to accommodate more than four levels. Here we account for six different levels instead of just four. @@ -42,7 +42,7 @@ stateChangesOnly = (tables=<-) => { } ``` -Construct some example data with [`array.from()`](/flux/v0.x/stdlib/array/from/) and map custom levels to it: +Construct some example data with [`array.from()`](/flux/v0/stdlib/array/from/) and map custom levels to it: ```js array.from( diff --git a/content/resources/how-to-guides/reduce-to-construct-JSON.md b/content/resources/how-to-guides/reduce-to-construct-JSON.md index 904a80c0a..ee19ec22d 100644 --- a/content/resources/how-to-guides/reduce-to-construct-JSON.md +++ b/content/resources/how-to-guides/reduce-to-construct-JSON.md @@ -9,9 +9,9 @@ weight: 105 --- ## Send data in JSON body with `http.post()` -Use the [reduce()](/flux/v0.x/stdlib/universe/reduce/) function to create a JSON object to include as the body with `http.post()`. +Use the [reduce()](/flux/v0/stdlib/universe/reduce/) function to create a JSON object to include as the body with `http.post()`. -1. Import both the [array](/flux/v0.x/stdlib/array/) package to query data and construct table(s), and the [http package](/flux/v0.x/stdlib/http/) to transfer JSON over http. +1. Import both the [array](/flux/v0/stdlib/array/) package to query data and construct table(s), and the [http package](/flux/v0/stdlib/http/) to transfer JSON over http. 2. Use `array.from()` to query data and construct a table. Or, use another method [to query data with Flux](/influxdb/v2/query-data/flux/). 3. Use the `reduce()` function to construct a JSON object, and then use `yield()` to store the output of reduce. This table looks like: @@ -19,7 +19,7 @@ Use the [reduce()](/flux/v0.x/stdlib/universe/reduce/) function to create a JSON | :-------------------- | :----------------------------- | | example-field:["3"4"1 | {example-tag-key:["bar"bar"bar | -4. Use the [map()](/flux/v0.x/stdlib/universe/map/) function to combine the two components together into a JSON object, and then use a second `yield()` function to store this object as `final JSON`. This table looks like: +4. Use the [map()](/flux/v0/stdlib/universe/map/) function to combine the two components together into a JSON object, and then use a second `yield()` function to store this object as `final JSON`. This table looks like: | field | tag | final | | :-------------------- | :----------------------------- | :------------------------------------------------------- | diff --git a/content/resources/how-to-guides/select-hours-from-data.md b/content/resources/how-to-guides/select-hours-from-data.md index 7f35f3f95..32f462d93 100644 --- a/content/resources/how-to-guides/select-hours-from-data.md +++ b/content/resources/how-to-guides/select-hours-from-data.md @@ -12,7 +12,7 @@ weight: 102 You may want to select data from specific hours of the day. For example, you may only want data within normal business hours (9am - 5pm). ## Solution 1 -Use [hourSelection()](/flux/v0.x/stdlib/universe/hourselection/) to filter data by a specific hour range in each day. +Use [hourSelection()](/flux/v0/stdlib/universe/hourselection/) to filter data by a specific hour range in each day. ```js import "date" @@ -26,7 +26,7 @@ from(bucket: "example-bucket") ## Solution 2 -Use [date.hour()](/flux/v0.x/stdlib/date/hour/) to evaluate hours in a `filter()` predicate. +Use [date.hour()](/flux/v0/stdlib/date/hour/) to evaluate hours in a `filter()` predicate. ```js import "date" @@ -37,4 +37,4 @@ from(bucket: "example-bucket") |> filter(fn: (r) => r["_field"] == "example-field") |> filter(fn: (r) => date.hour(t: r["_time"]) > 9 and date.hour(t: r["_time"]) < 17) -This solution also applies if you to select data from certain seconds in a minute, minutes in an hour, days in the month, months in the year, etc. Use the [Flux `date` package](/flux/v0.x/stdlib/date/) to assign integer representations to your data and filter for your desired schedule. \ No newline at end of file +This solution also applies if you to select data from certain seconds in a minute, minutes in an hour, days in the month, months in the year, etc. Use the [Flux `date` package](/flux/v0/stdlib/date/) to assign integer representations to your data and filter for your desired schedule. \ No newline at end of file diff --git a/content/resources/how-to-guides/state-changes-across-task-executions.md b/content/resources/how-to-guides/state-changes-across-task-executions.md index 30b053541..31ca6ea4f 100644 --- a/content/resources/how-to-guides/state-changes-across-task-executions.md +++ b/content/resources/how-to-guides/state-changes-across-task-executions.md @@ -17,7 +17,7 @@ It's common to use [InfluxDB tasks](/influxdb/cloud/process-data/) to evaluate a Explicitly assign levels to your data based on thresholds. ### Solution Advantages -This is the easiest solution to understand if you have never written a task with the [`monitor` package](/flux/v0.x/stdlib/influxdata/influxdb/monitor/). +This is the easiest solution to understand if you have never written a task with the [`monitor` package](/flux/v0/stdlib/influxdata/influxdb/monitor/). ### Solution Disadvantages You have to explicitly define your thresholds, which potentially requires more code. @@ -36,9 +36,9 @@ Create a task where you: ### Solution Explained 1. Import packages and define task options and secrets. Import the following packages: - - [Flux Telegram package](/flux/v0.x/stdlib/contrib/sranka/telegram/): This package - - [Flux InfluxDB secrets package](/flux/v0.x/stdlib/influxdata/influxdb/secrets/): This package contains the [secrets.get()](/flux/v0.x/stdlib/influxdata/influxdb/secrets/get/) function which allows you to retrieve secrets from the InfluxDB secret store. Learn how to [manage secrets](/influxdb/v2/admin/secrets/) in InfluxDB to use this package. - - [Flux InfluxDB monitoring package](https://docs.influxdata.com/flux/v0.x/stdlib/influxdata/influxdb/monitor/): This package contains functions and tools for monitoring your data. + - [Flux Telegram package](/flux/v0/stdlib/contrib/sranka/telegram/): This package + - [Flux InfluxDB secrets package](/flux/v0/stdlib/influxdata/influxdb/secrets/): This package contains the [secrets.get()](/flux/v0/stdlib/influxdata/influxdb/secrets/get/) function which allows you to retrieve secrets from the InfluxDB secret store. Learn how to [manage secrets](/influxdb/v2/admin/secrets/) in InfluxDB to use this package. + - [Flux InfluxDB monitoring package](https://docs.influxdata.com/flux/v0/stdlib/influxdata/influxdb/monitor/): This package contains functions and tools for monitoring your data. ```js @@ -88,7 +88,7 @@ Create a task where you: | example-measurement | example-tag-value | example-field | 50.0 | crit | 2022-01-01T00:01:00Z | -4. Write “states” back to InfluxDB. You can write the data to a new measurement or to a new bucket. To write the data to a new measurement, use [`set()`](/flux/v0.x/stdlib/universe/set/) to update the value of the `_measurement` column in your “states” data. +4. Write “states” back to InfluxDB. You can write the data to a new measurement or to a new bucket. To write the data to a new measurement, use [`set()`](/flux/v0/stdlib/universe/set/) to update the value of the `_measurement` column in your “states” data. ```js states @@ -115,7 +115,7 @@ Create a task where you: | :------------------ | :---------------- | :------------ | -----: | :----- | :------------------- | | example-measurement | example-tag-value | example-field | 55.0 | crit | 2021-12-31T23:59:00Z | -6. Union “states” and “last_state_previous_task”. Store this data in a variable “unioned_states”. Use [`sort()`](/flux/v0.x/stdlib/universe/sort/) to ensure rows are ordered by time. +6. Union “states” and “last_state_previous_task”. Store this data in a variable “unioned_states”. Use [`sort()`](/flux/v0/stdlib/universe/sort/) to ensure rows are ordered by time. ```js unioned_states = @@ -131,7 +131,7 @@ Create a task where you: | example-measurement | example-tag-value | example-field | 30.0 | ok | 2022-01-01T00:00:00Z | | example-measurement | example-tag-value | example-field | 50.0 | crit | 2022-01-01T00:01:00Z | -7. Use [`monitor.stateChangesOnly()`](/flux/v0.x/stdlib/influxdata/influxdb/monitor/statechangesonly/) to return only rows where the state changed in “unioned_states”. Store this data in a variable, “state_changes”. +7. Use [`monitor.stateChangesOnly()`](/flux/v0/stdlib/influxdata/influxdb/monitor/statechangesonly/) to return only rows where the state changed in “unioned_states”. Store this data in a variable, “state_changes”. ```js state_changes = diff --git a/content/resources/videos/Flux-Data-Structure.md b/content/resources/videos/Flux-Data-Structure.md index 228e7a4aa..d7a753552 100644 --- a/content/resources/videos/Flux-Data-Structure.md +++ b/content/resources/videos/Flux-Data-Structure.md @@ -1,7 +1,7 @@ --- title: Flux Data Structure description: > - [Flux](/flux/v0.x/) is the native data language for the InfluxDB platform. Here, Scott Anderson discusses the 'stream of tables' concept, and how that relates to Flux's data structure. + [Flux](/flux/v0/) is the native data language for the InfluxDB platform. Here, Scott Anderson discusses the 'stream of tables' concept, and how that relates to Flux's data structure. menu: resources: parent: Videos diff --git a/content/resources/videos/Flux-Functions.md b/content/resources/videos/Flux-Functions.md index f40c2563a..3d0044f5c 100644 --- a/content/resources/videos/Flux-Functions.md +++ b/content/resources/videos/Flux-Functions.md @@ -1,7 +1,7 @@ --- title: Flux Functions description: > - Functions are the building blocks of the Flux scripting language. Here, Scott Anderson describes what [Flux functions](/flux/v0.x/stdlib/all-functions/) are, how they work, and how to use them. + Functions are the building blocks of the Flux scripting language. Here, Scott Anderson describes what [Flux functions](/flux/v0/stdlib/all-functions/) are, how they work, and how to use them. menu: resources: parent: Videos diff --git a/content/shared/influxctl/release-notes.md b/content/shared/influxctl/release-notes.md index acf26063e..4e35c655a 100644 --- a/content/shared/influxctl/release-notes.md +++ b/content/shared/influxctl/release-notes.md @@ -1,3 +1,22 @@ +## v2.10.1 {date="2025-05-30"} + +### Features + +- Implement `clustered generate` subcommand. +- Support setting the management token an using environment variable. +- Support setting profile name using an environment variable. + +### Dependency updates + +- Update `github.com/apache/arrow-go/v18` from 18.2.0 to 18.3.0. +- Update `github.com/containerd/containerd` from 1.7.12 to 1.7.27. +- Update `github.com/go-git/go-git/v5` from 5.15.0 to 5.16.0. +- Update `golang.org/x/oauth2` from 0.29.0 to 0.30.0. +- Update `google.golang.org/grpc` from 1.71.1 to 1.72.1. +- Update `helm.sh/helm/v3` from 3.14.2 to 3.17.3. + +--- + ## v2.10.0 {date="2025-04-04"} ### Features diff --git a/content/shared/v3-enterprise-get-started/_index.md b/content/shared/influxdb3-get-started/_index.md similarity index 88% rename from content/shared/v3-enterprise-get-started/_index.md rename to content/shared/influxdb3-get-started/_index.md index c996a0ac2..b2d12227a 100644 --- a/content/shared/v3-enterprise-get-started/_index.md +++ b/content/shared/influxdb3-get-started/_index.md @@ -1,37 +1,13 @@ -InfluxDB is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. -Common use cases include: - -- Monitoring sensor data -- Server monitoring -- Application performance monitoring -- Network monitoring -- Financial market and trading analytics -- Behavioral analytics - -InfluxDB is optimized for scenarios where near real-time data monitoring is essential and queries need to return quickly to support user experiences such as dashboards and interactive user interfaces. - -{{% product-name %}} is built on InfluxDB 3 Core, the InfluxDB 3 open source release. -Core's feature highlights include: - -* Diskless architecture with object storage support (or local disk with no dependencies) -* Fast query response times (under 10ms for last-value queries, or 30ms for distinct metadata) -* Embedded Python VM for plugins and triggers -* Parquet file persistence -* Compatibility with InfluxDB 1.x and 2.x write APIs - -The Enterprise version adds the following features to Core: - -* Historical query capability and single series indexing -* High availability -* Read replicas -* Enhanced security (coming soon) -* Row-level delete support (coming soon) -* Integrated admin UI (coming soon) ### What's in this guide +{{% show-in "enterprise" %}} This guide covers Enterprise as well as InfluxDB 3 Core, including the following topics: +{{% /show-in %}} +{{% show-in "core" %}} +This guide covers InfluxDB 3 Core (the open source release), including the following topics: +{{% /show-in %}} - [Install and startup](#install-and-startup) - [Authentication and authorization](#authentication-and-authorization) @@ -42,7 +18,9 @@ This guide covers Enterprise as well as InfluxDB 3 Core, including the following - [Last values cache](#last-values-cache) - [Distinct values cache](#distinct-values-cache) - [Python plugins and the processing engine](#python-plugins-and-the-processing-engine) +{{% show-in "enterprise" %}} - [Multi-server setups](#multi-server-setup) +{{% /show-in %}} > [!Tip] > #### Find support for {{% product-name %}} @@ -54,6 +32,7 @@ This guide covers Enterprise as well as InfluxDB 3 Core, including the following {{% product-name %}} runs on **Linux**, **macOS**, and **Windows**. +{{% show-in "enterprise" %}} {{% tabs-wrapper %}} {{% tabs %}} [Linux or macOS](#linux-or-macos) @@ -107,18 +86,67 @@ Pull the image: docker pull influxdb:3-enterprise ``` -##### InfluxDB 3 Explorer -- Query Interface (beta) + +{{% /tab-content %}} +{{% /tabs-wrapper %}} +{{% /show-in %}} -You can download the new InfluxDB 3 Explorer query interface using Docker. -Explorer is currently in beta. Pull the image: +{{% show-in "core" %}} +{{% tabs-wrapper %}} +{{% tabs %}} +[Linux or macOS](#linux-or-macos) +[Windows](#windows) +[Docker](#docker) +{{% /tabs %}} +{{% tab-content %}} + +To get started quickly, download and run the install script--for example, using [curl](https://curl.se/download.html): + ```bash -docker pull quay.io/influxdb/influxdb3-explorer:latest +curl -O https://www.influxdata.com/d/install_influxdb3.sh \ +&& sh install_influxdb3.sh +``` +Or, download and install [build artifacts](/influxdb3/core/install/#download-influxdb-3-core-binaries): + +- [Linux | AMD64 (x86_64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz) + • + [sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz.sha256) +- [Linux | ARM64 (AArch64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz) + • + [sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz.sha256) +- [macOS | Silicon (ARM64)](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz) + • + [sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz.sha256) + +> [!Note] +> macOS Intel builds are coming soon. + + +{{% /tab-content %}} +{{% tab-content %}} + +Download and install the {{% product-name %}} [Windows (AMD64, x86_64) binary](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip) + • +[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip.sha256) + +{{% /tab-content %}} +{{% tab-content %}} + +The [`influxdb:3-core` image](https://hub.docker.com/_/influxdb/tags?tag=3-core&name=3-core) +is available for x86_64 (AMD64) and ARM64 architectures. + +Pull the image: + + +```bash +docker pull influxdb:3-core ``` {{% /tab-content %}} {{% /tabs-wrapper %}} +{{% /show-in %}} _Build artifacts and images update with every merge into the {{% product-name %}} `main` branch._ @@ -137,11 +165,11 @@ If your system doesn't locate `influxdb3`, then `source` the configuration file source ~/.zshrc ``` + #### Start InfluxDB To start your InfluxDB instance, use the `influxdb3 serve` command and provide the following: - - `--object-store`: Specifies the type of object store to use. InfluxDB supports the following: local file system (`file`), `memory`, S3 (and compatible services like Ceph or Minio) (`s3`), @@ -149,8 +177,14 @@ To start your InfluxDB instance, use the `influxdb3 serve` command and provide t The default is `file`. Depending on the object store type, you may need to provide additional options for your object store configuration. +{{% show-in "enterprise" %}} - `--node-id`: A string identifier that distinguishes individual server instances within the cluster. This forms the final part of the storage path: `//`. In a multi-node setup, this ID is used to reference specific nodes. - `--cluster-id`: A string identifier that determines part of the storage path hierarchy. All nodes within the same cluster share this identifier. The storage path follows the pattern `//`. In a multi-node setup, this ID is used to reference the entire cluster. +{{% /show-in %}} +{{% show-in "core" %}} +- `--node-id`: A string identifier that distinguishes individual server instances. + This forms the final part of the storage path: `/`. +{{% /show-in %}} The following examples show how to start {{% product-name %}} with different object store configurations. @@ -161,8 +195,10 @@ The following examples show how to start {{% product-name %}} with different obj > storage alone, eliminating the need for locally attached disks. > {{% product-name %}} can also work with only local disk storage when needed. +{{% show-in "enterprise" %}} > [!Note] > The combined path structure `//` ensures proper organization of data in your object store, allowing for clean separation between clusters and individual nodes. +{{% /show-in %}} ##### Filesystem object store @@ -171,6 +207,7 @@ This is the default object store type. Replace the following with your values: +{{% show-in "enterprise" %}} ```bash # Filesystem object store # Provide the filesystem directory @@ -180,17 +217,28 @@ influxdb3 serve \ --object-store file \ --data-dir ~/.influxdb3 ``` +{{% /show-in %}} +{{% show-in "core" %}} +```bash +# File system object store +# Provide the file system directory +influxdb3 serve \ + --node-id host01 \ + --object-store file \ + --data-dir ~/.influxdb3 +``` +{{% /show-in %}} -To run the [Docker image](/influxdb3/version/install/#docker-image) and persist data to the filesystem, mount a volume for the object store-for example, pass the following options: +To run the [Docker image](/influxdb3/version/install/#docker-image) and persist data to the file system, mount a volume for the object store-for example, pass the following options: -- `-v /path/on/host:/path/in/container`: Mounts a directory from your filesystem to the container +- `-v /path/on/host:/path/in/container`: Mounts a directory from your file system to the container - `--object-store file --data-dir /path/in/container`: Uses the mount for server storage - +{{% show-in "enterprise" %}} ```bash -# Filesystem object store with Docker +# File system object store with Docker # Create a mount # Provide the mount path docker run -it \ @@ -201,8 +249,21 @@ docker run -it \ --object-store file \ --data-dir /path/in/container ``` - - +{{% /show-in %}} +{{% show-in "core" %}} + +```bash +# File system object store with Docker +# Create a mount +# Provide the mount path +docker run -it \ + -v /path/on/host:/path/in/container \ + influxdb:3-core influxdb3 serve \ + --node-id my_host \ + --object-store file \ + --data-dir /path/in/container +``` +{{% /show-in %}} > [!Note] > @@ -215,6 +276,7 @@ Store data in an S3-compatible object store. This is useful for production deployments that require high availability and durability. Provide your bucket name and credentials to access the S3 object store. +{{% show-in "enterprise" %}} ```bash # S3 object store (default is the us-east-1 region) # Specify the object store type and associated options @@ -227,6 +289,7 @@ influxdb3 serve \ --aws-secret-access-key AWS_SECRET_ACCESS_KEY ``` + ```bash # Minio or other open source object store # (using the AWS S3 API with additional parameters) @@ -241,12 +304,40 @@ influxdb3 serve \ --aws-endpoint ENDPOINT \ --aws-allow-http ``` +{{% /show-in %}} +{{% show-in "core" %}} +```bash +# S3 object store (default is the us-east-1 region) +# Specify the object store type and associated options +influxdb3 serve \ + --node-id host01 \ + --object-store s3 \ + --bucket OBJECT_STORE_BUCKET \ + --aws-access-key AWS_ACCESS_KEY_ID \ + --aws-secret-access-key AWS_SECRET_ACCESS_KEY +``` + +```bash +# Minio or other open source object store +# (using the AWS S3 API with additional parameters) +# Specify the object store type and associated options +influxdb3 serve \ + --node-id host01 \ + --object-store s3 \ + --bucket OBJECT_STORE_BUCKET \ + --aws-access-key-id AWS_ACCESS_KEY_ID \ + --aws-secret-access-key AWS_SECRET_ACCESS_KEY \ + --aws-endpoint ENDPOINT \ + --aws-allow-http +``` +{{% /show-in %}} #### Memory object store Store data in RAM without persisting it on shutdown. It's useful for rapid testing and development. +{{% show-in "enterprise" %}} ```bash # Memory object store # Stores data in RAM; doesn't persist data @@ -255,6 +346,16 @@ influxdb3 serve \ --cluster-id cluster01 \ --object-store memory ``` +{{% /show-in %}} +{{% show-in "core" %}} +```bash +# Memory object store +# Stores data in RAM; doesn't persist data +influxdb3 serve \ +--node-id host01 \ +--object-store memory +``` +{{% /show-in %}} For more information about server options, use the CLI help or view the [InfluxDB 3 CLI reference](/influxdb3/version/reference/cli/influxdb3/serve/): @@ -262,6 +363,16 @@ For more information about server options, use the CLI help or view the [InfluxD influxdb3 serve --help ``` +> [!Tip] +> #### Run the InfluxDB 3 Explorer query interface (beta) +> +> InfluxDB 3 Explorer (currently in beta) is the web-based query and +> administrative interface for InfluxDB 3. +> It provides visual management of databases and tokens and an easy way to query your time series data. +> +> For more information, see the [InfluxDB 3 Explorer documentation](/influxdb3/explorer/). + +{{% show-in "enterprise" %}} #### Licensing When first starting a new instance, {{% product-name %}} prompts you to select a license type. @@ -273,6 +384,7 @@ InfluxDB 3 Enterprise licenses authorize the use of the InfluxDB 3 Enterprise so - **Commercial**: Commercial license with full access to InfluxDB 3 Enterprise capabilities. You can learn more on managing your InfluxDB 3 Enterprise license on the [Manage your license](https://docs.influxdata.com/influxdb3/enterprise/admin/license/)page. +{{% /show-in %}} ### Authentication and authorization @@ -280,8 +392,6 @@ You can learn more on managing your InfluxDB 3 Enterprise license on the [Manage With authentication enabled, you must provide a token with `influxdb3` CLI commands and HTTP API requests. -{{% product-name %}} uses token-based authentication and authorization which is enabled by default when you start the server. - {{% show-in "enterprise" %}} {{% product-name %}} supports the following types of tokens: @@ -293,19 +403,24 @@ With authentication enabled, you must provide a token with `influxdb3` CLI comma - A system token grants read access to system information endpoints and metrics for the server {{% /show-in %}} +{{% show-in "core" %}} +{{% product-name %}} supports _admin_ tokens, which grant access to all CLI actions and API endpoints. +{{% /show-in %}} For more information about tokens and authorization, see [Manage tokens](/influxdb3/version/admin/tokens/). -> [!Important] -> #### Securely store your token -> -> InfluxDB lets you view the token string only when you create the token. -> Store your token in a secure location, as you cannot retrieve it from the database later. -> InfluxDB 3 stores only the token's hash and metadata in the catalog. - #### Create an operator token -After you start the server, create your first admin token (the operator token): +After you start the server, create your first admin token. +The first admin token you create is the _operator_ token for the server. + +Use the `influxdb3` CLI or the HTTP API to create your operator token. + +> [!Important] +> **Store your token securely** +> +> InfluxDB displays the token string only when you create it. +> Store your token securely—you cannot retrieve it from the database later. {{< code-tabs-wrapper >}} {{% code-tabs %}} @@ -334,17 +449,16 @@ Replace {{% code-placeholder-key %}}`CONTAINER_NAME`{{% /code-placeholder-key %} {{< /code-tabs-wrapper >}} The command returns a token string for authenticating CLI commands and API requests. - -> [!Important] -> **Store your token securely** -> -> InfluxDB displays the token string only when you create it. -> Store your token securely—you cannot retrieve it from the database later. +Store your token securely—you cannot retrieve it from the database later. #### Set your token for authentication -Use one of the following methods to authenticate requests. -In your commands, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-placeholder-key %}} with your token string (for example, the [operator token](#create-an-operator-token) from the previous step). +Use your operator token to authenticate server actions in {{% product-name %}}, +such as creating additional tokens, performing administrative tasks, and writing and querying data. + +Use one of the following methods to provide your token and authenticate `influxdb3` CLI commands. + +In your command, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-placeholder-key %}} with your token string (for example, the [operator token](#create-an-operator-token) from the previous step). {{< tabs-wrapper >}} {{% tabs %}} @@ -375,7 +489,7 @@ influxdb3 show databases --token AUTH_TOKEN {{% /tab-content %}} {{< /tabs-wrapper >}} -For HTTP API requests, include your token in the `Authorization` header: +For HTTP API requests, include your token in the `Authorization` header--for example: {{% code-placeholders "AUTH_TOKEN" %}} ```bash @@ -384,11 +498,13 @@ curl "http://{{< influxdb/host >}}/api/v3/configure/database" \ ``` {{% /code-placeholders %}} -#### Learn more about token management +#### Learn more about tokens and permissions -- [Manage admin tokens](/influxdb3/version/admin/tokens/admin/) - Create, list, and delete admin tokens +- [Manage admin tokens](/influxdb3/version/admin/tokens/admin/) - Understand and manage operator and named admin tokens +{{% show-in "enterprise" %}} - [Manage resource tokens](/influxdb3/version/admin/tokens/resource/) - Create, list, and delete resource tokens -- [Token types and permissions](/influxdb3/version/admin/tokens/) - Understanding operator and named admin tokens +{{% /show-in %}} +- [Authentication](/influxdb3/version/reference/internals/authentication/) - Understand authentication, authorizations, and permissions in {{% product-name %}} ### Data model @@ -408,10 +524,11 @@ This tutorial covers many of the recommended tools. | :------------------------------------------------------------------------------------------------ | :----------------------: | :----------------------: | :----------------------: | | **`influxdb3` CLI** {{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | | **InfluxDB HTTP API** {{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| **InfluxDB 3 Explorer** {{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | - | **{{< icon "check" >}}** | | [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | | [InfluxDB v2 client libraries](/influxdb3/version/reference/client-libraries/v2/) | - | **{{< icon "check" >}}** | - | | [InfluxDB v1 client libraries](/influxdb3/version/reference/client-libraries/v1/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | -| [InfluxDB 3 Processing engine](#python-plugins-and-the-processing-engine){{< req text="\* " color="magenta" >}} | | **{{< icon "check" >}}** | **{{< icon "check" >}}** | +| [InfluxDB 3 processing engine](#python-plugins-and-the-processing-engine){{< req text="\* " color="magenta" >}} | | **{{< icon "check" >}}** | **{{< icon "check" >}}** | | [Telegraf](/telegraf/v1/) | - | **{{< icon "check" >}}** | - | | [Chronograf](/chronograf/v1/) | - | - | - | | `influx` CLI | - | - | - | @@ -431,6 +548,15 @@ InfluxDB is a schema-on-write database. You can start writing data and InfluxDB After a schema is created, InfluxDB validates future write requests against it before accepting the data. Subsequent requests can add new fields on-the-fly, but can't add new tags. +{{% show-in "core" %}} +> [!Note] +> #### Core is optimized for recent data +> +> {{% product-name %}} is optimized for recent data but accepts writes from any time period. +> The system persists data to Parquet files for historical analysis with [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/) or third-party tools. +> For extended historical queries and optimized data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/). +{{% /show-in %}} + #### Write data in line protocol syntax {{% product-name %}} accepts data in [line protocol](/influxdb3/version/reference/syntax/line-protocol/) syntax. @@ -471,14 +597,8 @@ Use the `influxdb3 write` command to write data to a database. In the code samples, replace the following placeholders with your values: -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: The name of the [database](/influxdb3/version/admin/databases/) to write to. -{{% show-in "core" %}} -- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: A [token](/influxdb3/version/admin/tokens/) for your {{% product-name %}} server. -{{% /show-in %}} -{{% show-in "enterprise" %}} -- {{% code-placeholder-key %}}`TOKEN`{{% /code-placeholder-key %}}: A [token](/influxdb3/version/admin/tokens/) - with permission to write to the specified database. -{{% /show-in %}} +- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb3/version/admin/databases/) to write to. +- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to write to the specified database{{% /show-in %}} ##### Write data via stdin @@ -697,7 +817,15 @@ influxdb3 create -h ### Query data -InfluxDB 3 now supports native SQL for querying, in addition to InfluxQL, an SQL-like language customized for time series queries. +InfluxDB 3 supports native SQL for querying, in addition to InfluxQL, an +SQL-like language customized for time series queries. + +{{% show-in "core" %}} +{{< product-name >}} limits +query time ranges to 72 hours (both recent and historical) to ensure query performance. +For more information about the 72-hour limitation, see the +[update on InfluxDB 3 Core’s 72-hour limitation](https://www.influxdata.com/blog/influxdb3-open-source-public-alpha-jan-27/). +{{% /show-in %}} > [!Note] > Flux, the language introduced in InfluxDB 2.0, is **not** supported in InfluxDB 3. @@ -882,30 +1010,17 @@ print(table.group_by('cpu').aggregate([('time_system', 'mean')])) For more information about the Python client library, see the [`influxdb3-python` repository](https://github.com/InfluxCommunity/influxdb3-python) in GitHub. - ### Query using InfluxDB 3 Explorer (Beta) -You can use the InfluxDB 3 Explorer query interface by downloading the Docker image. - -```bash -docker pull quay.io/influxdb/influxdb3-explorer:latest -``` - -Run the interface using: - -```bash -docker run -p 8086:80 -p 8087:8888 quay.io/influxdb/influxdb3-explorer:latest --mode=normal -``` - -With the default settings above, you can access the UI at http://localhost:8086. -Set your expected database connection details on the Settings page. -From there, you can query data, browser your database schema, and do basic -visualization of your time series data. +You can use the InfluxDB 3 Explorer web-based interface to query and visualize data, +and administer your {{% product-name %}} instance. +For more information, see how to [install InfluxDB 3 Explorer (Beta)](/influxdb3/explorer/install/) using Docker +and get started querying your data. ### Last values cache {{% product-name %}} supports a **last-n values cache** which stores the last N values in a series or column hierarchy in memory. This gives the database the ability to answer these kinds of queries in under 10 milliseconds. -Last value caches import historical data when first created, and reload data on restart to ensure cache consistency and eliminate cold start delays. + You can use the `influxdb3` CLI to [create a last value cache](/influxdb3/version/reference/cli/influxdb3/create/last_cache/). {{% code-placeholders "DATABASE_NAME|AUTH_TOKEN|TABLE_NAME|CACHE_NAME" %}} @@ -991,7 +1106,6 @@ Replace the following placeholders with your values: Similar to the [last values cache](#last-values-cache), the database can cache in RAM the distinct values for a single column in a table or a hierarchy of columns. This is useful for fast metadata lookups, which can return in under 30 milliseconds. Many of the options are similar to the last value cache. -Distinct values caches import historical data when first created, and reload data on restart to ensure cache consistency and eliminate cold start delays. You can use the `influxdb3` CLI to [create a distinct values cache](/influxdb3/version/reference/cli/influxdb3/create/distinct_cache/). @@ -1035,7 +1149,7 @@ influxdb3 create distinct_cache \ #### Query a distinct values cache -To use the distinct values cache, call it using the `distinct_cache()` function in your query--for example: +To query data from the distinct values cache, use the [`distinct_cache()`](/influxdb3/version/reference/sql/functions/cache/#distinct_cache) function in your query--for example: ```bash influxdb3 query \ @@ -1276,6 +1390,7 @@ influxdb3 enable trigger \ For more information, see [Python plugins and the Processing engine](/influxdb3/version/plugins/). +{{% show-in "enterprise" %}} ### Multi-server setup {{% product-name %}} is built to support multi-node setups for high availability, read replicas, and flexible implementations depending on use case. @@ -1438,7 +1553,7 @@ For a robust and effective setup for managing time-series data, you can run inge --mode ingest \ --object-store s3 \ --bucket influxdb-3-enterprise-storage \ - -- http-bind {{< influxdb/host >}} \ + --http-bind {{< influxdb/host >}} \ --aws-access-key-id \ --aws-secret-access-key ``` @@ -1500,7 +1615,7 @@ For a robust and effective setup for managing time-series data, you can run inge --mode query \ --object-store s3 \ --bucket influxdb-3-enterprise-storage \ - -- http-bind localhost:8383 \ + --http-bind localhost:8383 \ --aws-access-key-id \ --aws-secret-access-key ``` @@ -1519,7 +1634,7 @@ For a robust and effective setup for managing time-series data, you can run inge --mode query \ --object-store s3 \ --bucket influxdb-3-enterprise-storage \ - -- http-bind localhost:8484 \ + --http-bind localhost:8484 \ --aws-access-key-id \ ``` @@ -1595,3 +1710,4 @@ Replace the following placeholders with your values: - {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to create the file index in - {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: the name of the table to create the file index in - {{% code-placeholder-key %}}`COLUMNS`{{% /code-placeholder-key %}}: a comma-separated list of columns to index on, for example, `host,application` +{{% /show-in %}} \ No newline at end of file diff --git a/content/shared/influxdb3/_index.md b/content/shared/influxdb3/_index.md new file mode 100644 index 000000000..505e32a12 --- /dev/null +++ b/content/shared/influxdb3/_index.md @@ -0,0 +1,45 @@ + +{{% product-name %}} is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. + +Common use cases include: + +- Monitoring sensor data +- Server monitoring +- Application performance monitoring +- Network monitoring +- Financial market and trading analytics +- Behavioral analytics + +InfluxDB is optimized for scenarios where near real-time data monitoring is essential and queries need to return quickly to support user experiences such as dashboards and interactive user interfaces. + +{{% show-in "enterprise" %}} +{{% product-name %}} is built on InfluxDB 3 Core, the InfluxDB 3 open source release. +{{% /show-in %}} +{{% show-in "core" %}} +{{% product-name %}} is the InfluxDB 3 open source release. +{{% /show-in %}} + +Core's feature highlights include: + +- Diskless architecture with object storage support (or local disk with no dependencies) +- Fast query response times (under 10ms for last-value queries, or 30ms for distinct metadata) +- Embedded Python VM for plugins and triggers +- Parquet file persistence +- Compatibility with InfluxDB 1.x and 2.x write APIs + +{{% show-in "core" %}} +[Get started with Core](/influxdb3/version/get-started/) +{{% /show-in %}} + +The Enterprise version adds the following features to Core: + +- Historical query capability and single series indexing +- High availability +- Read replicas +- Enhanced security (coming soon) +- Row-level delete support (coming soon) +- Integrated admin UI (coming soon) + +{{% show-in "core" %}} +For more information, see how to [get started with Enterprise](/influxdb3/enterprise/get-started/). +{{% /show-in %}} \ No newline at end of file diff --git a/content/shared/v3-core-get-started/_index.md b/content/shared/v3-core-get-started/_index.md deleted file mode 100644 index b01a443fa..000000000 --- a/content/shared/v3-core-get-started/_index.md +++ /dev/null @@ -1,1235 +0,0 @@ -InfluxDB is a database built to collect, process, transform, and store event and time series data, and is ideal for use cases that require real-time ingest and fast query response times to build user interfaces, monitoring, and automation solutions. - -Common use cases include: - -- Monitoring sensor data -- Server monitoring -- Application performance monitoring -- Network monitoring -- Financial market and trading analytics -- Behavioral analytics - -InfluxDB is optimized for scenarios where near real-time data monitoring is essential and queries need to return quickly to support user experiences such as dashboards and interactive user interfaces. - -{{% product-name %}} is the InfluxDB 3 open source release. -Core's feature highlights include: - -* Diskless architecture with object storage support (or local disk with no dependencies) -* Fast query response times (under 10ms for last-value queries, or 30ms for distinct metadata) -* Embedded Python VM for plugins and triggers -* Parquet file persistence -* Compatibility with InfluxDB 1.x and 2.x write APIs - -The Enterprise version adds the following features to Core: - -* Historical query capability and single series indexing -* High availability -* Read replicas -* Enhanced security (coming soon) -* Row-level delete support (coming soon) -* Integrated admin UI (coming soon) - -For more information, see how to [get started with Enterprise](/influxdb3/enterprise/get-started/). - -### What's in this guide - -This guide covers InfluxDB 3 Core (the open source release), including the following topics: - -- [Install and startup](#install-and-startup) -- [Authentication and authorization](#authentication-and-authorization) -- [Data Model](#data-model) -- [Tools to use](#tools-to-use) -- [Write data](#write-data) -- [Query data](#query-data) -- [Last values cache](#last-values-cache) -- [Distinct values cache](#distinct-values-cache) -- [Python plugins and the processing engine](#python-plugins-and-the-processing-engine) - -> [!Tip] -> #### Find support for {{% product-name %}} -> -> The [InfluxDB Discord server](https://discord.gg/9zaNCW2PRT) is the best place to find support for {{% product-name %}}. -> For other InfluxDB versions, see the [Support and feedback](#bug-reports-and-feedback) options. - -### Install and startup - -{{% product-name %}} runs on **Linux**, **macOS**, and **Windows**. - -{{% tabs-wrapper %}} -{{% tabs %}} -[Linux or macOS](#linux-or-macos) -[Windows](#windows) -[Docker](#docker) -{{% /tabs %}} -{{% tab-content %}} - -To get started quickly, download and run the install script--for example, using [curl](https://curl.se/download.html): - - -```bash -curl -O https://www.influxdata.com/d/install_influxdb3.sh \ -&& sh install_influxdb3.sh -``` - -Or, download and install [build artifacts](/influxdb3/core/install/#download-influxdb-3-core-binaries): - -- [Linux | AMD64 (x86_64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz) - • - [sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_amd64.tar.gz.sha256) -- [Linux | ARM64 (AArch64) | GNU](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz) - • - [sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_linux_arm64.tar.gz.sha256) -- [macOS | Silicon (ARM64)](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz) - • - [sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}_darwin_arm64.tar.gz.sha256) - -> [!Note] -> macOS Intel builds are coming soon. - - -{{% /tab-content %}} -{{% tab-content %}} - -Download and install the {{% product-name %}} [Windows (AMD64, x86_64) binary](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip) - • -[sha256](https://dl.influxdata.com/influxdb/releases/influxdb3-{{< product-key >}}-{{< latest-patch >}}-windows_amd64.zip.sha256) - -{{% /tab-content %}} -{{% tab-content %}} - - -The [`influxdb:3-core` image](https://hub.docker.com/_/influxdb/tags?tag=3-core&name=3-core) -is available for x86_64 (AMD64) and ARM64 architectures. - -Pull the image: - - -```bash -docker pull influxdb:3-core -``` - -##### InfluxDB 3 Explorer -- Query Interface (Beta) - -You can download the new InfluxDB 3 Explorer query interface using Docker. -Explorer is currently in beta. Pull the image: - -```bash -docker pull quay.io/influxdb/influxdb3-explorer:latest -``` - - -{{% /tab-content %}} -{{% /tabs-wrapper %}} - -_Build artifacts and images update with every merge into the {{% product-name %}} `main` branch._ - -#### Verify the install - -After you have installed {{% product-name %}}, enter the following command to verify that it completed successfully: - -```bash -influxdb3 --version -``` - -If your system doesn't locate `influxdb3`, then `source` the configuration file (for example, .bashrc, .zshrc) for your shell--for example: - - -```zsh -source ~/.zshrc -``` - -#### Start InfluxDB - -To start your InfluxDB instance, use the `influxdb3 serve` command and provide the following: - -`--object-store`: Specifies the type of object store to use. - InfluxDB supports the following: local file system (`file`), `memory`, - S3 (and compatible services like Ceph or Minio) (`s3`), - Google Cloud Storage (`google`), and Azure Blob Storage (`azure`). - The default is `file`. - Depending on the object store type, you may need to provide additional options - for your object store configuration. -- `--node-id`: A string identifier that distinguishes individual server instances within the cluster. - This forms the final part of the storage path: `/`. - In a multi-node setup, this ID is used to reference specific nodes. - -The following examples show how to start {{% product-name %}} with different object store configurations. - -> [!Note] -> #### Diskless architecture -> -> InfluxDB 3 supports a diskless architecture that can operate with object -> storage alone, eliminating the need for locally attached disks. -> {{% product-name %}} can also work with only local disk storage when needed. - -##### Filesystem object store - -Store data in a specified directory on the local filesystem. -This is the default object store type. - -Replace the following with your values: - -```bash -# Filesystem object store -# Provide the filesystem directory -influxdb3 serve \ - --node-id host01 \ - --object-store file \ - --data-dir ~/.influxdb3 -``` - -To run the [Docker image](/influxdb3/version/install/#docker-image) and persist data to the filesystem, mount a volume for the object store-for example, pass the following options: - -- `-v /path/on/host:/path/in/container`: Mounts a directory from your filesystem to the container -- `--object-store file --data-dir /path/in/container`: Uses the mount for server storage - - -```bash -# Filesystem object store with Docker -# Create a mount -# Provide the mount path -docker run -it \ - -v /path/on/host:/path/in/container \ - influxdb:3-core influxdb3 serve \ - --node-id my_host \ - --object-store file \ - --data-dir /path/in/container -``` - -> [!Note] -> -> The {{% product-name %}} Docker image exposes port `8181`, the `influxdb3` server default for HTTP connections. -> To map the exposed port to a different port when running a container, see the Docker guide for [Publishing and exposing ports](https://docs.docker.com/get-started/docker-concepts/running-containers/publishing-ports/). - -##### S3 object store - -Store data in an S3-compatible object store. -This is useful for production deployments that require high availability and durability. -Provide your bucket name and credentials to access the S3 object store. - -```bash -# S3 object store (default is the us-east-1 region) -# Specify the object store type and associated options -influxdb3 serve \ - --node-id host01 \ - --object-store s3 \ - --bucket OBJECT_STORE_BUCKET \ - --aws-access-key AWS_ACCESS_KEY_ID \ - --aws-secret-access-key AWS_SECRET_ACCESS_KEY -``` - -```bash -# Minio or other open source object store -# (using the AWS S3 API with additional parameters) -# Specify the object store type and associated options -influxdb3 serve \ - --node-id host01 \ - --object-store s3 \ - --bucket OBJECT_STORE_BUCKET \ - --aws-access-key-id AWS_ACCESS_KEY_ID \ - --aws-secret-access-key AWS_SECRET_ACCESS_KEY \ - --aws-endpoint ENDPOINT \ - --aws-allow-http -``` - -#### Memory object store - -Store data in RAM without persisting it on shutdown. -It's useful for rapid testing and development. - -```bash -# Memory object store -# Stores data in RAM; doesn't persist data -influxdb3 serve \ ---node-id host01 \ ---object-store memory -``` - -For more information about server options, use the CLI help or view the [InfluxDB 3 CLI reference](/influxdb3/version/reference/cli/influxdb3/serve/): - -```bash -influxdb3 serve --help -``` - -### Authentication and authorization - -{{% product-name %}} uses token-based authentication and authorization, which is enabled by default when you start the server. - -With authentication enabled, you must provide a token with `influxdb3` CLI commands and HTTP API requests. - -#### Create an operator token - -After you start the server, create your first admin token (the operator token): - -{{< code-tabs-wrapper >}} -{{% code-tabs %}} -[CLI](#) -[Docker](#) -{{% /code-tabs %}} -{{% code-tab-content %}} - -```bash -influxdb3 create token --admin -``` - -{{% /code-tab-content %}} -{{% code-tab-content %}} - -{{% code-placeholders "CONTAINER_NAME" %}} -```bash -# With Docker — in a new terminal: -docker exec -it CONTAINER_NAME influxdb3 create token --admin -``` -{{% /code-placeholders %}} - -Replace {{% code-placeholder-key %}}`CONTAINER_NAME`{{% /code-placeholder-key %}} with the name of your running Docker container. - -{{% /code-tab-content %}} -{{< /code-tabs-wrapper >}} - -The command returns a token string for authenticating CLI commands and API requests. - -> [!Important] -> **Store your token securely** -> -> InfluxDB displays the token string only when you create it. -> Store your token securely—you cannot retrieve it from the database later. - -#### Set your token for authentication - -Use one of the following methods to authenticate requests. -In your commands, replace {{% code-placeholder-key %}}`YOUR_AUTH_TOKEN`{{% /code-placeholder-key %}} with your token string (for example, the [operator token](#create-an-operator-token) from the previous step). - -{{< tabs-wrapper >}} -{{% tabs %}} -[Environment variable (recommended)](#) -[Command option](#) -{{% /tabs %}} -{{% tab-content %}} - -Set the `INFLUXDB3_AUTH_TOKEN` environment variable to have the CLI use your token automatically: - -{{% code-placeholders "YOUR_AUTH_TOKEN" %}} -```bash -export INFLUXDB3_AUTH_TOKEN=YOUR_AUTH_TOKEN -``` -{{% /code-placeholders %}} - -{{% /tab-content %}} -{{% tab-content %}} - -Include the `--token` option with CLI commands: - -{{% code-placeholders "YOUR_AUTH_TOKEN" %}} -```bash -influxdb3 show databases --token AUTH_TOKEN -``` -{{% /code-placeholders %}} - -{{% /tab-content %}} -{{< /tabs-wrapper >}} - -For HTTP API requests, include your token in the `Authorization` header: - -{{% code-placeholders "AUTH_TOKEN" %}} -```bash -curl "http://{{< influxdb/host >}}/api/v3/configure/database" \ - --header "Authorization: Bearer AUTH_TOKEN" -``` -{{% /code-placeholders %}} - -#### Learn more about token management - -- [Manage admin tokens](/influxdb3/version/admin/tokens/admin/) - Create, list, and delete admin tokens -- [Token types and permissions](/influxdb3/version/admin/tokens/) - Understanding operator and named admin tokens - -### Data model - -The database server contains logical databases, which have tables, which have columns. Compared to previous versions of InfluxDB you can think of a database as a `bucket` in v2 or as a `db/retention_policy` in v1. A `table` is equivalent to a `measurement`, which has columns that can be of type `tag` (a string dictionary), `int64`, `float64`, `uint64`, `bool`, or `string` and finally every table has a `time` column that is a nanosecond precision timestamp. - -In InfluxDB 3, every table has a primary key--the ordered set of tags and the time--for its data. -This is the sort order used for all Parquet files that get created. When you create a table, either through an explicit call or by writing data into a table for the first time, it sets the primary key to the tags in the order they arrived. This is immutable. Although InfluxDB is still a _schema-on-write_ database, the tag column definitions for a table are immutable. - -Tags should hold unique identifying information like `sensor_id`, or `building_id` or `trace_id`. All other data should be kept in fields. You will be able to add fast last N value and distinct value lookups later for any column, whether it is a field or a tag. - -### Tools to use - -The following table compares tools that you can use to interact with {{% product-name %}}. -This tutorial covers many of the recommended tools. - -| Tool | Administration | Write | Query | -| :------------------------------------------------------------------------------------------------ | :----------------------: | :----------------------: | :----------------------: | -| `influxdb3` CLI{{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | -| InfluxDB HTTP API {{< req text="\* " color="magenta" >}} | **{{< icon "check" >}}** | **{{< icon "check" >}}** | **{{< icon "check" >}}** | -| [InfluxDB 3 client libraries](/influxdb3/version/reference/client-libraries/v3/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | -| [InfluxDB v2 client libraries](/influxdb3/version/reference/client-libraries/v2/) | - | **{{< icon "check" >}}** | - | -| [InfluxDB v1 client libraries](/influxdb3/version/reference/client-libraries/v1/) | - | **{{< icon "check" >}}** | **{{< icon "check" >}}** | -| [InfluxDB 3 Processing engine](#python-plugins-and-the-processing-engine){{< req text="\* " color="magenta" >}} | | **{{< icon "check" >}}** | **{{< icon "check" >}}** | -| [Telegraf](/telegraf/v1/) | - | **{{< icon "check" >}}** | - | -| [Chronograf](/chronograf/v1/) | - | - | - | -| `influx` CLI | - | - | - | -| `influxctl` CLI | - | - | - | -| InfluxDB v2.x user interface | - | - | - | -| **Third-party tools** | | | | -| Flight SQL clients | - | - | **{{< icon "check" >}}** | -| [Grafana](/influxdb3/version/visualize-data/grafana/) | - | - | **{{< icon "check" >}}** | - -{{< caption >}} -{{< req type="key" text="Covered in this guide" color="magenta" >}} -{{< /caption >}} - -### Write data - -InfluxDB is a schema-on-write database. You can start writing data and InfluxDB creates the logical database, tables, and their schemas on the fly. -After a schema is created, InfluxDB validates future write requests against it before accepting the data. -Subsequent requests can add new fields on-the-fly, but can't add new tags. - -> [!Note] -> #### Core is optimized for recent data -> -> {{% product-name %}} is optimized for recent data but accepts writes from any time period. -> The system persists data to Parquet files for historical analysis with [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/) or third-party tools. -> For extended historical queries and optimized data organization, consider using [InfluxDB 3 Enterprise](/influxdb3/enterprise/get-started/). - -#### Write data in line protocol syntax - -{{% product-name %}} accepts data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) syntax. -The following code block is an example of time series data in [line protocol](/influxdb3/core/reference/syntax/line-protocol/) syntax: - -- `cpu`: the table name. -- `host`, `region`, `applications`: the tags. A tag set is an ordered, comma-separated list of key/value pairs where the values are strings. -- `val`, `usage_percent`, `status`: the fields. A field set is a comma-separated list of key/value pairs. -- timestamp: If you don't specify a timestamp, InfluxData uses the time when data is written. - The default precision is a nanosecond epoch. - To specify a different precision, pass the `precision` parameter in your CLI command or API request. - -``` -cpu,host=Alpha,region=us-west,application=webserver val=1i,usage_percent=20.5,status="OK" -cpu,host=Bravo,region=us-east,application=database val=2i,usage_percent=55.2,status="OK" -cpu,host=Charlie,region=us-west,application=cache val=3i,usage_percent=65.4,status="OK" -cpu,host=Bravo,region=us-east,application=database val=4i,usage_percent=70.1,status="Warn" -cpu,host=Bravo,region=us-central,application=database val=5i,usage_percent=80.5,status="OK" -cpu,host=Alpha,region=us-west,application=webserver val=6i,usage_percent=25.3,status="Warn" -``` - -### Write data using the CLI - -To quickly get started writing data, you can use the `influxdb3` CLI. - -> [!Note] -> For batching and higher-volume write workloads, we recommend using the [HTTP API](#write-data-using-the-http-api). -> -> #### Write data using InfluxDB API client libraries -> -> InfluxDB provides supported client libraries that integrate with your code -> to construct data as time series points and write the data as line protocol to your {{% product-name %}} database. -> For more information, see how to [use InfluxDB client libraries to write data](/influxdb3/version/write-data/api-client-libraries/). - -##### Example: write data using the influxdb3 CLI - -Use the `influxdb3 write` command to write data to a database. - -In the code samples, replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb3/version/admin/databases/) to write to. -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to write to the specified database{{% /show-in %}} - -##### Write data via stdin - -Pass data as quoted line protocol via standard input (stdin)--for example: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```bash -influxdb3 write \ - --database DATABASE_NAME \ - --token AUTH_TOKEN \ - --precision ns \ - --accept-partial \ -'cpu,host=Alpha,region=us-west,application=webserver val=1i,usage_percent=20.5,status="OK" -cpu,host=Bravo,region=us-east,application=database val=2i,usage_percent=55.2,status="OK" -cpu,host=Charlie,region=us-west,application=cache val=3i,usage_percent=65.4,status="OK" -cpu,host=Bravo,region=us-east,application=database val=4i,usage_percent=70.1,status="Warn" -cpu,host=Bravo,region=us-central,application=database val=5i,usage_percent=80.5,status="OK" -cpu,host=Alpha,region=us-west,application=webserver val=6i,usage_percent=25.3,status="Warn"' -``` -{{% /code-placeholders %}} - -##### Write data from a file - -Pass the `--file` option to write line protocol you have saved to a file--for example, save the -[sample line protocol](#write-data-in-line-protocol-syntax) to a file named `server_data` -and then enter the following command: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```bash -influxdb3 write \ - --database DATABASE_NAME \ - --token AUTH_TOKEN \ - --precision ns \ - --accept-partial \ - --file path/to/server_data -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the [database](/influxdb3/version/admin/databases/) to write to. -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to write to the specified database{{% /show-in %}} - -### Write data using the HTTP API - -{{% product-name %}} provides three write API endpoints that respond to HTTP `POST` requests. -The `/api/v3/write_lp` endpoint is the recommended endpoint for writing data and -provides additional options for controlling write behavior. - -If you need to write data using InfluxDB v1.x or v2.x tools, use the compatibility API endpoints. -Compatibility APIs work with [Telegraf](/telegraf/v1/), InfluxDB v2.x and v1.x [API client libraries](/influxdb3/version/reference/client-libraries), and other tools that support the v1.x or v2.x APIs. - -{{% tabs-wrapper %}} -{{% tabs %}} -[/api/v3/write_lp](#) -[v2 compatibility](#) -[v1 compatibility](#) -{{% /tabs %}} -{{% tab-content %}} - -{{% product-name %}} adds the `/api/v3/write_lp` endpoint. - -{{}} - -This endpoint accepts the same line protocol syntax as previous versions, -and supports the following parameters: - -- `?accept_partial=`: Accept or reject partial writes (default is `true`). -- `?no_sync=`: Control when writes are acknowledged: - - `no_sync=true`: Acknowledges writes before WAL persistence completes. - - `no_sync=false`: Acknowledges writes after WAL persistence completes (default). -- `?precision=`: Specify the precision of the timestamp. The default is nanosecond precision. -- request body: The line protocol data to write. - -For more information about the parameters, see [Write data](/influxdb3/version/write-data/). - -##### Example: write data using the /api/v3 HTTP API - -The following examples show how to write data using `curl` and the `/api/3/write_lp` HTTP endpoint. -To show the difference between accepting and rejecting partial writes, line `2` in the example contains a `string` value (`"hi"`) for a `float` field (`temp`). - -###### Partial write of line protocol occurred - -With `accept_partial=true` (default): - -```bash -curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto" \ - --header 'Authorization: Bearer apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0==' \ - --data-raw 'home,room=Sunroom temp=96 -home,room=Sunroom temp="hi"' -``` - -The response is the following: - -``` -< HTTP/1.1 400 Bad Request -... -{ - "error": "partial write of line protocol occurred", - "data": [ - { - "original_line": "home,room=Sunroom temp=hi", - "line_number": 2, - "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" - } - ] -} -``` - -Line `1` is written and queryable. -The response is an HTTP error (`400`) status, and the response body contains the error message `partial write of line protocol occurred` with details about the problem line. - -###### Parsing failed for write_lp endpoint - -With `accept_partial=false`: - -```bash -curl -v "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&accept_partial=false" \ - --header 'Authorization: Bearer apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0==' \ - --data-raw 'home,room=Sunroom temp=96 -home,room=Sunroom temp="hi"' -``` - -The response is the following: - -``` -< HTTP/1.1 400 Bad Request -... -{ - "error": "parsing failed for write_lp endpoint", - "data": { - "original_line": "home,room=Sunroom temp=hi", - "line_number": 2, - "error_message": "invalid column type for column 'temp', expected iox::column_type::field::float, got iox::column_type::field::string" - } -} -``` - -InfluxDB rejects all points in the batch. -The response is an HTTP error (`400`) status, and the response body contains `parsing failed for write_lp endpoint` and details about the problem line. - -For more information about the ingest path and data flow, see [Data durability](/influxdb3/version/reference/internals/durability/). - -{{% /tab-content %}} -{{% tab-content %}} - -The `/api/v2/write` InfluxDB v2 compatibility endpoint provides backwards compatibility with clients (such as [Telegraf's InfluxDB v2 output plugin](/telegraf/v1/plugins/#output-influxdb_v2) and [InfluxDB v2 API client libraries](/influxdb3/version/reference/client-libraries/v2/)) that can write data to InfluxDB OSS v2.x and Cloud 2 (TSM). - -{{}} - -{{% /tab-content %}} - -{{% tab-content %}} - -The `/write` InfluxDB v1 compatibility endpoint provides backwards compatibility for clients that can write data to InfluxDB v1.x. - -{{}} - - -{{% /tab-content %}} -{{% /tabs-wrapper %}} - -> [!Note] -> #### Compatibility APIs differ from native APIs -> -> Keep in mind that the compatibility APIs differ from the v1 and v2 APIs in previous versions in the following ways: -> -> - Tags in a table (measurement) are _immutable_ -> - A tag and a field can't have the same name within a table. - -#### Write responses - -By default, InfluxDB acknowledges writes after flushing the WAL file to the object store (occurring every second). -For high write throughput, you can send multiple concurrent write requests. - -#### Use no_sync for immediate write responses - -To reduce the latency of writes, use the `no_sync` write option, which acknowledges writes _before_ WAL persistence completes. -When `no_sync=true`, InfluxDB validates the data, writes the data to the WAL, and then immediately responds to the client, without waiting for persistence to the object store. - -Using `no_sync=true` is best when prioritizing high-throughput writes over absolute durability. - -- Default behavior (`no_sync=false`): Waits for data to be written to the object store before acknowledging the write. Reduces the risk of data loss, but increases the latency of the response. -- With `no_sync=true`: Reduces write latency, but increases the risk of data loss in case of a crash before WAL persistence. - -##### Immediate write using the HTTP API - -The `no_sync` parameter controls when writes are acknowledged--for example: - -```bash -curl "http://{{< influxdb/host >}}/api/v3/write_lp?db=sensors&precision=auto&no_sync=true" \ - --header 'Authorization: Bearer apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0==' \ - --data-raw "home,room=Sunroom temp=96" -``` - -### Create a database or table - -To create a database without writing data, use the `create` subcommand--for example: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```bash -influxdb3 create database DATABASE_NAME \ - --token AUTH_TOKEN -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to create -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: the {{% token-link "admin" %}} for your {{% product-name %}} server - -To learn more about a subcommand, use the `-h, --help` flag or view the [InfluxDB 3 CLI reference](/influxdb3/version/reference/cli/influxdb3/create): - -```bash -influxdb3 create -h -``` - -### Query data - -InfluxDB 3 supports native SQL for querying, in addition to InfluxQL, an -SQL-like language customized for time series queries. - -{{< product-name >}} limits -query time ranges to 72 hours (both recent and historical) to ensure query performance. -For more information about the 72-hour limitation, see the -[update on InfluxDB 3 Core’s 72-hour limitation](https://www.influxdata.com/blog/influxdb3-open-source-public-alpha-jan-27/). - -> [!Note] -> Flux, the language introduced in InfluxDB 2.0, is **not** supported in InfluxDB 3. - -The quickest way to get started querying is to use the `influxdb3` CLI (which uses the Flight SQL API over HTTP2). - -The `query` subcommand includes options to help ensure that the right database is queried with the correct permissions. Only the `--database` option is required, but depending on your specific setup, you may need to pass other options, such as host, port, and token. - -| Option | Description | Required | -|---------|-------------|--------------| -| `--host` | The host URL of the server [default: `http://127.0.0.1:8181`] to query | No | -| `--database` | The name of the database to operate on | Yes | -| `--token` | The authentication token for the {{% product-name %}} server | No | -| `--language` | The query language of the provided query string [default: `sql`] [possible values: `sql`, `influxql`] | No | -| `--format` | The format in which to output the query [default: `pretty`] [possible values: `pretty`, `json`, `jsonl`, `csv`, `parquet`] | No | -| `--output` | The path to output data to | No | - -#### Example: query `“SHOW TABLES”` on the `servers` database: - -```console -$ influxdb3 query --database servers "SHOW TABLES" -+---------------+--------------------+--------------+------------+ -| table_catalog | table_schema | table_name | table_type | -+---------------+--------------------+--------------+------------+ -| public | iox | cpu | BASE TABLE | -| public | information_schema | tables | VIEW | -| public | information_schema | views | VIEW | -| public | information_schema | columns | VIEW | -| public | information_schema | df_settings | VIEW | -| public | information_schema | schemata | VIEW | -+---------------+--------------------+--------------+------------+ -``` - -#### Example: query the `cpu` table, limiting to 10 rows: - -```console -$ influxdb3 query --database servers "SELECT DISTINCT usage_percent, time FROM cpu LIMIT 10" -+---------------+---------------------+ -| usage_percent | time | -+---------------+---------------------+ -| 63.4 | 2024-02-21T19:25:00 | -| 25.3 | 2024-02-21T19:06:40 | -| 26.5 | 2024-02-21T19:31:40 | -| 70.1 | 2024-02-21T19:03:20 | -| 83.7 | 2024-02-21T19:30:00 | -| 55.2 | 2024-02-21T19:00:00 | -| 80.5 | 2024-02-21T19:05:00 | -| 60.2 | 2024-02-21T19:33:20 | -| 20.5 | 2024-02-21T18:58:20 | -| 85.2 | 2024-02-21T19:28:20 | -+---------------+---------------------+ -``` - -### Query using the CLI for InfluxQL - -[InfluxQL](/influxdb3/version/reference/influxql/) is an SQL-like language developed by InfluxData with specific features tailored for leveraging and working with InfluxDB. It’s compatible with all versions of InfluxDB, making it a good choice for interoperability across different InfluxDB installations. - -To query using InfluxQL, enter the `influxdb3 query` subcommand and specify `influxql` in the language option--for example: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```bash -influxdb3 query \ - --database DATABASE_NAME \ - --token \ - --language influxql \ - "SELECT DISTINCT usage_percent FROM cpu WHERE time >= now() - 1d" -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to query -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to query the specified database{{% /show-in %}} - -### Query using the API - -InfluxDB 3 supports Flight (gRPC) APIs and an HTTP API. -To query your database using the HTTP API, send a request to the `/api/v3/query_sql` or `/api/v3/query_influxql` endpoints. -In the request, specify the database name in the `db` parameter -and a query in the `q` parameter. -You can pass parameters in the query string or inside a JSON object. - -Use the `format` parameter to specify the response format: `pretty`, `jsonl`, `parquet`, `csv`, and `json`. Default is `json`. - -##### Example: Query passing URL-encoded parameters - -The following example sends an HTTP `GET` request with a URL-encoded SQL query: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```bash -curl -G "http://{{< influxdb/host >}}/api/v3/query_sql" \ - --header 'Authorization: Bearer AUTH_TOKEN' \ - --data-urlencode "db=DATABASE_NAME" \ - --data-urlencode "q=select * from cpu limit 5" -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to query -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to query the specified database{{% /show-in %}} - -##### Example: Query passing JSON parameters - -The following example sends an HTTP `POST` request with parameters in a JSON payload: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```bash -curl http://{{< influxdb/host >}}/api/v3/query_sql \ - --data '{"db": "DATABASE_NAME", "q": "select * from cpu limit 5"}' -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to query -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to query the specified database{{% /show-in %}} - -### Query using the Python client - -Use the InfluxDB 3 Python library to interact with the database and integrate with your application. -We recommend installing the required packages in a Python virtual environment for your specific project. - -To get started, install the `influxdb3-python` package. - -```bash -pip install influxdb3-python -``` - -From here, you can connect to your database with the client library using just the **host** and **database name: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN" %}} -```python -from influxdb_client_3 import InfluxDBClient3 - -client = InfluxDBClient3( - token='AUTH_TOKEN', - host='http://{{< influxdb/host >}}', - database='DATABASE_NAME' -) -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to query -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "database" %}}{{% show-in "enterprise" %}} with permission to query the specified database{{% /show-in %}} - -The following example shows how to query using SQL, and then -use PyArrow to explore the schema and process results. -To authorize the query, the example retrieves the {{% token-link "database" %}} -from the `INFLUXDB3_AUTH_TOKEN` environment variable. - -```python -from influxdb_client_3 import InfluxDBClient3 -import os - -client = InfluxDBClient3( - token=os.environ.get('INFLUXDB3_AUTH_TOKEN'), - host='http://{{< influxdb/host >}}', - database='servers' -) - -# Execute the query and return an Arrow table -table = client.query( - query="SELECT * FROM cpu LIMIT 10", - language="sql" -) - -print("\n#### View Schema information\n") -print(table.schema) - -print("\n#### Use PyArrow to read the specified columns\n") -print(table.column('usage_active')) -print(table.select(['host', 'usage_active'])) -print(table.select(['time', 'host', 'usage_active'])) - -print("\n#### Use PyArrow compute functions to aggregate data\n") -print(table.group_by('host').aggregate([])) -print(table.group_by('cpu').aggregate([('time_system', 'mean')])) -``` - -For more information about the Python client library, see the [`influxdb3-python` repository](https://github.com/InfluxCommunity/influxdb3-python) in GitHub. - - -### Query using InfluxDB 3 Explorer (Beta) - -You can use the InfluxDB 3 Explorer query interface by downloading the Docker image. - -```bash -docker pull quay.io/influxdb/influxdb3-explorer:latest -``` - -Run the interface using: - -```bash -docker run --name influxdb3-explorer -p 8086:8888 quay.io/influxdb/influxdb3-explorer:latest -``` - -With the default settings above, you can access the UI at http://localhost:8086. -Set your expected database connection details on the Settings page. -From there, you can query data, browser your database schema, and do basic -visualization of your time series data. - -### Last values cache - -{{% product-name %}} supports a **last-n values cache** which stores the last N values in a series or column hierarchy in memory. This gives the database the ability to answer these kinds of queries in under 10 milliseconds. -You can use the `influxdb3` CLI to [create a last value cache](/influxdb3/version/reference/cli/influxdb3/create/last_cache/). - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN|TABLE_NAME|CACHE_NAME" %}} -```bash -influxdb3 create last_cache \ - --token AUTH_TOKEN - --database DATABASE_NAME \ - --table TABLE_NAME \ - CACHE_NAME -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to create the last values cache in -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "admin" %}} -- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: the name of the table to create the last values cache in -- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Optionally, a name for the new cache - -Consider the following `cpu` sample table: - -| host | application | time | usage\_percent | status | -| ----- | ----- | ----- | ----- | ----- | -| Bravo | database | 2024-12-11T10:00:00 | 55.2 | OK | -| Charlie | cache | 2024-12-11T10:00:00 | 65.4 | OK | -| Bravo | database | 2024-12-11T10:01:00 | 70.1 | Warn | -| Bravo | database | 2024-12-11T10:01:00 | 80.5 | OK | -| Alpha | webserver | 2024-12-11T10:02:00 | 25.3 | Warn | - -The following command creates a last value cache named `cpuCache`: - -```bash -influxdb3 create last_cache \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database servers \ - --table cpu \ - --key-columns host,application \ - --value-columns usage_percent,status \ - --count 5 cpuCache -``` - -_You can create a last values cache per time series, but be mindful of high cardinality tables that could take excessive memory._ - -#### Query a last values cache - -To query data from the LVC, use the [`last_cache()`](/influxdb3/version/reference/sql/functions/cache/#last_cache) function in your query--for example: - -```bash -influxdb3 query \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database servers \ - "SELECT * FROM last_cache('cpu', 'cpuCache') WHERE host = 'Bravo';" -``` - -> [!Note] -> #### Only works with SQL -> -> The last values cache only works with SQL, not InfluxQL; SQL is the default language. - -#### Delete a last values cache - -Use the `influxdb3` CLI to [delete a last values cache](/influxdb3/version/reference/cli/influxdb3/delete/last_cache/) - -{{% code-placeholders "DATABASE_NAME|TABLE_NAME|CACHE_NAME" %}} -```bash -influxdb3 delete last_cache \ - --token AUTH_TOKEN \ - --database DATABASE_NAME \ - --table TABLE \ - --cache-name CACHE_NAME -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "admin" %}} -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to delete the last values cache from -- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: the name of the table to delete the last values cache from -- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: the name of the last values cache to delete - -### Distinct values cache - -Similar to the [last values cache](#last-values-cache), the database can cache in RAM the distinct values for a single column in a table or a hierarchy of columns. -This is useful for fast metadata lookups, which can return in under 30 milliseconds. -Many of the options are similar to the last value cache. - -You can use the `influxdb3` CLI to [create a distinct values cache](/influxdb3/version/reference/cli/influxdb3/create/distinct_cache/). - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN|TABLE_NAME|CACHE_NAME" %}} -```bash -influxdb3 create distinct_cache \ - --token AUTH_TOKEN \ - --database DATABASE_NAME \ - --table TABLE \ - --columns COLUMNS \ - CACHE_NAME -``` -{{% /code-placeholders %}} -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to create the last values cache in -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "admin" %}} -- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: the name of the table to create the distinct values cache in -- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: Optionally, a name for the new cache - -Consider the following `cpu` sample table: - -| host | application | time | usage\_percent | status | -| ----- | ----- | ----- | ----- | ----- | -| Bravo | database | 2024-12-11T10:00:00 | 55.2 | OK | -| Charlie | cache | 2024-12-11T10:00:00 | 65.4 | OK | -| Bravo | database | 2024-12-11T10:01:00 | 70.1 | Warn | -| Bravo | database | 2024-12-11T10:01:00 | 80.5 | OK | -| Alpha | webserver | 2024-12-11T10:02:00 | 25.3 | Warn | - -The following command creates a distinct values cache named `cpuDistinctCache`: - -```bash -influxdb3 create distinct_cache \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database servers \ - --table cpu \ - --columns host,application \ - cpuDistinctCache -``` - -#### Query a distinct values cache - -To query data from the distinct values cache, use the [`distinct_cache()`](/influxdb3/version/reference/sql/functions/cache/#distinct_cache) function in your query--for example: - -```bash -influxdb3 query \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database servers \ - "SELECT * FROM distinct_cache('cpu', 'cpuDistinctCache')" -``` - -> [!Note] -> #### Only works with SQL -> -> The distinct cache only works with SQL, not InfluxQL; SQL is the default language. - -#### Delete a distinct values cache - -Use the `influxdb3` CLI to [delete a distinct values cache](/influxdb3/version/reference/cli/influxdb3/delete/distinct_cache/) - -{{% code-placeholders "DATABASE_NAME|TABLE_NAME|CACHE_NAME" %}} -```bash -influxdb3 delete distinct_cache \ - --token AUTH_TOKEN \ - --database DATABASE_NAME \ - --table TABLE \ - --cache-name CACHE_NAME -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "admin" %}} -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to delete the distinct values cache from -- {{% code-placeholder-key %}}`TABLE_NAME`{{% /code-placeholder-key %}}: the name of the table to delete the distinct values cache from -- {{% code-placeholder-key %}}`CACHE_NAME`{{% /code-placeholder-key %}}: the name of the distinct values cache to delete - -### Python plugins and the processing engine - -The InfluxDB 3 processing engine is an embedded Python VM for running code inside the database to process and transform data. - -To activate the processing engine, pass the `--plugin-dir ` option when starting the {{% product-name %}} server. -`PLUGIN_DIR` is your filesystem location for storing [plugin](#plugin) files for the processing engine to run. - -#### Plugin - -A plugin is a Python function that has a signature compatible with a Processing engine [trigger](#trigger). - -#### Trigger - -When you create a trigger, you specify a [plugin](#plugin), a database, optional arguments, -and a _trigger-spec_, which defines when the plugin is executed and what data it receives. - -##### Trigger types - -InfluxDB 3 provides the following types of triggers, each with specific trigger-specs: - -- **On WAL flush**: Sends a batch of written data (for a specific table or all tables) to a plugin (by default, every second). -- **On Schedule**: Executes a plugin on a user-configured schedule (using a crontab or a duration); useful for data collection and deadman monitoring. -- **On Request**: Binds a plugin to a custom HTTP API endpoint at `/api/v3/engine/`. - The plugin receives the HTTP request headers and content, and can then parse, process, and send the data into the database or to third-party services. - -### Test, create, and trigger plugin code - -##### Example: Python plugin for WAL rows - -```python -# This is the basic structure for Python plugin code that runs in the -# InfluxDB 3 Processing engine. - -# When creating a trigger, you can provide runtime arguments to your plugin, -# allowing you to write generic code that uses variables such as monitoring -thresholds, environment variables, and host names. -# -# Use the following exact signature to define a function for the WAL flush -# trigger. -# When you create a trigger for a WAL flush plugin, you specify the database -# and tables that the plugin receives written data from on every WAL flush -# (default is once per second). -def process_writes(influxdb3_local, table_batches, args=None): - # here you can see logging. for now this won't do anything, but soon - # we'll capture this so you can query it from system tables - if args and "arg1" in args: - influxdb3_local.info("arg1: " + args["arg1"]) - - # here we're using arguments provided at the time the trigger was set up - # to feed into paramters that we'll put into a query - query_params = {"host": "foo"} - # here's an example of executing a parameterized query. Only SQL is supported. - # It will query the database that the trigger is attached to by default. We'll - # soon have support for querying other DBs. - query_result = influxdb3_local.query("SELECT * FROM cpu where host = '$host'", query_params) - # the result is a list of Dict that have the column name as key and value as - # value. If you run the WAL test plugin with your plugin against a DB that - # you've written data into, you'll be able to see some results - influxdb3_local.info("query result: " + str(query_result)) - - # this is the data that is sent when the WAL is flushed of writes the server - # received for the DB or table of interest. One batch for each table (will - # only be one if triggered on a single table) - for table_batch in table_batches: - # here you can see that the table_name is available. - influxdb3_local.info("table: " + table_batch["table_name"]) - - # example to skip the table we're later writing data into - if table_batch["table_name"] == "some_table": - continue - - # and then the individual rows, which are Dict with keys of the column names and values - for row in table_batch["rows"]: - influxdb3_local.info("row: " + str(row)) - - # this shows building a line of LP to write back to the database. tags must go first and - # their order is important and must always be the same for each individual table. Then - # fields and lastly an optional time, which you can see in the next example below - line = LineBuilder("some_table")\ - .tag("tag1", "tag1_value")\ - .tag("tag2", "tag2_value")\ - .int64_field("field1", 1)\ - .float64_field("field2", 2.0)\ - .string_field("field3", "number three") - - # this writes it back (it actually just buffers it until the completion of this function - # at which point it will write everything back that you put in) - influxdb3_local.write(line) - - # here's another example, but with us setting a nanosecond timestamp at the end - other_line = LineBuilder("other_table") - other_line.int64_field("other_field", 1) - other_line.float64_field("other_field2", 3.14) - other_line.time_ns(1302) - - # and you can see that we can write to any DB in the server - influxdb3_local.write_to_db("mytestdb", other_line) - - # just some log output as an example - influxdb3_local.info("done") -``` - -##### Test a plugin on the server - -Test your InfluxDB 3 plugin safely without affecting written data. During a plugin test: - -- A query executed by the plugin queries against the server you send the request to. -- Writes aren't sent to the server but are returned to you. - -To test a plugin, do the following: - -1. Create a _plugin directory_--for example, `/path/to/.influxdb/plugins` -2. [Start the InfluxDB server](#start-influxdb) and include the `--plugin-dir ` option. -3. Save the [example plugin code](#example-python-plugin-for-wal-rows) to a plugin file inside of the plugin directory. If you haven't yet written data to the table in the example, comment out the lines where it queries. -4. To run the test, enter the following command with the following options: - - - `--lp` or `--file`: The line protocol to test - - Optional: `--input-arguments`: A comma-delimited list of `=` arguments for your plugin code - -{{% code-placeholders "INPUT_LINE_PROTOCOL|INPUT_ARGS|DATABASE_NAME|AUTH_TOKEN|PLUGIN_FILENAME" %}} -```bash -influxdb3 test wal_plugin \ ---lp INPUT_LINE_PROTOCOL \ ---input-arguments INPUT_ARGS \ ---database DATABASE_NAME \ ---token AUTH_TOKEN \ -PLUGIN_FILENAME -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`INPUT_LINE_PROTOCOL`{{% /code-placeholder-key %}}: the line protocol to test -- Optional: {{% code-placeholder-key %}}`INPUT_ARGS`{{% /code-placeholder-key %}}: a comma-delimited list of `=` arguments for your plugin code--for example, `arg1=hello,arg2=world` -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to test against -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: the {{% token-link "admin" %}} for your {{% product-name %}} server -- {{% code-placeholder-key %}}`PLUGIN_FILENAME`{{% /code-placeholder-key %}}: the name of the plugin file to test - -The command runs the plugin code with the test data, yields the data to the plugin code, and then responds with the plugin result. -You can quickly see how the plugin behaves, what data it would have written to the database, and any errors. -You can then edit your Python code in the plugins directory, and rerun the test. -The server reloads the file for every request to the `test` API. - -For more information, see [`influxdb3 test wal_plugin`](/influxdb3/version/reference/cli/influxdb3/test/wal_plugin/) or run `influxdb3 test wal_plugin -h`. - -With the plugin code inside the server plugin directory, and a successful test, -you're ready to create a plugin and a trigger to run on the server. - -##### Example: Test, create, and run a plugin - -The following example shows how to test a plugin, and then create the plugin and -trigger: - -```bash -# Test and create a plugin -# Requires: -# - A database named `mydb` with a table named `foo` -# - A Python plugin file named `test.py` -# Test a plugin -influxdb3 test wal_plugin \ - --lp "my_measure,tag1=asdf f1=1.0 123" \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database sensors \ - --input-arguments "arg1=hello,arg2=world" \ - test.py -``` - -```bash -# Create a trigger that runs the plugin -influxdb3 create trigger \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database sensors \ - --plugin test_plugin \ - --trigger-spec "table:foo" \ - --trigger-arguments "arg1=hello,arg2=world" \ - trigger1 -``` - -After you have created a plugin and trigger, enter the following command to -enable the trigger and have it run the plugin as you write data: - -{{% code-placeholders "DATABASE_NAME|AUTH_TOKEN|TRIGGER_NAME" %}} -```bash -influxdb3 enable trigger \ - --token AUTH_TOKEN \ - --database DATABASE_NAME \ - TRIGGER_NAME -``` -{{% /code-placeholders %}} - -Replace the following placeholders with your values: - -- {{% code-placeholder-key %}}`DATABASE_NAME`{{% /code-placeholder-key %}}: the name of the database to enable the trigger in -- {{% code-placeholder-key %}}`AUTH_TOKEN`{{% /code-placeholder-key %}}: your {{% token-link "admin" %}} -- {{% code-placeholder-key %}}`TRIGGER_NAME`{{% /code-placeholder-key %}}: the name of the trigger to enable - -For example, to enable the trigger named `trigger1` in the `sensors` database: - -```bash -influxdb3 enable trigger \ - --token apiv3_0xxx0o0XxXxx00Xxxx000xXXxoo0== \ - --database sensors - trigger1 -``` - -For more information, see [Python plugins and the Processing engine](/influxdb3/version/plugins/). diff --git a/content/telegraf/v1/release-notes.md b/content/telegraf/v1/release-notes.md index 44925f7e0..a5cd55648 100644 --- a/content/telegraf/v1/release-notes.md +++ b/content/telegraf/v1/release-notes.md @@ -11,7 +11,7 @@ menu: weight: 60 --- -## v1.34.1 [2025-03-24] +## v1.34.1 {date="2025-03-24"} ### Bugfixes @@ -40,7 +40,7 @@ menu: - [#16653](https://github.com/influxdata/telegraf/pull/16653) `deps` Bump k8s.io/api from 0.32.1 to 0.32.3 - [#16659](https://github.com/influxdata/telegraf/pull/16659) `deps` Bump tj-actions/changed-files from v45 to v46.0.1 -## v1.34.0 [2025-03-10] +## v1.34.0 {date="2025-03-10"} ### New Plugins @@ -94,7 +94,7 @@ menu: - [#16575](https://github.com/influxdata/telegraf/pull/16575) `deps` Bump github.com/tidwall/wal from 1.1.7 to 1.1.8 - [#16578](https://github.com/influxdata/telegraf/pull/16578) `deps` Bump super-linter/super-linter from 7.2.1 to 7.3.0 -## v1.33.3 [2025-02-25] +## v1.33.3 {date="2025-02-25"} ### Important Changes @@ -128,7 +128,7 @@ menu: - [#16504](https://github.com/influxdata/telegraf/pull/16504) `deps` Bump golang.org/x/net from 0.34.0 to 0.35.0 - [#16512](https://github.com/influxdata/telegraf/pull/16512) `deps` Bump golangci-lint from v1.63.4 to v1.64.5 -## v1.33.2 [2025-02-10] +## v1.33.2 {date="2025-02-10"} ### Important Changes @@ -177,7 +177,7 @@ menu: - [#16482](https://github.com/influxdata/telegraf/pull/16482) `deps` Update Apache arrow from 0.0-20240716144821-cf5d7c7ec3cf to 18.1.0 - [#16423](https://github.com/influxdata/telegraf/pull/16423) `deps` Update ClickHouse SQL driver from 1.5.4 to to 2.30.1 -## v1.33.1 [2025-01-10] +## v1.33.1 {date="2025-01-10"} ### Important Changes diff --git a/data/products.yml b/data/products.yml index 1a73b3902..a0d613cb8 100644 --- a/data/products.yml +++ b/data/products.yml @@ -27,6 +27,20 @@ influxdb3_enterprise: - How do I install and run InfluxDB 3 Enterprise? - Help me write a plugin for the Python Processing engine? - How do I start a read replica node with InfluxDB 3 Enterprise? + +influxdb3_explorer: + name: InfluxDB 3 Explorer + altname: Explorer + namespace: influxdb3_explorer + menu_category: tools + list_order: 1 + latest: explorer + latest_patch: 1.0.0 + placeholder_host: localhost:8888 + ai_sample_questions: + - How do I query data using InfluxDB 3 Explorer? + - How do I use InfluxDB 3 Explorer to visualize data? + - How do I install InfluxDB 3 Explorer? influxdb3_cloud_serverless: name: InfluxDB Cloud Serverless @@ -50,7 +64,7 @@ influxdb3_cloud_dedicated: list_order: 3 latest: cloud-dedicated link: "https://www.influxdata.com/contact-sales-cloud-dedicated/" - latest_cli: 2.10.0 + latest_cli: 2.10.1 placeholder_host: cluster-id.a.influxdb.io ai_sample_questions: - How do I migrate from InfluxDB v1 to InfluxDB Cloud Dedicated? @@ -108,6 +122,20 @@ influxdb_cloud: - How is Cloud 2 different from Cloud Serverless? - How do I manage auth tokens in InfluxDB Cloud 2? +explorer: + name: InfluxDB 3 Explorer + namespace: explorer + menu_category: other + list_order: 4 + versions: [v1] + latest: v1.0 + latest_patches: + v1: 1.0.0 + ai_sample_questions: + - How do I use InfluxDB 3 Explorer to visualize data? + - How do I create a dashboard in InfluxDB 3 Explorer? + - How do I query data using InfluxDB 3 Explorer? + telegraf: name: Telegraf namespace: telegraf @@ -144,7 +172,7 @@ kapacitor: versions: [v1] latest: v1.7 latest_patches: - v1: 1.7.6 + v1: 1.7.7 ai_sample_questions: - How do I configure Kapacitor for InfluxDB v1? - How do I write a custom Kapacitor task? diff --git a/layouts/index.html b/layouts/index.html index 2e7c9f016..b04b66e5c 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -39,64 +39,87 @@

InfluxDB 3

The modern time series data engine built for high-speed, high-cardinality data, from the edge to the cloud.

-
-

Self-managed

-
-
-
-
-

InfluxDB 3 Core

-

The open source recent data engine optimized for time series and event data.

+
+
+
+

Self-managed

+
+
+
+
+

InfluxDB 3 Core

+

The open source recent data engine optimized for time series and event data.

+
+ +
+
+
+

InfluxDB 3 Enterprise

+

The scalable data engine built for recent and historical time series and event data.

+
+ +
+
+
+

InfluxDB Clustered

+

The Kubernetes-enabled, highly-available InfluxDB 3 cluster built for high write and query workloads on your own infrastructure.

+
+ +
-
-
-
-

InfluxDB 3 Enterprise

-

The scalable data engine built for recent and historical time series and event data.

+
+
+

Fully-Managed

+
+
+
+
+

InfluxDB Cloud Serverless

+

The fully-managed, multi-tenant InfluxDB 3 service deployed in the cloud.

+
+ +
+
+
+

InfluxDB Cloud Dedicated

+

The fully-managed InfluxDB 3 cluster dedicated to your workload and deployed in the cloud.

+
+ +
-
-
-
-

InfluxDB Clustered

-

The Kubernetes-enabled, highly-available InfluxDB 3 cluster built for high write and query workloads on your own infrastructure.

+ -
-
-

Fully-Managed

-
-
-
-
-

InfluxDB Cloud Serverless

-

The fully-managed, multi-tenant InfluxDB 3 service deployed in the cloud.

+
+
+
+

InfluxDB 3 Explorer

+

A standalone UI designed for visualizing, querying, and managing data in InfluxDB 3 Core and Enterprise.

+
+ +
- -
-
-
-

InfluxDB Cloud Dedicated

-

The fully-managed InfluxDB 3 cluster dedicated to your workload and deployed in the cloud.

-
-
diff --git a/layouts/partials/article.html b/layouts/partials/article.html index 986e59f30..bbe22ed84 100644 --- a/layouts/partials/article.html +++ b/layouts/partials/article.html @@ -5,6 +5,7 @@ {{ partial "article/supported-versions.html" . }} {{ partial "article/page-meta.html" . }}
+ {{ partial "article/beta.html" . }} {{ partial "article/stable-version.html" . }} {{ partial "article/flux-experimental.html" . }} {{ partial "article/flux-contrib.html" . }} diff --git a/layouts/partials/article/beta.html b/layouts/partials/article/beta.html new file mode 100644 index 000000000..d2288dd53 --- /dev/null +++ b/layouts/partials/article/beta.html @@ -0,0 +1,39 @@ + +{{ $productPathData := split .RelPermalink "/" }} +{{ $product := index $productPathData 1 }} +{{ $version := index $productPathData 2 }} +{{ $productKey := cond (eq $product "influxdb3") (print "influxdb3_" (replaceRE "-" "_" $version)) $product }} +{{ $productData := index $.Site.Data.products $productKey }} +{{ $displayName := $productData.name }} +{{ $earlyAccessList := slice "influxdb3/explorer" }} + +{{ if in $earlyAccessList (print $product "/" $version )}} +
+
+

{{ $displayName }} is in Public Beta

+

+ {{ $displayName }} is in public beta and available for testing and feedback, + but is not meant for production use yet. + Both the product and this documentation are works in progress. + We welcome and encourage your input about your experience with the beta and + invite you to join our public channels for updates and to + share feedback. +

+ +
+
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/article/feedback.html b/layouts/partials/article/feedback.html index a1497a1f3..c1609c205 100644 --- a/layouts/partials/article/feedback.html +++ b/layouts/partials/article/feedback.html @@ -8,9 +8,7 @@ {{ if .File }} {{ .Scratch.Set "pageGithubLink" (print "https://github.com/influxdata/docs-v2/edit/master/content/" .File.Path) }} - {{ if .Page.HasShortcode "duplicate-oss" }} - {{ .Scratch.Set "pageGithubLink" (replaceRE "/cloud/" "/v2/" (.Scratch.Get "pageGithubLink")) }} - {{ else if .Params.Source }} + {{ if .Params.Source }} {{ .Scratch.Set "pageGithubLink" (print "https://github.com/influxdata/docs-v2/edit/master/content" .Params.source) }} {{ end }} {{ else }} @@ -53,7 +51,7 @@ To find support, use the following resources:

    - {{ if and (eq $product "influxdb3") (or (eq $version "core") (eq $version "enterprise")) }} + {{ if and (eq $product "influxdb3") (or (eq $version "core") (eq $version "enterprise") (eq $version "explorer")) }}
  • InfluxDB Discord Server (Preferred)
  • InfluxDB Community Slack
  • {{ else }} diff --git a/layouts/partials/footer/search.html b/layouts/partials/footer/search.html index 6df87ec39..c0405957f 100644 --- a/layouts/partials/footer/search.html +++ b/layouts/partials/footer/search.html @@ -5,7 +5,7 @@ {{ $fluxSupported := slice "influxdb" "enterprise_influxdb" }} {{ $influxdbFluxSupport := slice "v1" "v2" "cloud" }} {{ $includeFlux := and (in $fluxSupported $product) (in $influxdbFluxSupport $version) }} -{{ $includeResources := not (in (slice "cloud-serverless" "cloud-dedicated" "clustered" "core" "enterprise") $version) }} +{{ $includeResources := not (in (slice "cloud-serverless" "cloud-dedicated" "clustered" "core" "enterprise" "explorer") $version) }}