mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
462 lines
22 KiB
JSON
462 lines
22 KiB
JSON
{
|
|
// Sample CGRateS Configuration file for EEs
|
|
//
|
|
// Copyright (C) ITsysCOM GmbH
|
|
|
|
"general": {
|
|
"log_level": 7,
|
|
},
|
|
|
|
"listen": {
|
|
"rpc_json": ":2012",
|
|
"rpc_gob": ":2013",
|
|
"http": ":2080",
|
|
},
|
|
|
|
"data_db": {
|
|
"db_type": "redis",
|
|
"db_port": 6379,
|
|
"db_name": "10",
|
|
},
|
|
|
|
|
|
"stor_db": {
|
|
"db_password": "CGRateS.org",
|
|
},
|
|
|
|
|
|
"rals": {
|
|
"enabled": true,
|
|
},
|
|
|
|
|
|
"schedulers": {
|
|
"enabled": true,
|
|
},
|
|
|
|
|
|
"cdrs": {
|
|
"enabled": true,
|
|
"chargers_conns": ["*localhost"],
|
|
"rals_conns": ["*internal"],
|
|
"session_cost_retries": 0,
|
|
},
|
|
|
|
|
|
"chargers": {
|
|
"enabled": true,
|
|
"attributes_conns": ["*internal"],
|
|
},
|
|
|
|
|
|
"attributes": {
|
|
"enabled": true,
|
|
},
|
|
|
|
|
|
"ees": {
|
|
"enabled": true,
|
|
"attributes_conns":["*internal"],
|
|
"cache": {
|
|
"*file_csv": {"limit": -1, "ttl": "500ms", "static_ttl": false},
|
|
"*file_fwv": {"limit": -1, "ttl": "500ms", "static_ttl": false}
|
|
},
|
|
"exporters": [
|
|
{
|
|
"id": "CSVExporter",
|
|
"type": "*file_csv",
|
|
"export_path": "/tmp/testCSV",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"field_separator": ",",
|
|
},
|
|
{
|
|
"id": "CSVExporterComposed",
|
|
"type": "*file_csv",
|
|
"export_path": "/tmp/testComposedCSV",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"field_separator": ",",
|
|
"fields":[
|
|
{"tag": "Number", "path": "*hdr.Number", "type": "*constant", "value": "NumberOfEvent"},
|
|
{"tag": "CGRID", "path": "*hdr.CGRID", "type": "*constant", "value": "CGRID"},
|
|
{"tag": "RunID", "path": "*hdr.RunID", "type": "*constant", "value": "RunID"},
|
|
{"tag": "ToR", "path": "*hdr.ToR", "type": "*constant", "value": "ToR"},
|
|
{"tag": "OriginID", "path": "*hdr.OriginID", "type": "*constant", "value": "OriginID"},
|
|
{"tag": "RequestType", "path": "*hdr.RequestType", "type": "*constant", "value": "RequestType"},
|
|
{"tag": "Tenant", "path": "*hdr.Tenant", "type": "*constant", "value": "Tenant"},
|
|
{"tag": "Category", "path": "*hdr.Category", "type": "*constant", "value": "Category"},
|
|
{"tag": "Account", "path": "*hdr.Account", "type": "*constant", "value": "Account"},
|
|
{"tag": "Subject", "path": "*hdr.Subject", "type": "*constant", "value": "Subject"},
|
|
{"tag": "Destination", "path": "*hdr.Destination", "type": "*constant", "value": "Destination"},
|
|
{"tag": "SetupTime", "path": "*hdr.SetupTime", "type": "*constant", "value": "SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "AnswerTime", "path": "*hdr.AnswerTime", "type": "*constant", "value": "AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "Usage", "path": "*hdr.Usage", "type": "*constant", "value": "Usage"},
|
|
{"tag": "Cost", "path": "*hdr.Cost", "type": "*constant", "value": "Cost"},
|
|
|
|
{"tag": "Number", "path": "*exp.Number", "type": "*variable", "value": "~*dc.NumberOfEvents"},
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"tag": "ToR", "path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"},
|
|
{"tag": "OriginID1", "path": "*exp.OriginID", "type": "*composed", "value": "~*req.ComposedOriginID1"},
|
|
{"tag": "OriginID2", "path": "*exp.OriginID", "type": "*composed", "value": "~*req.ComposedOriginID2"},
|
|
{"tag": "RequestType", "path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"},
|
|
{"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.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": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
|
|
{"tag": "NumberOfEvents", "path": "*trl.NumberOfEvents", "type": "*variable", "value": "~*dc.NumberOfEvents"},
|
|
{"tag": "TotalDuration", "path": "*trl.TotalDuration", "type": "*variable", "value": "~*dc.TotalDuration"},
|
|
{"tag": "TotalSMSUsage", "path": "*trl.TotalSMSUsage", "type": "*variable", "value": "~*dc.TotalSMSUsage"},
|
|
{"tag": "TotalCost", "path": "*trl.TotalCost", "type": "*variable", "value": "~*dc.TotalCost{*round:4}"},
|
|
],
|
|
},
|
|
{
|
|
"id": "FwvExporter",
|
|
"type": "*file_fwv",
|
|
"export_path": "/tmp/testFWV",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "TypeOfRecord", "path": "*hdr.TypeOfRecord", "type": "*constant",
|
|
"value": "10", "width": 2},
|
|
{"tag": "Filler1", "path": "*hdr.Filler1", "type": "*filler", "width": 3},
|
|
{"tag": "DistributorCode", "path": "*hdr.DistributorCode",
|
|
"type": "*constant", "value": "VOI","width": 3},
|
|
{"tag": "FileCreationTime", "path": "*hdr.FileCreationTime",
|
|
"type": "*variable","value":"~*dc.TimeNow{*time_string:020106150400}",
|
|
"width": 12 },
|
|
{"tag": "FileVersion", "path": "*hdr.FileVersion", "type": "*constant",
|
|
"value": "01","width": 2},
|
|
{"tag": "Filler2", "path": "*hdr.Filler2", "type": "*filler",
|
|
"width": 105},
|
|
|
|
{"tag": "TypeOfRecord", "path": "*exp.TypeOfRecord", "type": "*constant",
|
|
"value": "20","width": 2},
|
|
{"tag": "Account", "path": "*exp.Account", "type": "*variable",
|
|
"value": "~*req.Account","width": 12,"strip": "*left","padding": "*right"},
|
|
{"tag": "Subject", "path": "*exp.Subject", "type": "*variable",
|
|
"value": "~*req.Subject","width": 5,"strip": "*left","padding": "*right"},
|
|
{"tag": "CLI", "path": "*exp.CLI", "type": "*constant",
|
|
"value": "cli","width": 15,"strip": "*xright","padding": "*right"},
|
|
{"tag": "Destination", "path": "*exp.Destination", "type": "*variable",
|
|
"value": "~*req.Destination","width": 24,"strip": "*xright","padding": "*right"},
|
|
{"tag": "ToR", "path": "*exp.ToR", "type": "*constant", "value": "02","width": 2},
|
|
{"tag": "SubtypeTOR", "path": "*exp.SubtypeTOR", "type": "*constant", "value": "11",
|
|
"width": 4, "padding": "*right"},
|
|
{"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable",
|
|
"value": "~*req.SetupTime{*time_string:020106150400}", "width": 12, "padding": "*right","strip": "*right"},
|
|
{"tag": "Duration", "path": "*exp.Duration", "type": "*variable", "value": "~*req.Usage",
|
|
"width": 6, "strip": "*right","padding": "*right","layout": "seconds"},
|
|
{"tag": "DataVolume", "path": "*exp.DataVolume", "type": "*filler","width": 6},
|
|
{"tag": "TaxCode", "path": "*exp.TaxCode", "type": "*constant","value":"1","width": 1},
|
|
{"tag": "OperatorCode", "path": "*exp.OperatorCode", "type": "*constant","value":"opercode",
|
|
"width": 2, "strip": "*right", "padding": "*right"},
|
|
{"tag": "ProductId", "path": "*exp.ProductId", "type": "*variable","value":"~*req.ProductId",
|
|
"width": 5, "strip": "*right", "padding": "*right"},
|
|
{"tag": "NetworkId", "path": "*exp.NetworkId", "type": "*constant","value":"3", "width": 1},
|
|
{"tag": "CallId", "path": "*exp.CallId", "type": "*variable","value":"~*req.OriginID",
|
|
"width": 16, "padding": "*right"},
|
|
{"tag": "Filler1", "path": "*exp.Filler1", "type": "*filler", "width": 8},
|
|
{"tag": "Filler2", "path": "*exp.Filler2", "type": "*filler", "width": 8},
|
|
{"tag": "TerminationCode", "path": "*exp.TerminationCode", "type": "*variable",
|
|
"value":"~*req.Operator;~*req.Product", "width": 5,"strip": "*right","padding": "*right"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:5}",
|
|
"width": 9, "padding": "*zeroleft"},
|
|
{"tag": "DestinationPrivacy", "path": "*exp.DestinationPrivacy", "type": "*masked_destination",
|
|
"width": 1},
|
|
|
|
{"tag": "TypeOfRecord", "path": "*trl.TypeOfRecord", "type": "*constant",
|
|
"value": "90", "width": 2},
|
|
{"tag": "Filler1", "path": "*trl.Filler1", "type": "*filler", "width": 3},
|
|
{"tag": "DistributorCode", "path": "*trl.DistributorCode",
|
|
"type": "*constant", "value": "VOI","width": 3},
|
|
{"tag": "NumberOfRecords", "path": "*trl.NumberOfRecords",
|
|
"type": "*variable", "value": "~*dc.NumberOfEvents","width": 6,"padding": "*zeroleft"},
|
|
{"tag": "CdrsDuration", "path": "*trl.CdrsDuration", "type": "*variable",
|
|
"value": "~*dc.TotalDuration","width": 8,"padding":"*zeroleft","layout": "seconds"},
|
|
{"tag": "FirstCdrTime", "path": "*trl.FirstCdrTime", "type": "*variable",
|
|
"value": "~*dc.FirstEventATime{*time_string:020106150400}", "width": 12},
|
|
{"tag": "LastCdrTime", "path": "*hdr.LastCdrTime", "type": "*variable",
|
|
"value": "~*dc.LastEventATime{*time_string:020106150400}", "width": 12,},
|
|
{"tag": "Filler2", "path": "*trl.Filler2", "type": "*filler",
|
|
"width": 93}
|
|
],
|
|
},
|
|
{
|
|
"id": "HTTPPostExporter",
|
|
"type": "*http_post",
|
|
"export_path": "http://127.0.0.1:12080/event_http",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"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": "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": "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"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
{"tag": "HTTPHeader", "path": "*hdr.Origin", "type": "*constant", "value": "http://www.cgrates.org"},
|
|
],
|
|
},
|
|
{
|
|
"id": "HTTPJsonMapExporter",
|
|
"type": "*http_json_map",
|
|
"export_path": "http://127.0.0.1:12081/event_json_map_http",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"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": "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": "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"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
{"tag": "EvenType", "path": "*exp.EventType", "type": "*variable", "value": "~*opts.*eventType"},
|
|
{"tag": "HTTPHeader", "path": "*hdr.Origin", "type": "*constant", "value": "http://www.cgrates.org"},
|
|
],
|
|
},
|
|
{
|
|
"id": "CSVMaskedDestination",
|
|
"type": "*file_csv",
|
|
"export_path": "/tmp/testCSVMasked",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"field_separator": ",",
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"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": "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": "*masked_destination",
|
|
"value": "~*req.Destination", "mask_destinationd_id": "MASKED_DESTINATIONS", "mask_length": 3},
|
|
{"tag": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
],
|
|
},
|
|
{
|
|
"id": "RouteExporter", // this exporter will set the Cost Account and RunID in cache so we can use it in other exports
|
|
"type": "*virt",
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"fields":[
|
|
{"tag": "Cost", "path": "*uch.<~*req.CGRID;~*req.RunID;-Cost>", "type": "*variable",
|
|
"value": "~*req.Cost", "rounding_decimals": 4},
|
|
{"tag": "Account", "path": "*uch.<~*req.CGRID;~*req.RunID;-Account>", "type": "*variable", "value": "~*req.Account"},
|
|
{"tag": "RunID", "path": "*uch.<~*req.CGRID;~*req.RunID;-RunID>", "type": "*variable", "value": "~*req.RunID"},
|
|
{"tag": "CustomVariable", "path": "*uch.<~*req.CGRID;~*req.RunID;-CustomVariable>",
|
|
"type": "*variable", "value": "CustomValue"}
|
|
],
|
|
},
|
|
{
|
|
"id": "CSVExporterFromVirt",
|
|
"type": "*file_csv",
|
|
"export_path": "/tmp/testCSVfromVirt",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"field_separator": ",",
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"tag": "OriginID", "path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
|
|
{"tag": "Tenant", "path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"},
|
|
{"tag": "Account", "path": "*exp.Account", "type": "*variable", "value": "~*req.Account"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost", "rounding_decimals": 4},
|
|
{"tag": "SupplierCustomVariable","filters": ["*exists:~*uch.<~*req.CGRID;~*req.RunID;-CustomVariable>:"],
|
|
"path": "*exp.SupplierCustomVariable", "type": "*variable", "value": "~*uch.<`~*req.CGRID;~*req.RunID;-CustomVariable`>"},
|
|
{"tag": "SupplierCost","filters": ["*exists:~*uch.<~*req.CGRID;~*req.RunID;-Cost>:"],
|
|
"path": "*exp.SupplierCost", "type": "*variable", "value": "~*uch.<`~*req.CGRID;~*req.RunID;-Cost`>"},
|
|
{"tag": "SupplierRun","filters": ["*exists:~*uch.<~*req.CGRID;~*req.RunID;-RunID>:"],
|
|
"path": "*exp.SupplierRun", "type": "*variable", "value": "~*uch.<`~*req.CGRID;~*req.RunID;-RunID`>"},
|
|
],
|
|
},
|
|
{
|
|
"id": "CSVExporterWIthTemplate",
|
|
"type": "*file_csv",
|
|
"export_path": "/tmp/testCSVExpTemp",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
"field_separator": ",",
|
|
"fields":[
|
|
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
|
|
],
|
|
},
|
|
{
|
|
"id": "ElasticsearchExporter",
|
|
"type": "*elastic",
|
|
"export_path": "http://localhost:9200",
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
"opts": {
|
|
"elsIndex": "cdrs",
|
|
//"elsIfPrimaryTerm": 0,
|
|
//"elsIfSeqNo": 0,
|
|
"elsOpType": "",
|
|
"elsPipeline": "",
|
|
"require_alias": "",
|
|
"elsRouting": "",
|
|
"elsTimeout": 0,
|
|
//"elsVersion": 0,
|
|
"elsVersionType": "",
|
|
"elsWaitForActiveShards": "",
|
|
},
|
|
"fields":[
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"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": "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": "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"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
],
|
|
},
|
|
{
|
|
"id": "HTTPJsonMapExporterWithNoFields",
|
|
"type": "*http_json_map",
|
|
"export_path": "http://127.0.0.1:12081/event_json_map_http",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
},
|
|
{
|
|
"id": "ElasticExporterWithNoFields",
|
|
"type": "*elastic",
|
|
"export_path": "http://localhost:9200",
|
|
"tenant": "cgrates.org",
|
|
"attempts": 1,
|
|
},
|
|
{
|
|
"id": "HTTPPostExporterWithNoFields",
|
|
"type": "*http_post",
|
|
"export_path": "http://127.0.0.1:12080/event_http",
|
|
"tenant": "cgrates.org",
|
|
"flags": ["*attributes"],
|
|
"attribute_context": "customContext",
|
|
"attempts": 1,
|
|
},
|
|
{
|
|
"id": "SQLExporterFull",
|
|
"type": "*sql",
|
|
"tenant": "cgrates.org",
|
|
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
|
"attempts": 1,
|
|
"opts": {
|
|
"sqlDBName": "exportedDatabase", // if dbName is not present "cgrates" will be used as default
|
|
"sqlTableName": "expTable", // tableName is mandatory in opts for sql exporter
|
|
"maxIdleConns": "disable",
|
|
"sqlMaxIdleConns": "10",
|
|
"sqlMaxOpenConns": "100",
|
|
"sqlMaxConnLifetime": "0",
|
|
},
|
|
"fields":[ // in case that the path is *exp.*row user must complete all the fields one to one with his sql schema in the correct order
|
|
{"tag": "CGRID", "path": "*exp.*row", "type": "*group", "value": "~*req.CGRID"},
|
|
{"tag": "AnswerTime", "path": "*exp.*row", "type": "*group", "value": "~*req.AnswerTime"},
|
|
{"tag": "Usage", "path": "*exp.*row", "type": "*group", "value": "~*req.Usage"},
|
|
{"tag": "Cost", "path": "*exp.*row", "type": "*group", "value": "~*req.Cost{*round:4}"},
|
|
]
|
|
},
|
|
{
|
|
"id": "SQLExporterPartial",
|
|
"type": "*sql",
|
|
"tenant": "cgrates.org",
|
|
"export_path": "mysql://cgrates:CGRateS.org@127.0.0.1:3306",
|
|
"attempts": 1,
|
|
"opts": {
|
|
"sqlDBName": "exportedDatabase",
|
|
"sqlTableName": "expTable",
|
|
"maxIdleConns": "disable",
|
|
"sqlMaxIdleConns": "10",
|
|
"sqlMaxOpenConns": "100",
|
|
"sqlMaxConnLifetime": "0",
|
|
},
|
|
"fields":[ // the path constains *exp.columnName
|
|
{"tag": "CGRID", "path": "*exp.cgrid", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "AnswerTime", "path": "*exp.answer_time", "type": "*variable", "value": "~*req.AnswerTime"},
|
|
{"tag": "Cost", "path": "*exp.cost", "type": "*variable", "value": "~*req.Cost{*round:4}"},
|
|
]
|
|
}
|
|
]
|
|
},
|
|
|
|
|
|
"apiers": {
|
|
"enabled": true,
|
|
"scheduler_conns": ["*internal"],
|
|
},
|
|
|
|
|
|
"templates": {
|
|
"requiredFields": [
|
|
{"tag": "CGRID", "path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
|
|
{"tag": "RunID", "path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
|
|
{"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": "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": "SetupTime", "path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "AnswerTime", "path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
|
{"tag": "Usage", "path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
|
|
{"tag": "Cost", "path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost{*round:4}"}
|
|
],
|
|
},
|
|
|
|
|
|
}
|