Telemetry, edge devices, and physical AI generate data that most databases can’t handle. InfluxDB handles continuous, high-resolution data with precision and speed.
Engineered for performance at scale
Handle continuous, high-resolution data without breaking cost, latency, or reliability
AI systems need a stream of high-precision telemetry to improve. InfluxDB captures granular sensor data enabling AI to detect, respond and predict in real-time.
Aircraft and spacecraft require pinpoint precision for mission critical navigation. Capture high-rate sensor streams to power real-time diagnostics and adaptive control.
Manufacturing
Production lines generate constant signals. Feed real-time telemetry into AI models to predict equipment failures, optimize throughput, and maintain product quality.
Energy & Utilities
Manage grid volatility across distributed assets. Real-time sensor streams feed predictive models to prevent costly edge failures.
Build systems and infrastructure monitoring that scales
Keep pace with the flood of time series data. Learn how to build real-time monitoring that scales securely with InfluxDB and Grafana to keep ahead of outages, performance regressions, and costly blind spots.
from influxdb_client_3 import InfluxDBClient3
import pandas
import os
database = os.getenv('INFLUX_DATABASE')
token = os.getenv('INFLUX_TOKEN')
host="https://us-east-1-1.aws.cloud2.influxdata.com"
def querySQL():
client = InfluxDBClient3(host, database=database, token=token)
table = client.query(
'''SELECT
room,
DATE_BIN(INTERVAL '1 day', time) AS _time,
AVG(temp) AS temp,
AVG(hum) AS hum,
AVG(co) AS co
FROM home
WHERE time >= now() - INTERVAL '90 days'
GROUP BY room, _time
ORDER BY _time'''
)
print(table.to_pandas().to_markdown())
client.close()
querySQL()
from influxdb_client_3 import InfluxDBClient3
import os
database = os.getenv('INFLUX_DATABASE')
token = os.getenv('INFLUX_TOKEN')
host="https://us-east-1-1.aws.cloud2.influxdata.com"
def write_line_protocol():
client = InfluxDBClient3(host, database=database, token=token)
record = "home,room=Living\\ Room temp=22.2,hum=36.4,co=17i"
print("Writing record:", record )
client.write(record)
client.close()
write_line_protocol()
import {InfluxDBClient} from '@influxdata/influxdb3-client'
import {tableFromArrays} from 'apache-arrow';
const database = process.env.INFLUX_DATABASE;
const token = process.env.INFLUX_TOKEN;
const host = "https://us-east-1-1.aws.cloud2.influxdata.com";
async function main() {
const client = new InfluxDBClient({host, token})
const query = `
SELECT
room,
DATE_BIN(INTERVAL '1 day', time) AS _time,
AVG(temp) AS temp,
AVG(hum) AS hum,
AVG(co) AS co
FROM home
WHERE time >= now() - INTERVAL '90 days'
GROUP BY room, _time
ORDER BY _time
`
const result = await client.query(query, database)
const data = {room: [], day: [], temp: []}
for await (const row of result) {
data.day.push(new Date(row._time).toISOString())
data.room.push(row.room)
data.temp.push(row.temp)
}
console.table([...tableFromArrays(data)])
client.close()
}
main()
import {InfluxDBClient} from '@influxdata/influxdb3-client'
const database = process.env.INFLUX_DATABASE;
const token = process.env.INFLUX_TOKEN;
const host = "https://us-east-1-1.aws.cloud2.influxdata.com";
async function main() {
const client = new InfluxDBClient({host, token})
const record = "home,room=Living\\ Room temp=22.2,hum=36.4,co=17i"
await client.write(record, database)
client.close()
}
main()
package influxdbv3
import (
"context"
"fmt"
"io"
"os"
"text/tabwriter"
"github.com/apache/arrow/go/v12/arrow"
"github.com/InfluxCommunity/influxdb3-go/influx"
)
func QuerySQL() error {
url := "https://us-east-1-1.aws.cloud2.influxdata.com"
token := os.Getenv("INFLUX_TOKEN")
database := os.Getenv("INFLUX_DATABASE")
client, err := influx.New(influx.Configs{
HostURL: url,
AuthToken: token,
})
defer func (client *influx.Client) {
err := client.Close()
if err != nil {
panic(err)
}
}(client)
query := `
SELECT
room,
DATE_BIN(INTERVAL '1 day', time) AS _time,
AVG(temp) AS temp,
AVG(hum) AS hum,
AVG(co) AS co
FROM home
WHERE time >= now() - INTERVAL '90 days'
GROUP BY room, _time
ORDER BY _time
`
iterator, err := client.Query(context.Background(), database, query)
if err != nil {
panic(err)
}
w := tabwriter.NewWriter(io.Discard, 4, 4, 1, ' ', 0)
w.Init(os.Stdout, 0, 8, 0, '\t', 0)
fmt.Fprintln(w, "day\troom\ttemp")
for iterator.Next() {
row := iterator.Value()
day := (row["_time"].(arrow.Timestamp)).ToTime(arrow.TimeUnit(arrow.Nanosecond))
fmt.Fprintf(w, "%s\t%s\t%.2f\n", day, row["room"], row["temp"])
}
w.Flush()
return nil
}
using System;
using System.Threading.Tasks;
using InfluxDB3.Client;
using InfluxDB3.Client.Query;
namespace InfluxDBv3;
public class Query
{
static async Task QuerySQL()
{
const string hostUrl = "https://us-east-1-1.aws.cloud2.influxdata.com";
string? database = System.Environment.GetEnvironmentVariable("INFLUX_DATABASE");
string? authToken = System.Environment.GetEnvironmentVariable("INFLUX_TOKEN");
using var client = new InfluxDBClient(hostUrl, authToken: authToken, database: database);
const string sql = @"
SELECT
room,
DATE_BIN(INTERVAL '1 day', time) AS _time,
AVG(temp) AS temp,
AVG(hum) AS hum,
AVG(co) AS co
FROM home
WHERE time >= now() - INTERVAL '90 days'
GROUP BY room, _time
ORDER BY _time
";
Console.WriteLine("{0,-30}{1,-15}{2,-15}", "day", "room", "temp");
await foreach (var row in client.Query(query: sql))
{
Console.WriteLine("{0,-30}{1,-15}{2,-15}", row[1], row[0], row[2]);
}
Console.WriteLine();
}
}
using System;
using System.Threading.Tasks;
using InfluxDB3.Client;
using InfluxDB3.Client.Query;
namespace InfluxDBv3;
public class Write
{
public static async Task WriteLineProtocol()
{
const string hostUrl = "https://us-east-1-1.aws.cloud2.influxdata.com";
string? database = System.Environment.GetEnvironmentVariable("INFLUX_DATABASE");
string? authToken = System.Environment.GetEnvironmentVariable("INFLUX_TOKEN");
using var client = new InfluxDBClient(hostUrl, authToken: authToken, database: database);
const string record = "home,room=Living\\ Room temp=22.2,hum=36.4,co=17i";
Console.WriteLine("Write record: {0,-30}", record);
await client.WriteRecordAsync(record: record);
}
}
package com.influxdb.v3;
import java.time.Instant;
import java.util.stream.Stream;
import com.influxdb.v3.client.InfluxDBClient;
import com.influxdb.v3.client.query.QueryOptions;
import com.influxdb.v3.client.Point;
public class IOxExample {
public static void main(String[] args) throws Exception {
String host = "https://us-east-1-1.aws.cloud2.influxdata.com";
char[] token = "my-token".toCharArray();
String database = "database";
try (InfluxDBClient client = InfluxDBClient.getInstance(host, token, database)) {
//
// Query by SQL
//
System.out.printf("--------------------------------------------------------%n");
System.out.printf("| %-8s | %-8s | %-30s |%n", "location", "value", "time");
System.out.printf("--------------------------------------------------------%n");
String sql = "select time,location,value from temperature order by time desc limit 10";
try (Stream
package com.influxdb.v3;
import java.time.Instant;
import java.util.stream.Stream;
import com.influxdb.v3.client.InfluxDBClient;
import com.influxdb.v3.client.query.QueryOptions;
import com.influxdb.v3.client.Point;
public class IOxExample {
public static void main(String[] args) throws Exception {
String host = "https://us-east-1-1.aws.cloud2.influxdata.com";
char[] token = "my-token".toCharArray();
String database = "database";
try (InfluxDBClient client = InfluxDBClient.getInstance(host, token, database)) {
//
// Write by Point
//
Point point = Point.measurement("temperature")
.setTag("location", "west")
.setField("value", 55.15)
.setTimestamp(Instant.now().minusSeconds(-10));
client.writePoint(point);
//
// Write by LineProtocol
//
String record = "temperature,location=north value=60.0";
client.writeRecord(record);
}
}
}
400+ Telegraf plugins
Seamless integration with your favorite tools with Telegraf, our popular open source connector with 5B+ downloads.
Client libraries
InfluxDB client libraries make it easy to integrate time series data into your applications using your favorite programming languages.
Community & ecosystem
InfluxDB includes a massive community of cloud and open source developers to help you work the way you want.