InfluxDB Times Series Data Platform | InfluxData | InfluxData


本站和网页 https://www.influxdata.com/ 的作者无关,不对其内容负责。快照谨为网络故障时之索引,不代表被搜索网站的即时页面。

InfluxDB Times Series Data Platform | InfluxData | InfluxData
Skip to content
Get InfluxDB
Products
InfluxDB
Build real-time applications for analytics, IoT and cloud-native services in less time with less code using InfluxDB.
Learn more
Running in the cloud
Fast, elastic, serverless real-time monitoring platform, dashboarding engine, analytics service and event and metrics processor.
Running on my laptop
InfluxDB is the essential time series toolkit — dashboards, queries, tasks and agents all in one place.
Running in my own environment
InfluxDB Enterprise is the solution for running the InfluxDB platform on your own infrastructure.
Collecting data
Ingest data into InfluxDB with developer tools like client libraries, popular pub-sub protocols, or low-code options like Telegraf, scrapers, or directly from third-party technologies.
Developers
Developers
Start building fast with key resources and more.
Learn more
Docs
Get a full overview and how to use the features and APIs.
Templates
Use prepackaged InfluxDB configurations to reduce setup time and simplify sharing.
InfluxDB University
Free on-demand courses help you gain skills and get started quickly.
Community
Find help, learn solutions, share ideas and follow discussions.
Customers
Customers
InfluxDB is the leading time series data platform used by customers across a variety of industries.
Customers
Learn more about how our 1,300+ customers are using InfluxDB.
By Use Case
Discover InfluxDB best practices and solutions based on use case.
By Industry
Time series insights and best practices based on industries.
Become an InfluxDB Inventor
Love InfluxDB? Share your expertise with the community.
Company
Pricing
Contact Us
Log in
Log in to InfluxDB Cloud 2.0
Log in to InfluxDB Enterprise
Log in to InfluxDB Cloud 1.x
Get InfluxDB
It's About Time.
Build on InfluxDB.
The Time Series Data Platform where developers build IoT, analytics, and cloud applications.
Get InfluxDB
Find the right product
Powered by
Loft Orbital uses InfluxDB to manage spacecraft operations with large volumes of telemetry.
Read more
Powered by
Spiio’s platform, built on InfluxDB, provides insights to optimize irrigation decision making.
Read more
Powered by
Factry.io built a data historian with InfluxDB to predict renewable energy output of a wind farm.
Read more
InfluxDB is the time series platform
A powerful API & toolset for real-time applications
A high-performance time series engine
A massive community of cloud and open source developers
Code in the languages you love
Tap into our custom client libraries, powerful APIs and tools
Read
Write
JavaScript
Python
Go
PHP
C#
const {InfluxDB, flux} = require('@influxdata/influxdb-client')
// const url = "https://us-west-2-1.aws.cloud2.influxdata.com";
const url = "http://localhost:9999";
const token = 'my-token'
const org = 'my-org'
const bucket = 'my-bucket'
const client = new InfluxDB({url: url, token: token})
const queryApi = client.getQueryApi(org)
const query = flux`from(bucket: "${bucket}")
|> range(start: -1d)
|> filter(fn: (r) => r._measurement == "weatherstation")`
queryApi.queryRows(query, {
next(row, tableMeta) {
const o = tableMeta.toObject(row)
console.log(`${o._time} ${o._measurement}: ${o._field}=${o._value}`)
},
error(error) {
console.error(error)
console.log('Finished ERROR')
},
complete() {
console.log('Finished SUCCESS')
},
})
const { InfluxDB, Point } = require("@influxdata/influxdb-client");
// const url = "https://us-west-2-1.aws.cloud2.influxdata.com";
const url = "http://localhost:9999";
const token = "my-token";
const org = "my-org";
const bucket = "my-bucket";
const client = new InfluxDB({ url: url, token: token });
const writeApi = client.getWriteApi(org, bucket);
const point = new Point("weatherstation")
.tag("location", "San Francisco")
.floatField("temperature", 23.4)
.timestamp(new Date());
writeApi.writePoint(point);
writeApi
.close()
.then(() => {
console.log("FINISHED");
})
.catch((e) => {
console.error(e);
console.log("Finished ERROR");
});
from influxdb_client import InfluxDBClient
url = 'https://us-west-2-1.aws.cloud2.influxdata.com'
token = 'my-token'
org = 'my-org'
bucket = 'my-bucket'
with InfluxDBClient(url=url, token=token, org=org) as client:
query_api = client.query_api()
tables = query_api.query('from(bucket: "my-bucket") |> range(start: -1d)')
for table in tables:
for record in table.records:
print(str(record["_time"]) + " - " + record.get_measurement()
+ " " + record.get_field() + "=" + str(record.get_value()))
from datetime import datetime
from influxdb_client import WritePrecision, InfluxDBClient, Point
from influxdb_client.client.write_api import SYNCHRONOUS
url = 'https://us-west-2-1.aws.cloud2.influxdata.com'
token = 'my-token'
org = 'my-org'
bucket = 'my-bucket'
with InfluxDBClient(url=url, token=token, org=org) as client:
p = Point("weatherstation") \
.tag("location", "San Francisco") \
.field("temperature", 25.9) \
.time(datetime.utcnow(), WritePrecision.MS)
with client.write_api(write_options=SYNCHRONOUS) as write_api:
write_api.write(bucket=bucket, record=p)
package main
import (
"context"
"fmt"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
func main() {
url := "https://us-west-2-1.aws.cloud2.influxdata.com"
token := "my-token"
org := "my-org"
bucket := "my-bucket"
client := influxdb2.NewClient(url, token)
queryAPI := client.QueryAPI(org)
query := fmt.Sprintf(`from(bucket: "%v") |> range(start: -1d)`, bucket)
result, err := queryAPI.Query(context.Background(), query)
if err != nil {
panic(err)
for result.Next() {
record := result.Record()
fmt.Printf("%v %v: %v=%v\n", record.Time(), record.Measurement(), record.Field(), record.Value())
client.Close()
package main
import (
"context"
"time"
influxdb2 "github.com/influxdata/influxdb-client-go/v2"
func main() {
url := "https://us-west-2-1.aws.cloud2.influxdata.com"
token := "my-token"
org := "my-org"
bucket := "my-bucket"
client := influxdb2.NewClient(url, token)
writeAPI := client.WriteAPIBlocking(org, bucket)
p := influxdb2.NewPointWithMeasurement("weatherstation").
AddTag("location", "San Francisco").
AddField("temperature", 25.7).
SetTime(time.Now())
err := writeAPI.WritePoint(context.Background(), p)
if err != nil {
panic(err)
client.Close()
<?php
require __DIR__ . '/vendor/autoload.php';
use InfluxDB2\Client;
use InfluxDB2\Model\WritePrecision;
$url = "https://us-west-2-1.aws.cloud2.influxdata.com";
$token = "my-token";
$org = "my-org";
$bucket = "my-bucket";
$client = new Client(["url" => $url, "token" => $token, "org" => $org, "precision" => WritePrecision::S]);
$queryApi = $client->createQueryApi();
$query = "from(bucket: \"$bucket\") |> range(start: -1d)";
$result = $queryApi->query($query);
foreach ($result as $table) {
foreach ($table->records as $record) {
$measurement = $record->getMeasurement();
$field = $record->getField();
$time = $record->getTime();
$value = $record->getValue();
print "$time $measurement: $field=$value\n";
$client->close();
<?php
require __DIR__ . '/vendor/autoload.php';
use InfluxDB2\Client;
use InfluxDB2\Model\WritePrecision;
use InfluxDB2\Point;
$url = "https://us-west-2-1.aws.cloud2.influxdata.com";
$token = "my-token";
$org = "my-org";
$bucket = "my-bucket";
$client = new Client(["url" => $url, "token" => $token, "org" => $org,
"bucket" => $bucket, "precision" => WritePrecision::S]);
$writeApi = $client->createWriteApi();
$point = Point::measurement("weatherstation")
->addTag("location", "San Francisco")
->addField("temperature", 25.1)
->time(time(), WritePrecision::S);
$writeApi->write($point);
$client->close();
using System;
using System.Threading.Tasks;
using InfluxDB.Client;
namespace Examples
public class QueryExample
public static async Task Main(string[] args)
var url = "https://us-west-2-1.aws.cloud2.influxdata.com";
var token = "my-token";
var org = "my-org";
var bucket = "my-bucket";
using var client = InfluxDBClientFactory.Create(url, token);
var queryApi = client.GetQueryApi();
var query = $"from(bucket:\"{bucket}\") |> range(start: -1d)";
var tables = await queryApi.QueryAsync(query, org);
tables.ForEach(table =>
table.Records.ForEach(record =>
Console.WriteLine(
$"{record.GetTime()} {record.GetMeasurement()}: {record.GetField()}={record.GetValue()}");
});
});
using System;
using System.Threading.Tasks;
using InfluxDB.Client;
using InfluxDB.Client.Api.Domain;
using InfluxDB.Client.Writes;
namespace Examples
public class WriteExample
public static async Task Main(string[] args)
var url = "https://us-west-2-1.aws.cloud2.influxdata.com";
var token = "my-token";
var org = "my-org";
var bucket = "bucket";
using var client = InfluxDBClientFactory.Create(url, token);
var writeApi = client.GetWriteApiAsync();
var point = PointData.Measurement("weatherstation")
.Tag("location", "San Francisco")
.Field("temperature", 25.5)
.Timestamp(DateTime.UtcNow, WritePrecision.Ns);
await writeApi.WritePointAsync(point, bucket, org);
Trusted by developers, from startups to enterprises
“InfluxDB has a very awesome stack, which gave us everything we needed when constructing the system.”
Read success story
Allison Wang
Software Engineer, Robinhood
“InfluxDB is a high-speed read and write database. So think of it. The data is being written in real time, you can read in real time, and when you’re reading it, you can apply your machine learning model. So, in real time, you can forecast, and you can detect anomalies.”
Read success story
Rajeev Tomer
Sr. Manager of Data Engineering, Capital One
“InfluxDB has become our go-to database choice. Often if we are using a different tool, we figure out how to get data out of the tool into InfluxDB. It’s easier to use, performs better, and is cheaper.”
Read success story
Jack Tench
Senior Software Engineer, Vonage
InfluxDB is a G2 Leader in Time Series
Read reviews
“InfluxDB is the Go-To Time Series Database.”
– Verified G2 Reviewer
548 Market St, PMB 77953
San Francisco, California 94104
Contact Us
Products
InfluxDB
Telegraf
Pricing
Support
Use Cases
Resources
InfluxDB U
Blog
Community
Customers
Swag
Events
Glossary
Time Series Data
Time Series Database
Time Series Forecasting
Time Series Analysis
InfluxData
About
Careers
Partners
Legal
Newsroom
Contact Sales
Sign Up for the InfluxData Newsletter
© 2022 InfluxData Inc. All Rights Reserved. Sitemap