当前位置:网站首页>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 .
边栏推荐
- Zzuli:1052 sum of sequence 4
- Qt—绘制其他东西
- 【微信小程序】WXSS 模板样式
- 2021-10-16 initial programming
- 创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03
- 远程服务器后台挂起 nohup
- Pyqt interface production (login + jump page)
- Piwigo 2.7.1 sqli learning
- Time conversion ()
- Niuke bm83 string deformation (case conversion, string inversion, string replacement)
猜你喜欢

4-24--4-28
![[graphics] real shading in Unreal Engine 4](/img/8d/53775c7570c5578f4fe985592bb305.jpg)
[graphics] real shading in Unreal Engine 4

Zzuli:1053 sine function
![[graphics] hair simulation in tressfx](/img/41/cef55811463d3a25a29ddab5278af0.jpg)
[graphics] hair simulation in tressfx

链表有环,快慢指针走3步可以吗

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

PS tips - draw green earth with a brush

Série yolov5 (i) - - netron, un outil de visualisation de réseau

Qt—绘制其他东西

【注意力机制】【首篇ViT】DETR,End-to-End Object Detection with Transformers网络的主要组成是CNN和Transformer
随机推荐
5-1 blocking / non blocking, synchronous / asynchronous
Byte practice plane longitude 2
零拷贝底层剖析
NOI OPENJUDGE 1.3(06)
Yolov5系列(一)——網絡可視化工具netron
Zzuli:1041 sum of sequence 2
7-10 stack of hats (25 points) (C language solution)
There are links in the linked list. Can you walk three steps faster or slower
Use of form text box (I) select text
Center and drag linked global and Chinese markets 2022-2028: Research Report on technology, participants, trends, market size and share
Awvs batch operation script
ASTC texture compression (adaptive scalable texture compression)
C language to realize mine sweeping
2022/02/14
Pytorch深度学习和目标检测实战笔记
QT program font becomes larger on computers with different resolutions, overflowing controls
[ue4] Niagara's indirect draw
5.2-5.3
Rasterization: a practical implementation (2)
Zzuli:1042 sum of sequence 3