当前位置:网站首页>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 .
边栏推荐
- Dllexport and dllimport
- Qt development - scrolling digital selector commonly used in embedded system
- Global and Chinese markets for transparent OLED displays 2022-2028: Research Report on technology, participants, trends, market size and share
- 远程服务器后台挂起 nohup
- Output student grades
- Qt—绘制其他东西
- Write a 2-minute countdown.
- .NET六大设计原则个人白话理解,有误请大神指正
- Zzuli:1045 numerical statistics
- Global and Chinese market of iron free motors 2022-2028: Research Report on technology, participants, trends, market size and share
猜你喜欢
4-24--4-28
PS tips - draw green earth with a brush
Centos7 deployment sentry redis (with architecture diagram, clear and easy to understand)
零拷贝底层剖析
How does vs+qt set the software version copyright, obtain the software version and display the version number?
Composite type (custom type)
Zzuli:1053 sine function
【Transform】【NLP】首次提出Transformer,Google Brain团队2017年论文《Attention is all you need》
How can entrepreneurial teams implement agile testing to improve quality and efficiency? Voice network developer entrepreneurship lecture Vol.03
[ue4] material and shader permutation
随机推荐
[ue4] cascading shadow CSM
Joomla! CMS 3.0~3.4.6 RCE
Byte practice plane longitude 2
556. The next larger element III: simple construction simulation questions
406. Reconstruct the queue according to height
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
Dllexport and dllimport
Global and Chinese market of lighting control components 2022-2028: Research Report on technology, participants, trends, market size and share
Chapter 14 class part 1
【7.3】146. LRU caching mechanism
创业团队如何落地敏捷测试,提升质量效能?丨声网开发者创业讲堂 Vol.03
NOI OPENJUDGE 1.4(15)
QT - draw something else
Pytorch深度学习和目标检测实战笔记
Yolov5 advanced 8 format conversion between high and low versions
Zzuli:1058 solving inequalities
Container of symfony
Simulation of LS -al command in C language
Solve the problem that PR cannot be installed on win10 system. Pr2021 version -premiere Pro 2021 official Chinese version installation tutorial
从书本《皮囊》摘录的几个句子