Compare commits
6 Commits
release-2.
...
v2.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
| c3cd6393d4 | |||
| c97137f4a7 | |||
| a13d81e9c0 | |||
| 059c02e243 | |||
| a610f209d5 | |||
| 6e05a0b45c |
@@ -60,7 +60,7 @@ if(errorMsg){
|
|||||||
|
|
||||||
logger.debug("Get WriteApi & set default-hostname to", `'${env.HOSTNAME}'`);
|
logger.debug("Get WriteApi & set default-hostname to", `'${env.HOSTNAME}'`);
|
||||||
const influxWriteApi = influxDb.getWriteApi(env.INFLUX_ORG, env.INFLUX_BUCKET, "us");
|
const influxWriteApi = influxDb.getWriteApi(env.INFLUX_ORG, env.INFLUX_BUCKET, "us");
|
||||||
//influxWriteApi.useDefaultTags({"hostname": env.HOSTNAME});
|
influxWriteApi.useDefaultTags({"hostname": env.HOSTNAME});
|
||||||
logger.info("Influx ok");
|
logger.info("Influx ok");
|
||||||
|
|
||||||
logger.info("Starting tcpdump..");
|
logger.info("Starting tcpdump..");
|
||||||
|
|||||||
@@ -4,12 +4,12 @@ const {Point} = require("@influxdata/influxdb-client");
|
|||||||
|
|
||||||
/** Keys to always use as tags */
|
/** Keys to always use as tags */
|
||||||
const TAG_LIST = [
|
const TAG_LIST = [
|
||||||
"srcMac",
|
"srcmac",
|
||||||
"dstMac",
|
"dstmac",
|
||||||
"bssid",
|
"bssid",
|
||||||
"frequency",
|
"frequency",
|
||||||
"flags",
|
"flags",
|
||||||
"packetType",
|
"packettype",
|
||||||
];
|
];
|
||||||
|
|
||||||
/** Measurement-name and corresponding field-key */
|
/** Measurement-name and corresponding field-key */
|
||||||
@@ -66,10 +66,7 @@ function tagObjectRecursively(point, tag, field, suffix = ""){
|
|||||||
tagObjectRecursively(point, tag, value, `_${key}${suffix}`);
|
tagObjectRecursively(point, tag, value, `_${key}${suffix}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else point.tag(tag+suffix, field);
|
||||||
const name = (tag+suffix).toLowerCase();
|
|
||||||
point.tag(name, field);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Mapping for type -> field-method */
|
/** Mapping for type -> field-method */
|
||||||
|
|||||||
Reference in New Issue
Block a user