Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/develop/integrate-data/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@ Low-frequency data from REST APIs can be polled from Quix using a library such a
Quix also provides the [Streaming Writer API](../../apis/streaming-writer-api/overview.md) and the [Streaming Reader API](../../apis/streaming-reader-api/overview.md).

When using the Streaming Writer API you can use the HTTP interface if a continous connection is not required. Faster data from web servers, browser clients, and IoT devices can interface using the SignalR interface, which can use WebSockets or Long Polling (depending on client support), where a continuous connection is required.

## See also

There is also a [section](../../integrations/overview.md) in this documentation providing more information on specific integrations you can use for connecting Quix with products such as InfluxDB.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/integrations/influxdb-pipeline.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/integrations/influxdb/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Overview

[InfluxDB](https://www.influxdata.com/products/influxdb-overview/){target=_blank} is an open-source time series database. It is used for storage and retrieval of time series and event data in fields such as operations monitoring, application metrics, Internet of Things (IoT) sensor data, and real-time analytics.

Quix currently supports the following connectors for InfluxDB:

| Influx version | Connector type | Description |
|----|----|----|
| [InfluxDB 2.0](https://github.com/quixio/quix-samples/tree/main/python/sources/InfluxDB-2.0){target=_blank} | Source | Enables you to publish data from InfluxDB v2 into a Quix topic. |
| [InfluxDB 3.0](https://github.com/quixio/quix-samples/tree/main/python/sources/InfluxDB){target=_blank} | Source | Enables you to publish data from an InfluxDB v3 bucket into a Quix topic. |
| [InfluxDB 3.0](https://github.com/quixio/quix-samples/tree/main/python/destinations/InfluxDB){target=_blank} | Destination | Enables you to publish data from a Quix topic into an InfluxDB v3 bucket. |

Note if you want to move data from InfluxDB v2 to v3 you could use the v2 source and v3 destination to do this.

<div>
<a class="md-button md-button--primary" href="../influxdb/quickstart.html" style="margin-right:.5rem;">Try the Quickstart</a>
<br/>
</div>
137 changes: 137 additions & 0 deletions docs/integrations/influxdb/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
# Quickstart

This quickstart shows you how to integrate Quix with InfluxDB using our standard [connectors](../../connectors/index.md).

In the first part of this quickstart, you'll publish data generated by a sample source from a Quix topic to InfluxDB, and in the second part you'll publish data from InfluxDB into a Quix topic, and then explore that data in real time.

## Prerequisites

To complete this quickstart you will need:

* A free [Quix account](https://portal.platform.quix.ai/self-sign-up){target="_blank"}.
* An [InfluxDB account](https://www.influxdata.com/products/influxdb-cloud/serverless/){target=_blank}.

You also need to [create a project](../../create/create-project.md) with an environment.

## Create your InfluxDB bucket

Log into your InfluxDB account and create a new bucket called `f1-data`.

## Obtain your InfluxDB token

In the InfluxDB token manager, generate an API token for this project. All "all access" token can be created. Also provide a useful description such as "Quix Quickstart F1 Data". Save the token securely for later use.

## Create your sample source in Quix

You now need to create a sample data source in Quix, so you have some data to store in InfluxDB. Assuming you have [created your project](../../create/create-project.md) and environment, you can add a sample data source as folllows:

1. In the pipeline view of your environment, click `+ Sample data source`.

2. Click `Deploy` and `Deploy` again to add the sample data source into your pipeline.

Alternatively, click `Add new` (top right corner in pipeline view), select `Source`, and then select `Demo Data`. You can then deploy this sample.

By default, the output topic from this sample is `f1-data`.

## Add your InfluxDB destination

You can now add an InfluxDB **destination** to enable you to publish data from a Quix topic to InfluxDB.

1. Switch to the pipeline view and click `+ Add new` and select `Destination`.

2. In the search box type "Influx" and click `Preview code` on the InfluxDB 3.0 connector. Take a note of the environment variables you'll need to set and then click the `Edit code` button.

3. Leave the default Application name and Path and click `Save` to save to your repository.

4. You now need to configure the required environment variables. The input topic is already set for you (`f1-data`):

![InfluxDB environment variables](../../images/integrations/influxdb-environment-variables.png)

!!! tip

This table shows some example values:

| Variable | Description |
|----|----|
| `input` | This should be set to `f1-data`, if not already set. |
| `INFLUXDB_HOST` | Your Influx host. Example: `https://us-east-1-1.aws.cloud2.influxdata.com/` |
| `INFLUXDB_TOKEN` | Your all-access token generated in Influx. Example: `z7E<snip>Og==` |
| `INFLUXDB_ORG` | In your Influx account you can see your available organizations. Example: `Docs` |
| `INFLUXDB_DATABASE` | The InfluxDB bucket, in this case `f1-data` |
| `INFLUXDB_TAG_COLUMNS` | Leave as default, `['tag1', 'tag2']`. |
| `INFLUXDB_MEASUREMENT_NAME` | The "table" name, in this case `f1-data`. |

5. Click the `Run` button to test connection with the database. If no errors occur, proceed to the next step, or otherwise check you have configured your environment variables correctly.

6. Click `Deploy` and leave the settings at their defaults to build and deploy your InfluxDB connector. The database will then start receiving data once the build completes.

## Check your data in InfluxDB

You will now check that your InfluxDB database is receiving data.

1. In InfluxDB switch to the Explorer and in the schema browser select the `f1-data` bucket.

2. Under `Measurement` select `f1-data` and click `Run`. You can see the stored data:

![stored data](../../images/integrations/influxdb-f1-data-results.png)

You have successfully published data from Quix to InfluxDB.

!!! note

In the second part of this quickstart you learn how to publish data from InfluxDB to Quix.

## Add an InfluxDB source

You now add an InfluxDB **source** to enable you to publish data from InfluxDB to a Quix topic.

1. In the pipeline view, in the top right click the `Add new` button and then select `Source`.

2. Type "Influx" into the search bar and click `Preview code` for the InfluxDB 3.0 connector.

3. Click `Edit code` accepting the defaults for Application name and path.

4. You now need to configure environment variables, in the same way as you did in the previous section.

!!! important

For the default output topic, `influxdb`, you need to make sure that topic is created. You can do this once you click edit variable. Accept the defaults in the `New topic` dialog. Also, the database is the bucket you created previously, `f1-data`. The measurement is also `f1-data`. For convenience, you can set the `task_interval` to `1s` - this enables data to come through more quickly, as data changed in the last one second is published to the output topic.

5. Click the `Run` button to test connection with the database. If no errors occur proceed to the next step, or otherwise check you have configured your environment variables correctly.

6. Click `Deploy` and leave the settings at their defaults to build and deploy your InfluxDB connector. The connector will then publish data from InfluxDB to the Quix output topic once the build completes.

7. Switch back to the pipeline view:

![Pipeline view](../../images/integrations/influxdb-pipeline.png)

!!! tip

The green arrows in the pipeline view indicate data is being received. If no data is being received, the arrows are gray.

## Explore the data from InfluxDB in real time

You can now explore data published from InfluxDB to the Quix topic `influxdb` by the connector.

1. In the main left-hand menu, click on `Data explorer`.

2. Click `Live data`, then select the topic, which is the output topic for the connector, `influxdb`.

3. Select the `influxdb-query` stream.

4. Select the parameters of interest, for example, `Brake`, `EngineRPM`, and `Gear`.

5. Select the Waveform view. The selected data is displayed in real time:

![real-time waveform display](../../images/integrations/influxdb-data-explorer.png)

Data is being read from InfluxDB by the Quix connector, and then published to the Quix topic, `influxdb`. The Quix data explorer is then used to display this data in real time.

## Summary

In this quickstart you have learned how to get data into InfluxDB from Quix, and also how to get data out of InfluxDB, using the Quix InfluxDB v3 connectors, without needing to write any code. You've also learned how to view data in a Quix topic in real time, using the Quix data explorer.

## Next steps

* [See other methods for integrating your data](../../develop/integrate-data/overview.md)
* [Try a tutorial](../../tutorials/overview.md)
8 changes: 8 additions & 0 deletions docs/integrations/overview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Overview

This section of the documentation provides more detailed information on integrating with partner products.

| Product| Type | Documentation |
|----|----|----|
| InfluxDB | Time series database | [Overview](./influxdb/overview.md), [Quickstart](./influxdb/quickstart.md) |

5 changes: 5 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,11 @@ nav:
- 'Overview': 'apis/portal-api/overview.md'
- 'Setup': 'apis/portal-api/setup.md'
- 'HTTP requests': 'apis/portal-api/http-requests.md'
- 'Integrations':
- 'Overview': 'integrations/overview.md'
- 'InfluxDB':
- 'Overview': integrations/influxdb/overview.md
- 'Quickstart': integrations/influxdb/quickstart.md
- 'Tutorials':
- 'Overview': 'tutorials/overview.md'
- 'Predictive maintenance':
Expand Down