diff --git a/esp/scm/ws_logaccess.ecm b/esp/scm/ws_logaccess.ecm index d89dc4d4a30..ca4545e7ddb 100644 --- a/esp/scm/ws_logaccess.ecm +++ b/esp/scm/ws_logaccess.ecm @@ -76,13 +76,14 @@ ESPenum LogColumnValueType : string enum("enum") }; -ESPStruct LogColumn +ESPStruct [nil_remove] LogColumn { string Name; ESPenum LogColumnType LogType; ESParray EnumeratedValues; LogSelectColumnMode ColumnMode; ESPenum LogColumnValueType ColumnType; + [min_ver("1.06")] string Alias; }; ESPResponse GetLogAccessInfoResponse @@ -219,7 +220,7 @@ ESPResponse GetLogsResponse [min_ver("1.02")] unsigned int TotalLogLinesAvailable; }; -ESPservice [auth_feature("WsLogAccess:READ"), version("1.05"), default_client_version("1.05"), exceptions_inline("xslt/exceptions.xslt")] ws_logaccess +ESPservice [auth_feature("WsLogAccess:READ"), version("1.06"), default_client_version("1.06"), exceptions_inline("xslt/exceptions.xslt")] ws_logaccess { ESPmethod GetLogAccessInfo(GetLogAccessInfoRequest, GetLogAccessInfoResponse); ESPmethod GetLogs(GetLogsRequest, GetLogsResponse); diff --git a/esp/services/ws_logaccess/WsLogAccessService.cpp b/esp/services/ws_logaccess/WsLogAccessService.cpp index b0f055e26f9..60ed9dbf612 100644 --- a/esp/services/ws_logaccess/WsLogAccessService.cpp +++ b/esp/services/ws_logaccess/WsLogAccessService.cpp @@ -71,6 +71,26 @@ bool Cws_logaccessEx::onGetLogAccessInfo(IEspContext &context, IEspGetLogAccessI WARNLOG("Invalid col type found in logaccess logmap config"); } } + if (clientVer >= 1.06) + { + if (column.hasProp("@alias")) + { + try + { + espLogColumn->setAlias(column.queryProp("@alias")); + } + catch (IException *e) + { + VStringBuffer msg("Invalid alias found in logaccess logmap config for '%s'", csearchColumn); + EXCLOG(e, msg.str()); + e->Release(); + } + catch(...) + { + WARNLOG("Invalid alias found in logaccess logmap config"); + } + } + } logColumns.append(*espLogColumn.getClear()); } else diff --git a/helm/examples/azure/log-analytics/loganalytics-hpcc-logaccess.yaml b/helm/examples/azure/log-analytics/loganalytics-hpcc-logaccess.yaml index fc01b818c41..c5a5a326aa7 100644 --- a/helm/examples/azure/log-analytics/loganalytics-hpcc-logaccess.yaml +++ b/helm/examples/azure/log-analytics/loganalytics-hpcc-logaccess.yaml @@ -59,7 +59,7 @@ global: - type: "instance" storeName: "ContainerInventory" searchColumn: "Name" - projectName: "hpcc_log_component" + alias: "hpcc_log_component" columnMode: "ALL" columnType: "string" - type: "node" diff --git a/helm/hpcc/values.schema.json b/helm/hpcc/values.schema.json index 569f7ad715b..273e9247b00 100644 --- a/helm/hpcc/values.schema.json +++ b/helm/hpcc/values.schema.json @@ -3003,7 +3003,7 @@ "type": { "type": "string", "description" : "The searchable HPCC log column to be mapped - 'global' applies to all known fields", - "enum": [ "global", "workunits", "components", "audience", "class", "instance", "host", "node", "message", "logid", "processid", "threadid", "timestamp"] + "enum": [ "global", "workunits", "components", "audience", "class", "instance", "host", "node", "message", "logid", "processid", "threadid", "timestamp", "alias"] }, "timeStampColumn": { "description" : "Name of timestamp column related to mapped field (only requried for 'global' mapping)",