{ // 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: }, "cdrs": { "enabled": true, // start the CDR Server service: "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", "eventcost_filter"], }, "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": "*composed", "value": "~*req.CGRID"}, {"path": "*exp.RunID", "type": "*composed", "value": "~*req.RunID"}, {"path": "*exp.ToR", "type": "*composed", "value": "~*req.ToR"}, {"path": "*exp.OriginID", "type": "*composed", "value": "~*req.OriginID"}, {"path": "*exp.OriginHost", "type": "*composed", "value": "~*req.OriginHost"}, {"path": "*exp.RequestType", "type": "*composed", "value": "~*req.RequestType"}, {"path": "*exp.Tenant", "type": "*composed", "value": "~*req.Tenant"}, {"path": "*exp.Category", "type": "*composed", "value": "~*req.Category"}, {"path": "*exp.Account", "type": "*composed", "value": "~*req.Account"}, {"path": "*exp.Subject", "type": "*composed", "value": "~*req.Subject"}, {"path": "*exp.Destination", "type": "*composed", "value": "~*req.Destination"}, {"path": "*exp.SetupTime", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, {"path": "*exp.AnswerTime", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, {"path": "*exp.Usage", "type": "*composed", "value": "~*req.Usage"}, {"path": "*exp.Cost", "type": "*composed", "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": "*composed", "value": "~*req.CGRID"}, {"path": "*exp.RunID", "type": "*composed", "value": "~*req.RunID"}, {"path": "*exp.ToR", "type": "*composed", "value": "~*req.ToR"}, {"path": "*exp.OriginID", "type": "*composed", "value": "~*req.OriginID"}, {"path": "*exp.OriginHost", "type": "*composed", "value": "~*req.OriginHost"}, {"path": "*exp.RequestType", "type": "*composed", "value": "~*req.RequestType"}, {"path": "*exp.Tenant", "type": "*composed", "value": "~*req.Tenant"}, {"path": "*exp.Category", "type": "*composed", "value": "~*req.Category"}, {"path": "*exp.Account", "type": "*composed", "value": "~*req.Account"}, {"path": "*exp.Subject", "type": "*composed", "value": "~*req.Subject"}, {"path": "*exp.Destination", "type": "*composed", "value": "~*req.Destination"}, {"path": "*exp.SetupTime", "type": "*composed", "value": "~*req.SetupTime", "layout": "2006-01-02T15:04:05Z07:00"}, {"path": "*exp.AnswerTime", "type": "*composed", "value": "~*req.AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"}, {"path": "*exp.Usage", "type": "*composed", "value": "~*req.Usage"}, {"path": "*exp.Cost", "type": "*composed", "value": "~*req.Cost"}, ], }, "http_test_file": { "export_format": "*http_post", "export_path": "http://127.0.0.1:12080/invalid", "fields": [ {"path": "*exp.OriginID", "type": "*composed", "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": "*composed", "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": "*composed", "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": "*composed", "value": "~*req.CGRID"}, ], }, "kafka_localhost": { "export_format": "*kafka_json_map", "export_path": "localhost:9092?topic=cgrates_cdrs", "fields": [ {"path": "*exp.CGRID", "type": "*composed", "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": "*composed", "value": "~*req.CGRID"}, ], }, "eventcost_filter": { "export_format": "*amqp_json_map", "export_path": "amqp://guest:guest@wrongurl:25672/?queue_id=cgrates_cdrs", "filters":["*string:~*ec.Cost:100"], "fields": [ {"path": "*exp.CGRID", "type": "*composed", "value": "~*req.CGRID"}, ], }, }, "apiers": { "enabled": true, }, }