当前位置:网站首页>Influxdb2 sources add data sources
Influxdb2 sources add data sources
2022-07-03 14:59:00 【Allen electronic IOT studio】
It is mainly divided into the following ways :
1、 Upload files
2、 client API: This tutorial mainly adds data in this way
3、telegraf plug-in unit , Telegraph plug-in
With C# Take the client as an example :

Choose to generate API token:


Then return to this interface :
establish vs2019 Console Application :

Actual test findings /netframework4.5 Cannot install this nuget package :
Adjusted for 4.7.2 after .

C# The code is as follows :
// You can generate an API token from the "API Tokens Tab" in the UI
const string token = "oskR6XS-LT5myc6RwWwb0QTvKSsoWvfxklNXgkknYgzZJyk0K80IKhFQuMSGexfjCSRCO-xUHA0MFL0LG5BlFA==";
const string bucket = "scada_bucket";
const string org = "ghy";
// Get client object
var client = InfluxDBClientFactory.Create("http://124.223.23.44:8086", token);
// Writing data
const string data = "mem,host=host1 used_percent=23.43234543";
using (var writeApi = client.GetWriteApi())
{
writeApi.WriteRecord(bucket, org, WritePrecision.Ns, data);
}
Console.WriteLine("ok");Write successfully :

Use node-red Client to test :
Install nodes :node-red-contrib-influxdb

contain 3 Nodes :
Write operations :
The information above is wrong :

Set node information :
The overall process is as follows :
Test whether the write is successful :
Use the output node to view :
The overall process is as follows :
The timestamp node remains the default .
The configuration of the setting node is as follows :

The query statement is as follows :
from(bucket: \"scada_bucket\") |> range(start: -1h)The output node is configured as follows ;

Passing the above test has no result :
Report errors :
Be careful : The query function has not passed the test for the time being , But the data is really inserted .
边栏推荐
- 链表有环,快慢指针走3步可以吗
- Zzuli:1057 prime number determination
- Fundamentals of PHP deserialization
- Pytorch深度学习和目标检测实战笔记
- Yolov5 series (I) -- network visualization tool netron
- 7-9 one way in, two ways out (25 points)
- 406. 根据身高重建队列
- Plane vector addition
- Zzuli:1047 logarithmic table
- Yolov5 advanced seven target tracking latest environment construction (II)
猜你喜欢
![[engine development] rendering architecture and advanced graphics programming](/img/a4/3526a4e0f68e49c1aa5ce23b578781.jpg)
[engine development] rendering architecture and advanced graphics programming

Composite type (custom type)

Pytoch deep learning and target detection practice notes

Solve the problem that PR cannot be installed on win10 system. Pr2021 version -premiere Pro 2021 official Chinese version installation tutorial

CentOS7部署哨兵Redis(带架构图,清晰易懂)

B2020 points candy

Tencent internship interview sorting

QT - draw something else

Zzuli:1053 sine function

Vs+qt multithreading implementation -- run and movetothread
随机推荐
Piwigo 2.7.1 sqli learning
406. Reconstruct the queue according to height
7-9 one way in, two ways out (25 points)
Time conversion ()
QT program font becomes larger on computers with different resolutions, overflowing controls
NOI OPENJUDGE 1.5(23)
[graphics] efficient target deformation animation based on OpenGL es 3.0
Yolov5 series (I) -- network visualization tool netron
什么是embedding(把物体编码为一个低维稠密向量),pytorch中nn.Embedding原理及使用
Simulation of LS -al command in C language
【Transform】【实践】使用Pytorch的torch.nn.MultiheadAttention来实现self-attention
Yolov5系列(一)——网络可视化工具netron
Zzuli:1058 solving inequalities
[ue4] cascading shadow CSM
Bucket sorting in C language
4-33--4-35
7-10 stack of hats (25 points) (C language solution)
分布式事务(Seata) 四大模式详解
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03