Files
cgrates/data/conf/samples/cdrsexport_mongo/cgrates.json
2021-07-06 20:51:32 +02:00

166 lines
4.0 KiB
JSON

{
// Sample CGRateS Configuration file for EEs
//
// Copyright (C) ITsysCOM GmbH
"general": {
"log_level": 7,
"poster_attempts": 2,
"failed_posts_dir": "/var/spool/cgrates/failed_posts2",
"failed_posts_ttl": "1s"
},
"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
},
"attributes": {
"enabled": true,
},
"chargers": {
"enabled": true,
"attributes_conns": ["*internal"],
},
"cdrs": {
"enabled": true,
"chargers_conns":["*internal"],
"rals_conns": ["*internal"],
"session_cost_retries": 0,
"online_cdr_exports": ["http_localhost", "amqp_localhost", "aws_test_file", "sqs_test_file", "kafka_localhost", "s3_test_file"],
"ees_conns": ["*localhost"]
},
"ees": {
"enabled": true,
"exporters": [
{
"id": "http_localhost",
"type": "*httpPost",
"export_path": "http://127.0.0.1:12081/cdr_http",
"attempts": 1,
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
},
{
"id": "amqp_localhost",
"type": "*amqpJSONMap",
"export_path": "amqp://guest:guest@localhost:5672/",
"opts": {
"amqpQueueID": "cgrates_cdrs",
"amqpExchange": "exchangename",
"amqpExchangeType": "fanout",
"amqpRoutingKey": "cgr_cdrs",
},
"attempts": 20,
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
},
{
"id": "aws_test_file",
"type": "*amqpv1JSONMap",
"export_path": "amqps://guest:guest@localhost:95672/",
"opts": {
"amqpQueueID": "cgrates_cdrs",
},
"attempts": 1,
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
},
{
"id": "sqs_test_file",
"type": "*sqsJSONMap",
// export_path for sqs: "endpoint"
"export_path": "http://sqs.eu-west-2.amazonaws.com/",
"opts": {
// posible options for sqs:
"awsRegion": "eu-west-2",
"awsKey": "testkey",
"awsSecret": "testsecret",
"sqsQueueID": "cgrates-cdrs",
},
"attempts": 1,
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
},
{
"id": "kafka_localhost",
"type": "*kafkaJSONMap",
"export_path": "127.0.0.1:9092",
"opts":{
"kafkaTopic": "cgrates_cdrs",
},
"attempts": 10,
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
},
{
"id": "s3_test_file",
"type": "*s3JSONMap",
// export_path for s3: "endpoint"
"export_path": "http://s3.us-east-2.amazonaws.com/",
"opts": {
// posible options for s3:
"awsRegion": "eu-west-2",
"awsKey": "testkey",
"awsSecret": "testsecret",
"s3BucketID": "cgrates-cdrs",
},
"attempts": 1,
"fields":[
{"tag": "RequiredTemplate","type": "*template", "value": "requiredFields"},
],
},
],
},
"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": "OrderID", "path": "*exp.OrderID", "type": "*variable", "value": "~*req.OrderID","filter":"*string:~*opts.AddOrderID:true"}
]
},
"admins": {
"enabled": true,
},
}