diff --git a/al_log.js b/al_log.js index 4c529ce..2cb2a39 100644 --- a/al_log.js +++ b/al_log.js @@ -46,7 +46,8 @@ const PAYLOAD_BATCH_SIZE = 10000000; * message: 'some message string', * messageType: 'json/azure.o365', * messageTypeId: 'AzureActiveDirectory', - * messageTsUs: undefined + * messageTsUs: undefined, + * applicationId: 'o365' * }; * Consult 'collected_message' definition in proto/common_proto.piqi.proto * @param callback @@ -181,7 +182,8 @@ function buildHostmeta(hostId, hostmetaElems, callback) { * message: 'some message string', * messageType: 'json/azure.o365', * messageTypeId: 'AzureActiveDirectory', - * messageTsUs: undefined + * messageTsUs: undefined, + * applicationId: 'o365' * }; * Consult 'collected_message' definition in proto/common_proto.piqi.proto * @param callback diff --git a/package.json b/package.json index b779f38..5cff809 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alertlogic/al-collector-js", - "version": "1.4.2", + "version": "1.4.3", "license": "MIT", "description": "Alert Logic Collector Common Library", "repository": { diff --git a/proto/common_proto.piqi.proto b/proto/common_proto.piqi.proto index 5a347ba..2d34f19 100644 --- a/proto/common_proto.piqi.proto +++ b/proto/common_proto.piqi.proto @@ -38,6 +38,7 @@ message collected_message { required string message_type = 7; optional string message_type_id = 8; optional fixed32 message_ts_us = 9; + optional string application_id = 10; } message collected_batch { diff --git a/proto/common_proto.piqi_pb.js b/proto/common_proto.piqi_pb.js index da989e2..50fed9e 100644 --- a/proto/common_proto.piqi_pb.js +++ b/proto/common_proto.piqi_pb.js @@ -911,6 +911,7 @@ $root.common_proto = (function() { * @property {string} messageType collected_message messageType * @property {string|null} [messageTypeId] collected_message messageTypeId * @property {number|null} [messageTsUs] collected_message messageTsUs + * @property {string|null} [applicationId] collected_message applicationId */ /** @@ -1000,6 +1001,14 @@ $root.common_proto = (function() { */ collected_message.prototype.messageTsUs = 0; + /** + * collected_message applicationId. + * @member {string} applicationId + * @memberof common_proto.collected_message + * @instance + */ + collected_message.prototype.applicationId = ""; + /** * Creates a new collected_message instance using the specified properties. * @function create @@ -1038,6 +1047,8 @@ $root.common_proto = (function() { writer.uint32(/* id 8, wireType 2 =*/66).string(message.messageTypeId); if (message.messageTsUs != null && message.hasOwnProperty("messageTsUs")) writer.uint32(/* id 9, wireType 5 =*/77).fixed32(message.messageTsUs); + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.applicationId); return writer; }; @@ -1099,6 +1110,9 @@ $root.common_proto = (function() { case 9: message.messageTsUs = reader.fixed32(); break; + case 10: + message.applicationId = reader.string(); + break; default: reader.skipType(tag & 7); break; @@ -1165,6 +1179,9 @@ $root.common_proto = (function() { if (message.messageTsUs != null && message.hasOwnProperty("messageTsUs")) if (!$util.isInteger(message.messageTsUs)) return "messageTsUs: integer expected"; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + if (!$util.isString(message.applicationId)) + return "applicationId: string expected"; return null; }; @@ -1212,6 +1229,8 @@ $root.common_proto = (function() { message.messageTypeId = String(object.messageTypeId); if (object.messageTsUs != null) message.messageTsUs = object.messageTsUs >>> 0; + if (object.applicationId != null) + message.applicationId = String(object.applicationId); return message; }; @@ -1246,6 +1265,7 @@ $root.common_proto = (function() { object.messageType = ""; object.messageTypeId = ""; object.messageTsUs = 0; + object.applicationId = ""; } if (message.hostname != null && message.hasOwnProperty("hostname")) object.hostname = message.hostname; @@ -1271,6 +1291,8 @@ $root.common_proto = (function() { object.messageTypeId = message.messageTypeId; if (message.messageTsUs != null && message.hasOwnProperty("messageTsUs")) object.messageTsUs = message.messageTsUs; + if (message.applicationId != null && message.hasOwnProperty("applicationId")) + object.applicationId = message.applicationId; return object; };