Files
cgrates/data/conf/samples/cdrsonexpmaster_mongo/cdrsreplicationmaster.json
2020-03-18 09:48:53 +01:00

139 lines
5.4 KiB
JSON

{
// CGRateS Configuration file
//
// Used in apier_local_tests
// Starts rater, cdrs and mediator connecting over internal channel
"general": {
"log_level": 7,
"poster_attempts": 1,
"failed_posts_ttl": "1",
},
"data_db": {
"db_type": "mongo",
"db_name": "10",
"db_port": 27017,
},
"stor_db": {
"db_type": "mongo",
"db_name": "cgrates",
"db_port": 27017,
},
"rals": {
"enabled": true, // enable Rater service: <true|false>
},
"cdrs": {
"enabled": true, // start the CDR Server service: <true|false>
"store_cdrs": false, // store cdrs in storDb
"chargers_conns":["*internal"],
"rals_conns": ["*internal"],
"online_cdr_exports": ["http_localhost", "amqp_localhost", "http_test_file", "amqp_test_file","aws_test_file","sqs_test_file","kafka_localhost","s3_test_file"],
},
"chargers": {
"enabled": true,
},
"cdre": {
"http_localhost": {
"export_format": "*http_post",
"export_path": "http://127.0.0.1:12080/cdr_http",
"fields": [ // template of the exported content fields
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
{"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
{"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"},
{"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
{"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"},
{"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"},
{"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"},
{"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"},
{"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"},
{"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"},
{"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"},
{"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
{"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
{"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
{"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"},
],
},
"amqp_localhost": {
"export_format": "*amqp_json_map",
"export_path": "amqp://guest:guest@localhost:5672/?queue_id=cgrates_cdrs&exchange=exchangename&exchange_type=fanout&routing_key=cgr_cdrs",
"attempts": 3,
"fields": [ // template of the exported content fields
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
{"path": "*exp.RunID", "type": "*variable", "value": "~*req.RunID"},
{"path": "*exp.ToR", "type": "*variable", "value": "~*req.ToR"},
{"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
{"path": "*exp.OriginHost", "type": "*variable", "value": "~*req.OriginHost"},
{"path": "*exp.RequestType", "type": "*variable", "value": "~*req.RequestType"},
{"path": "*exp.Tenant", "type": "*variable", "value": "~*req.Tenant"},
{"path": "*exp.Category", "type": "*variable", "value": "~*req.Category"},
{"path": "*exp.Account", "type": "*variable", "value": "~*req.Account"},
{"path": "*exp.Subject", "type": "*variable", "value": "~*req.Subject"},
{"path": "*exp.Destination", "type": "*variable", "value": "~*req.Destination"},
{"path": "*exp.SetupTime", "type": "*variable", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"},
{"path": "*exp.AnswerTime", "type": "*variable", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
{"path": "*exp.Usage", "type": "*variable", "value": "~*req.Usage"},
{"path": "*exp.Cost", "type": "*variable", "value": "~*req.Cost"},
],
},
"http_test_file": {
"export_format": "*http_post",
"export_path": "http://127.0.0.1:12080/invalid",
"fields": [
{"path": "*exp.OriginID", "type": "*variable", "value": "~*req.OriginID"},
],
},
"aws_test_file": {
"export_format": "*amqpv1_json_map",
"export_path": "amqps://guest:guest@localhost:25672/?queue_id=cgrates_cdrs",
"fields": [
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
],
},
"sqs_test_file": {
"export_format": "*sqs_json_map",
// export_path for sqs: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs"
"export_path": "http://sqs.eu-west-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs",
"fields": [
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
],
},
"amqp_test_file": {
"export_format": "*amqp_json_map",
"export_path": "amqp://guest:guest@localhost:25672/?queue_id=cgrates_cdrs",
"fields": [
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
],
},
"kafka_localhost": {
"export_format": "*kafka_json_map",
"export_path": "localhost:9092?topic=cgrates_cdrs",
"fields": [
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
],
},
"s3_test_file": {
"export_format": "*s3_json_map",
// export_path for s3: "endpoint?aws_region=region&aws_key=IDkey&aws_secret=secret&aws_token=sessionToken&queue_id=cgrates-cdrs"
"export_path": "http://s3.us-east-2.amazonaws.com/?aws_region=eu-west-2&aws_key=testkey&aws_secret=testsecret&queue_id=cgrates-cdrs",
"fields": [
{"path": "*exp.CGRID", "type": "*variable", "value": "~*req.CGRID"},
],
},
},
"apiers": {
"enabled": true,
},
}