Compare commits

..

No commits in common. "94846a48e1f8ec279e71aebc12ff0a2afdf8d776" and "8eef17fd4c475186979beb24a305a6b1b9dfd9f0" have entirely different histories.

2 changed files with 5 additions and 8 deletions

View File

@ -60,7 +60,7 @@ if(errorMsg){
logger.debug("Get WriteApi & set default-hostname to", `'${env.HOSTNAME}'`);
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("Starting tcpdump..");

View File

@ -4,12 +4,12 @@ const {Point} = require("@influxdata/influxdb-client");
/** Keys to always use as tags */
const TAG_LIST = [
"srcMac",
"dstMac",
"srcmac",
"dstmac",
"bssid",
"frequency",
"flags",
"packetType",
"packettype",
];
/** Measurement-name and corresponding field-key */
@ -66,10 +66,7 @@ function tagObjectRecursively(point, tag, field, suffix = ""){
tagObjectRecursively(point, tag, value, `_${key}${suffix}`);
});
}
else {
const name = (tag+suffix).toLowerCase();
point.tag(name, field);
}
else point.tag(tag+suffix, field);
}
/** Mapping for type -> field-method */