以前项目里用的都是SQL Server,现在想办法不用盗版了

InfluxDB看起来还挺好的,最近试试,吧以前的测温软件/MQTT采集中心改成这个

从123表里查
var client = new RestClient("http://localhost:8086/query?db=123&q=SELECT * FROM \"mymeas\"");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);


往123表里写索引键mymeas
var client = new RestClient("http://localhost:8086/write?db=123&precision=s");
client.Timeout = -1;
var request = new RestRequest(Method.POST);
request.AddHeader("Content-Type", "text/plain");
request.AddParameter("text/plain", "mymeas,mytag=1 myfield=90 1463683075",  ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
Console.WriteLine(response.Content);

 

 

 

 2021年1月7日

吧MQTT采集中心的源码改了,效果很好。