Updated ers config

This commit is contained in:
Trial97
2021-04-27 17:19:57 +03:00
committed by Dan Christian Bogos
parent 33d89a4098
commit 5105d3aa85
35 changed files with 1019 additions and 994 deletions

View File

@@ -117,7 +117,7 @@
// "sqlMaxIdleConns": 10, // maximum database connections idle, not applying for mongo
// "sqlConnMaxLifetime": 0, // maximum amount of time in seconds a connection may be reused (0 for unlimited), not applying for mongo
// "mongoQueryTimeout":"10s",
// "sslmode":"disable", // sslmode in case of *postgres
// "sslMode":"disable", // sslmode in case of *postgres
// "mysqlLocation": "Local", // the location the time from mysql is retrived
// },
// "items":{
@@ -340,20 +340,35 @@
// {
// "id": "*default", // identifier of the EventReader profile
// "type": "*none", // reader type <*file_csv>
// "row_length" : 0, // Number of fields from csv file
// "field_separator": ",", // separator used in case of csv files
// "header_define_character": ":", // the starting character for header definition used in case of CSV files
// "run_delay": "0", // sleep interval in seconds between consecutive runs, -1 to use automation via inotify or 0 to disable running all together
// "concurrent_requests": 1024, // maximum simultaneous requests/files to process, 0 for unlimited
// "source_path": "/var/spool/cgrates/ers/in", // read data from this path
// "processed_path": "/var/spool/cgrates/ers/out", // move processed data here
// "opts": {
// // FileCSV and PartialCSV
// "csvRowLength": 0, // Number of fields from csv file
// "csvFieldSeparator": ",", // separator used when reading the fields
// "csvHeaderDefineChar": ":", // the starting character for header definition used in case of CSV files
// // "csvLazyQuotes": false, // if a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field
// // PartialCSV
// "csvCacheExpiryAction": "*post_cdr", // the action that will be exeuted for the partial CSVs that are not matched<*post_cdr|*dump_to_file>
// // "csvRecordCacheTTL": "1s" // Duration to cache partial records when not pairing
// // FlatStore
// "fstRowLength": 0, // Number of fields from csv file
// "fstFieldSeparator": ",", // separator used when reading the fields
// // "fstFailedCallsPrefix": "" // Used in case of flatstore CDRs to avoid searching for BYE records
// // "fstRecordCacheTTL": "1s" // Duration to cache partial records when not pairing
// // "fstLazyQuotes": false, // if a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field
// // FileXML
// "xmlRootPath": "", // path towards one event in case of XML CDRs
// // "queueID": "cgrates_cdrs", // the queue id for AMQP, AMQPv1, SQS and S3 readers from were the events are read
// // "queueIDProcessed": "", // the queue id for AMQP, AMQPv1, SQS and S3 readers were the events are sent after they are processed
// // FileCSV, FlatStore and PartialCSV
// // "lazyQuotes": false, // if a quote may appear in an unquoted field and a non-doubled quote may appear in a quoted field
// // AMQP
// // "consumerTag": "cgrates", // the ID of the consumer
// // "amqpExchange": "",
@@ -391,10 +406,9 @@
// // "awsKeyProcessed": "",
// // "awsSecretProcessed": "",
// // "awsTokenProcessed": "",
// // "folderPathProcessed": "", // only for S3 event posting
// // "s3FolderPathProcessed": "", // only for S3 event posting
// },
// "xml_root_path": "", // path towards one event in case of XML CDRs
// "tenant": "", // tenant used by import
// "timezone": "", // timezone for timestamps where not specified <""|UTC|Local|$IANA_TZ_DB>
// "filters": [], // limit parsing based on the filters

View File

@@ -396,7 +396,7 @@
"opts": {
"sqlDBName": "exportedDatabase", // if dbName is not present "cgrates" will be used as default
"sqlTableName": "expTable", // tableName is mandatory in opts for sql exporter
"sslmode": "disable",
"sslMode": "disable",
"sqlMaxIdleConns": "10",
"sqlMaxOpenConns": "100",
"sqlMaxConnLifetime": "0",
@@ -417,7 +417,7 @@
"opts": {
"sqlDBName": "exportedDatabase",
"sqlTableName": "expTable",
"sslmode": "disable",
"sslMode": "disable",
"sqlMaxIdleConns": "10",
"sqlMaxOpenConns": "100",
"sqlMaxConnLifetime": "0",

View File

@@ -90,7 +90,9 @@
{
"id": "file_reader2",
"run_delay": "-1",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"type": "*file_csv",
"source_path": "/tmp/ers2/in",
"flags": ["*dryrun"],
@@ -115,7 +117,6 @@
{
"id": "init_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/init_session/in",
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
@@ -137,7 +138,6 @@
{
"id": "terminate_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/terminate_session/in",
"flags": ["*terminate","*accounts","*resources","*log"],
@@ -152,7 +152,6 @@
{
"id": "create_cdr",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/cdrs/in",
"flags": ["*cdrs","*log"],
@@ -177,7 +176,9 @@
"id": "file_reader_with_filters",
"run_delay": "-1",
"type": "*file_csv",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"source_path": "/tmp/ers_with_filters/in",
"processed_path": "/tmp/ers_with_filters/out",
"flags": ["*cdrs","*log"],
@@ -207,7 +208,9 @@
"source_path": "/tmp/xmlErs/in",
"flags": ["*cdrs","*log"],
"processed_path": "/tmp/xmlErs/out",
"xml_root_path": "broadWorksCDR.cdrData",
"opts": {
"xmlRootPath": "broadWorksCDR.cdrData",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
@@ -261,8 +264,10 @@
"source_path": "/tmp/partErs1/in",
"flags": ["*cdrs"],
"processed_path": "/tmp/partErs1/out",
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*dump_to_file",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*dump_to_file",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -302,8 +307,10 @@
"source_path": "/tmp/partErs2/in",
"processed_path": "/tmp/partErs2/out",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*post_cdr",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*post_cdr",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -329,12 +336,14 @@
"enabled": true,
"run_delay": "-1",
"type": "*flatstore",
"field_separator": "|",
"opts": {
"fstFieldSeparator":"|",
"fstFailedCallsPrefix": "missed_calls",
"fstRecordCacheTTL": "500ms",
},
"source_path": "/tmp/flatstoreErs/in",
"processed_path": "/tmp/flatstoreErs/out",
"failed_calls_prefix": "missed_calls",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"fields":[
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
@@ -375,7 +384,6 @@
{
"id": "readerWithTemplate",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/readerWithTemplate/in",
"flags": ["*cdrs","*log"],

View File

@@ -91,7 +91,9 @@
{
"id": "file_reader2",
"run_delay": "-1",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"type": "*file_csv",
"source_path": "/tmp/ers2/in",
"flags": ["*dryrun"],
@@ -116,7 +118,6 @@
{
"id": "init_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/init_session/in",
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
@@ -138,7 +139,6 @@
{
"id": "terminate_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/terminate_session/in",
"flags": ["*terminate","*accounts","*resources","*log"],
@@ -153,7 +153,6 @@
{
"id": "create_cdr",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/cdrs/in",
"flags": ["*cdrs","*log"],
@@ -178,7 +177,9 @@
"id": "file_reader_with_filters",
"run_delay": "-1",
"type": "*file_csv",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"source_path": "/tmp/ers_with_filters/in",
"processed_path": "/tmp/ers_with_filters/out",
"flags": ["*cdrs","*log"],
@@ -208,7 +209,9 @@
"source_path": "/tmp/xmlErs/in",
"flags": ["*cdrs","*log"],
"processed_path": "/tmp/xmlErs/out",
"xml_root_path": "broadWorksCDR.cdrData",
"opts": {
"xmlRootPath": "broadWorksCDR.cdrData",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
@@ -262,8 +265,10 @@
"source_path": "/tmp/partErs1/in",
"flags": ["*cdrs"],
"processed_path": "/tmp/partErs1/out",
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*dump_to_file",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*dump_to_file",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -303,8 +308,10 @@
"source_path": "/tmp/partErs2/in",
"processed_path": "/tmp/partErs2/out",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*post_cdr",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*post_cdr",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -330,12 +337,14 @@
"enabled": true,
"run_delay": "-1",
"type": "*flatstore",
"field_separator": "|",
"opts": {
"fstFieldSeparator":"|",
"fstFailedCallsPrefix": "missed_calls",
"fstRecordCacheTTL": "500ms",
},
"source_path": "/tmp/flatstoreErs/in",
"processed_path": "/tmp/flatstoreErs/out",
"failed_calls_prefix": "missed_calls",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"fields":[
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
@@ -376,7 +385,6 @@
{
"id": "readerWithTemplate",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/readerWithTemplate/in",
"flags": ["*cdrs","*log"],

View File

@@ -88,7 +88,9 @@
{
"id": "file_reader2",
"run_delay": "-1",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"type": "*file_csv",
"source_path": "/tmp/ers2/in",
"flags": ["*dryrun"],
@@ -113,7 +115,6 @@
{
"id": "init_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/init_session/in",
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
@@ -135,7 +136,6 @@
{
"id": "terminate_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/terminate_session/in",
"flags": ["*terminate","*accounts","*resources","*log"],
@@ -150,7 +150,6 @@
{
"id": "create_cdr",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/cdrs/in",
"flags": ["*cdrs","*log"],
@@ -175,7 +174,9 @@
"id": "file_reader_with_filters",
"run_delay": "-1",
"type": "*file_csv",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"source_path": "/tmp/ers_with_filters/in",
"processed_path": "/tmp/ers_with_filters/out",
"flags": ["*cdrs","*log"],
@@ -205,7 +206,9 @@
"source_path": "/tmp/xmlErs/in",
"flags": ["*cdrs","*log"],
"processed_path": "/tmp/xmlErs/out",
"xml_root_path": "broadWorksCDR.cdrData",
"opts": {
"xmlRootPath": "broadWorksCDR.cdrData",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
@@ -259,8 +262,10 @@
"source_path": "/tmp/partErs1/in",
"flags": ["*cdrs"],
"processed_path": "/tmp/partErs1/out",
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*dump_to_file",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*dump_to_file",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -300,8 +305,10 @@
"source_path": "/tmp/partErs2/in",
"processed_path": "/tmp/partErs2/out",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*post_cdr",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*post_cdr",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -327,12 +334,14 @@
"enabled": true,
"run_delay": "-1",
"type": "*flatstore",
"field_separator": "|",
"opts": {
"fstFieldSeparator":"|",
"fstFailedCallsPrefix": "missed_calls",
"fstRecordCacheTTL": "500ms",
},
"source_path": "/tmp/flatstoreErs/in",
"processed_path": "/tmp/flatstoreErs/out",
"failed_calls_prefix": "missed_calls",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"fields":[
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
@@ -373,7 +382,6 @@
{
"id": "readerWithTemplate",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/readerWithTemplate/in",
"flags": ["*cdrs","*log"],

View File

@@ -85,7 +85,9 @@
{
"id": "file_reader2",
"run_delay": "-1",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"type": "*file_csv",
"source_path": "/tmp/ers2/in",
"flags": ["*dryrun"],
@@ -110,7 +112,6 @@
{
"id": "init_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/init_session/in",
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
@@ -132,7 +133,6 @@
{
"id": "terminate_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/terminate_session/in",
"flags": ["*terminate","*accounts","*resources","*log"],
@@ -147,7 +147,6 @@
{
"id": "create_cdr",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/cdrs/in",
"flags": ["*cdrs","*log"],
@@ -172,7 +171,9 @@
"id": "file_reader_with_filters",
"run_delay": "-1",
"type": "*file_csv",
"field_separator": ";",
"opts": {
"csvFieldSeparator":";"
},
"source_path": "/tmp/ers_with_filters/in",
"processed_path": "/tmp/ers_with_filters/out",
"flags": ["*cdrs","*log"],
@@ -202,7 +203,9 @@
"source_path": "/tmp/xmlErs/in",
"flags": ["*cdrs","*log"],
"processed_path": "/tmp/xmlErs/out",
"xml_root_path": "broadWorksCDR.cdrData",
"opts": {
"xmlRootPath": "broadWorksCDR.cdrData",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable", "value": "~*req.broadWorksCDR.cdrData.basicModule.localCallId", "mandatory": true},
@@ -256,8 +259,10 @@
"source_path": "/tmp/partErs1/in",
"flags": ["*cdrs"],
"processed_path": "/tmp/partErs1/out",
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*dump_to_file",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*dump_to_file",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -297,8 +302,10 @@
"source_path": "/tmp/partErs2/in",
"processed_path": "/tmp/partErs2/out",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"partial_cache_expiry_action": "*post_cdr",
"opts": {
"csvRecordCacheTTL": "500ms",
"csvCacheExpiryAction": "*post_cdr",
},
"fields":[
{"tag": "ToR", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "AccId1", "path": "*cgreq.OriginID", "type": "*composed", "value": "~*req.0"},
@@ -324,12 +331,14 @@
"enabled": true,
"run_delay": "-1",
"type": "*flatstore",
"field_separator": "|",
"opts": {
"fstFieldSeparator":"|",
"fstFailedCallsPrefix": "missed_calls",
"fstRecordCacheTTL": "500ms",
},
"source_path": "/tmp/flatstoreErs/in",
"processed_path": "/tmp/flatstoreErs/out",
"failed_calls_prefix": "missed_calls",
"flags": ["*cdrs"],
"partial_record_cache": "500ms",
"fields":[
{"tag": "Tor", "path": "*cgreq.ToR", "type": "*constant", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "*cgreq.OriginID", "type": "*variable","value":"~*req.3;~*req.1;~*req.2", "mandatory": true},
@@ -370,7 +379,6 @@
{
"id": "readerWithTemplate",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/readerWithTemplate/in",
"flags": ["*cdrs","*log"],

View File

@@ -79,11 +79,13 @@
{
"id": "file_reader2",
"run_delay": "-1",
"field_separator": ";",
"type": "*file_csv",
"source_path": "/tmp/ers2/in",
"flags": ["*cdrs","*log"],
"processed_path": "/tmp/ers2/out",
"opts": {
"csvFieldSeparator":";"
},
"content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
{"tag": "ToR", "path": "ToR", "type": "*variable", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},

View File

@@ -79,11 +79,13 @@
{
"id": "file_reader2",
"run_delay": "-1",
"field_separator": ";",
"type": "*file_csv",
"source_path": "/tmp/ers2/in",
"flags": ["*dryrun"],
"processed_path": "/tmp/ers2/out",
"opts": {
"csvFieldSeparator":";"
},
"content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
{"tag": "ToR", "path": "ToR", "type": "*variable", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},
@@ -104,7 +106,6 @@
{
"id": "init_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/init_session/in",
"flags": ["*initiate","*accounts","*resources","*attributes","*log"],
@@ -126,7 +127,6 @@
{
"id": "terminate_session",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/terminate_session/in",
"flags": ["*terminate","*accounts","*resources","*log"],
@@ -141,7 +141,6 @@
{
"id": "create_cdr",
"run_delay": "-1",
"field_separator": ",",
"type": "*file_csv",
"source_path": "/tmp/cdrs/in",
"flags": ["*cdrs","*log"],
@@ -166,12 +165,13 @@
"id": "file_reader_with_filters",
"run_delay": "-1",
"type": "*file_csv",
"flags": ["*dryrun"],
"field_separator": ";",
"source_path": "/tmp/ers_with_filters/in",
"processed_path": "/tmp/ers_with_filters/out",
"flags": ["*cdrs","*log"],
"filters":["*string:~*req.3:1002"],
"opts": {
"csvFieldSeparator":";"
},
"content_fields":[ // import content_fields template, tag will match internally CDR field, in case of .csv value will be represented by index of the field value
{"tag": "ToR", "path": "ToR", "type": "*variable", "value": "*voice", "mandatory": true},
{"tag": "OriginID", "path": "OriginID", "type": "*variable", "value": "~*req.0", "mandatory": true},