EventTemplate控制器编写
This commit is contained in:
@@ -59,8 +59,14 @@ public class DataTest {
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
InfluxDbUtils influxDBUtil = new InfluxDbUtils("root", "123456789", "http://192.168.1.18:8086", "pqsbase", "");
|
||||
InfluxDbUtils influxDBUtil = new InfluxDbUtils("admin", "123456", "http://192.168.1.18:8086", "pqsbase", "");
|
||||
insert(influxDBUtil);
|
||||
Map<String, String> tags = new HashMap<>();
|
||||
long time = Long.parseLong("1657959227000");
|
||||
tags.put("line_id","656da093bdb523b6ac619067a4045624");
|
||||
Map<String, Object> fields = new HashMap<>();
|
||||
fields.put("statis_value",1024000000.00);
|
||||
influxDBUtil.insert("cld_month_flow", tags, fields, time, TimeUnit.MILLISECONDS);
|
||||
//select(influxDBUtil);
|
||||
}
|
||||
public static void deleteDB(InfluxDbUtils influxDBUtil) {
|
||||
|
||||
Reference in New Issue
Block a user