...
|
...
|
@@ -14,8 +14,11 @@ function parseMessage(line) { |
|
|
let measurement = line.split(',', 1)[0];
|
|
|
let body = line.substring(measurement.length + 1);
|
|
|
let tokens = body.split(' ');
|
|
|
let fieldsStr = tokens.filter((t, i) => i > 0 && i < tokens.length - 1).join(' ');
|
|
|
|
|
|
let [tags, fields, time] = [qs.parse(tokens[0], ',', '='), qs.parse(tokens[1], ',', '='), tokens[2]];
|
|
|
const tags = qs.parse(tokens[0], ',', '=');
|
|
|
const time = tokens[tokens.length - 1];
|
|
|
const fields = qs.parse(fieldsStr.replace(/,(\w+)=/g, '_$_$1='), '_$_', '=');
|
|
|
|
|
|
// 服务器路由
|
|
|
if (tags.path) {
|
...
|
...
|
|