InfluxDB Clustered is currently only available to a limited group of InfluxData customers. If interested in being part of the limited access group, please contact the InfluxData Sales team.
Tools to execute queries
InfluxDB v2 client libraries use the InfluxDB API
This endpoint can’t query an InfluxDB Clustered database.
InfluxDB Clustered supports many different tools for querying data, including:
Ensure that InfluxDB is running and you can connect to it. For information about what URL to use to connect to your InfluxDB cluster, contact your InfluxData account representative.
In your terminal, create a directory for your Node.js project and change to it.
mkdir influx-node-app && cd $_
Enter the following command to generate an npm package for your project. The
npmpackage manager is included with Node.js.
npm init -y
Many of the client library examples use TypeScript. Follow these steps to initialize the TypeScript project:
Install TypeScript and type definitions for Node.js.
npm i -g typescript && npm i --save-dev @types/node
Create a TypeScript configuration with default values.
Run the TypeScript compiler. To recompile your code automatically as you make changes, pass the
watchflag to the compiler.
tsc -w -p
Open a new terminal window and install the
@influxdata/influxdb-client package for querying and writing data:
npm i --save @influxdata/influxdb-client
@influxdata/influxdb-client-apis client library package won’t work with InfluxDB Clustered.
It only works with InfluxDB v2 management APIs.
The client examples include an
env module for accessing your InfluxDB properties from environment variables or from
The examples use these properties to interact with the InfluxDB API.
export INFLUX_URL=https://cluster-host.com export INFLUX_TOKEN=DATABASE_TOKEN export INFLUX_ORG=ORG_ID export INFLUX_DATABASE=DATABASE_NAME
Replace the following:
DATABASE_TOKEN: InfluxDB database token
ORG_ID: An arbitrary string (InfluxDB ignores this credential, but the client library requires it)
DATABASE_NAME: InfluxDB database name
Once you’ve installed the client library and configured credentials, you’re ready to write data to InfluxDB.
Was this page helpful?
Thank you for your feedback!
Support and feedback
Thank you for being part of our community! We welcome and encourage your feedback and bug reports for InfluxDB and this documentation. To find support, use the following resources:
Customers with an annual or support contract can contact InfluxData Support.