当前位置:网站首页>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 .
边栏推荐
- Fundamentals of PHP deserialization
- Use of form text box (I) select text
- 【7.3】146. LRU caching mechanism
- Composite type (custom type)
- Joomla! CMS 3.0~3.4.6 RCE
- Zzuli:1043 max
- Zzuli:1059 highest score
- Open under vs2019 UI file QT designer flash back problem
- Global and Chinese market of solder bars 2022-2028: Research Report on technology, participants, trends, market size and share
- Yolov5系列(一)——網絡可視化工具netron
猜你喜欢

C language fcntl function

Pyqt interface production (login + jump page)
![[ue4] material and shader permutation](/img/8f/7743ac378490fcd7b9ecc5b4c2ef2a.jpg)
[ue4] material and shader permutation
![[graphics] real shading in Unreal Engine 4](/img/8d/53775c7570c5578f4fe985592bb305.jpg)
[graphics] real shading in Unreal Engine 4

Use of form text box (I) select text

5-1 blocking / non blocking, synchronous / asynchronous

Qt—绘制其他东西

分布式事务(Seata) 四大模式详解

Composite type (custom type)

My QT learning path -- how qdatetimeedit is empty
随机推荐
Detailed explanation of four modes of distributed transaction (Seata)
Pytorch深度学习和目标检测实战笔记
Remote server background hangs nohup
Adobe Premiere Pro 15.4 has been released. It natively supports Apple M1 and adds the function of speech to text
Global and Chinese markets for infrared solutions (for industrial, civil, national defense and security applications) 2022-2028: Research Report on technology, participants, trends, market size and sh
Web server code parsing - thread pool
NOI OPENJUDGE 1.6(09)
Zzuli:1041 sum of sequence 2
Chapter 14 class part 1
Global and Chinese market of transfer case 2022-2028: Research Report on technology, participants, trends, market size and share
Zzuli:1042 sum of sequence 3
Tensor ellipsis (three points) slice
How does vs+qt set the software version copyright, obtain the software version and display the version number?
Yolov5系列(一)——网络可视化工具netron
7-3 rental (20 points)
1017 a divided by B (20 points)
Introduction to opengl4.0 tutorial computing shaders
Joomla! CMS 3.0~3.4.6 RCE
TPS61170QDRVRQ1
分布式事务(Seata) 四大模式详解