diff --git a/data/conf/samples/ees/cgrates.json b/data/conf/samples/ees/cgrates.json index a6a278770..532c1e6d0 100644 --- a/data/conf/samples/ees/cgrates.json +++ b/data/conf/samples/ees/cgrates.json @@ -345,11 +345,12 @@ {"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, {"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, {"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, + {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*tenant.Tenant"}, {"tag": "Category", "path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, {"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, {"tag": "Subject", "path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, {"tag": "Destination", "path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, + {"tag": "@timestamp", "path": "*exp.@timestamp", "type": "*datetime", "value": "*now"}, {"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"}, {"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"}, {"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, @@ -390,11 +391,12 @@ {"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, {"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, {"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, + {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*tenant.Tenant"}, {"tag": "Category", "path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, {"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, {"tag": "Subject", "path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, {"tag": "Destination", "path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, + {"tag": "@timestamp", "path": "*exp.@timestamp", "type": "*datetime", "value": "*now"}, {"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"}, {"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"}, {"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, @@ -437,11 +439,12 @@ {"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, {"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, {"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, + {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*tenant.Tenant"}, {"tag": "Category", "path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, {"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, {"tag": "Subject", "path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, {"tag": "Destination", "path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, + {"tag": "@timestamp", "path": "*exp.@timestamp", "type": "*datetime", "value": "*now"}, {"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"}, {"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"}, {"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, @@ -487,11 +490,12 @@ {"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"}, {"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"}, {"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"}, - {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"}, + {"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*tenant.Tenant"}, {"tag": "Category", "path": "*exp.Category", "type": "*variable", "value": "~*req.Category"}, {"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account"}, {"tag": "Subject", "path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"}, {"tag": "Destination", "path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"}, + {"tag": "@timestamp", "path": "*exp.@timestamp", "type": "*datetime", "value": "*now"}, {"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime"}, {"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime"}, {"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"}, diff --git a/ees/ees.go b/ees/ees.go index 5876f42c2..67e03ce5c 100644 --- a/ees/ees.go +++ b/ees/ees.go @@ -266,11 +266,12 @@ func exportEventWithExporter(exp EventExporter, ev *utils.CGREvent, oneTime bool } else { expNM := utils.NewOrderedNavigableMap() err = engine.NewExportRequest(map[string]utils.DataStorage{ - utils.MetaReq: utils.MapStorage(ev.Event), - utils.MetaDC: exp.GetMetrics(), - utils.MetaOpts: utils.MapStorage(ev.APIOpts), - utils.MetaCfg: cfg.GetDataProvider(), - utils.MetaEC: utils.MapStorage{utils.CostDetails: ev.Event[utils.CostDetails]}, + utils.MetaReq: utils.MapStorage(ev.Event), + utils.MetaDC: exp.GetMetrics(), + utils.MetaOpts: utils.MapStorage(ev.APIOpts), + utils.MetaCfg: cfg.GetDataProvider(), + utils.MetaEC: utils.MapStorage{utils.CostDetails: ev.Event[utils.CostDetails]}, + utils.MetaTenant: utils.MapStorage{utils.Tenant: ev.Tenant}, }, utils.FirstNonEmpty(ev.Tenant, cfg.GeneralCfg().DefaultTenant), filterS, map[string]*utils.OrderedNavigableMap{utils.MetaExp: expNM}).SetFields(exp.Cfg().ContentFields())