以前項目里用的都是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采集中心的源碼改了,效果很好。