当前位置:网站首页>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 .
边栏推荐
- Center and drag linked global and Chinese markets 2022-2028: Research Report on technology, participants, trends, market size and share
- Adobe Premiere Pro 15.4 has been released. It natively supports Apple M1 and adds the function of speech to text
- 406. Reconstruct the queue according to height
- Yolov5 series (I) -- network visualization tool netron
- Yolov5进阶之八 高低版本格式转换问题
- QT - draw something else
- Zzuli:1052 sum of sequence 4
- [ue4] material and shader permutation
- Zzuli:1055 rabbit reproduction
- QT program font becomes larger on computers with different resolutions, overflowing controls
猜你喜欢
PS tips - draw green earth with a brush
Remote server background hangs nohup
Analysis of gene family characteristics - chromosome location analysis
Yolov5系列(一)——網絡可視化工具netron
零拷贝底层剖析
4-33--4-35
Pyqt interface production (login + jump page)
[graphics] hair simulation in tressfx
复合类型(自定义类型)
[wechat applet] wxss template style
随机推荐
Yolov5 advanced 8 format conversion between high and low versions
dllexport和dllimport
My QT learning path -- how qdatetimeedit is empty
Tencent internship interview sorting
Time conversion ()
Use of form text box (I) select text
5.4-5.5
Byte practice plane longitude 2
Detailed explanation of four modes of distributed transaction (Seata)
Implement Gobang with C language
[engine development] in depth GPU and rendering optimization (basic)
Zzuli:1047 logarithmic table
7-1 positive integer a+b (15 points)
Find books ()
Zzuli:1053 sine function
The picture quality has been improved! LR enhancement details_ Lightroom turns on AI photo detail enhancement: picture clarity increases by 30%
Zzuli: cumulative sum of 1050 factorials
【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03
There are links in the linked list. Can you walk three steps faster or slower