mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
Update config for internal dataDB
This commit is contained in:
committed by
Dan Christian Bogos
parent
85f73f2773
commit
ba71e7f234
@@ -62,9 +62,153 @@
|
||||
},
|
||||
|
||||
|
||||
"cache":{
|
||||
"destinations": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"reverse_destinations": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"rating_plans": {"limit": 10000, "ttl":"0s","precache": true},
|
||||
"rating_profiles": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"lcr_rules": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"cdr_stats": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"actions": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"action_plans": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"account_action_plans": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"action_triggers": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"shared_groups": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"aliases": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"reverse_aliases": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"derived_chargers": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"resource_profiles": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"resources": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"statqueues": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"statqueue_profiles": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"thresholds": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"threshold_profiles": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"filters": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"supplier_profiles": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"attribute_profiles": {"limit": 10000, "ttl":"0s", "precache": true},
|
||||
"resource_filter_indexes" :{"limit": 10000, "ttl":"0s"},
|
||||
"resource_filter_revindexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"stat_filter_indexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"stat_filter_revindexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"threshold_filter_indexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"threshold_filter_revindexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"supplier_filter_indexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"supplier_filter_revindexes" :{"limit": 10000, "ttl":"0s"},
|
||||
"attribute_filter_indexes" : {"limit": 10000, "ttl":"0s"},
|
||||
"attribute_filter_revindexes" : {"limit": 10000, "ttl":"0s"},
|
||||
},
|
||||
|
||||
|
||||
"rals": {
|
||||
"enabled": true,
|
||||
"thresholds_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"cdrstats_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"pubsubs_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"users_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
"aliases_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
"scheduler": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"cdrs": {
|
||||
"enabled": true,
|
||||
"cdrstats_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
"cdre": {
|
||||
"TestTutITExportCDR": {
|
||||
"content_fields": [
|
||||
{"tag": "CGRID", "type": "*composed", "value": "CGRID"},
|
||||
{"tag": "RunID", "type": "*composed", "value": "RunID"},
|
||||
{"tag":"OriginID", "type": "*composed", "value": "OriginID"},
|
||||
{"tag":"RequestType", "type": "*composed", "value": "RequestType"},
|
||||
{"tag":"Tenant", "type": "*composed", "value": "Tenant"},
|
||||
{"tag":"Category", "type": "*composed", "value": "Category"},
|
||||
{"tag":"Account", "type": "*composed", "value": "Account"},
|
||||
{"tag":"Destination", "type": "*composed", "value": "Destination"},
|
||||
{"tag":"AnswerTime", "type": "*composed", "value": "AnswerTime", "layout": "2006-01-02T15:04:05Z07:00"},
|
||||
{"tag":"Usage", "type": "*composed", "value": "Usage"},
|
||||
{"tag":"Cost", "type": "*composed", "value": "Cost", "rounding_decimals": 4},
|
||||
{"tag":"MatchedDestinationID", "type": "*composed", "value": "~CostDetails:s/\"MatchedDestId\":.*_(\\w{4})/${1}/:s/\"MatchedDestId\":\"INTERNAL\"/ON010/"},
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
"cdrstats": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"pubsubs": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"users": {
|
||||
"enabled": true,
|
||||
"indexes": ["Uuid"],
|
||||
},
|
||||
|
||||
|
||||
"resources": {
|
||||
"enabled": true,
|
||||
"store_interval": "1s",
|
||||
"thresholds_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
"stats": {
|
||||
"enabled": true,
|
||||
"store_interval": "1s",
|
||||
"thresholds_conns": [
|
||||
{"address": "*internal"}
|
||||
],
|
||||
},
|
||||
|
||||
|
||||
"thresholds": {
|
||||
"enabled": true,
|
||||
"store_interval": "1s",
|
||||
},
|
||||
|
||||
|
||||
"suppliers": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"attributes": { // Attribute service
|
||||
"enabled": true, // starts Alias service: <true|false>.
|
||||
},
|
||||
|
||||
|
||||
"aliases": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
|
||||
"sessions": {
|
||||
"enabled": true,
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -120,11 +120,11 @@ func ConfigureCdrStorage(db_type, host, port, name, user, pass string,
|
||||
d, err = NewMySQLStorage(host, port, name, user, pass, maxConn, maxIdleConn, connMaxLifetime)
|
||||
case utils.MONGO:
|
||||
d, err = NewMongoStorage(host, port, name, user, pass, utils.StorDB, cdrsIndexes, nil, 1)
|
||||
case utils.INTERNAL:
|
||||
case utils.MetaInternal:
|
||||
d, err = NewMapStorage()
|
||||
default:
|
||||
err = errors.New(fmt.Sprintf("Unknown db '%s' valid options are [%s, %s, %s, %s]",
|
||||
db_type, utils.MYSQL, utils.MONGO, utils.POSTGRES, utils.INTERNAL))
|
||||
db_type, utils.MYSQL, utils.MONGO, utils.POSTGRES, utils.MetaInternal))
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -142,11 +142,11 @@ func ConfigureStorDB(db_type, host, port, name, user, pass string,
|
||||
d, err = NewMySQLStorage(host, port, name, user, pass, maxConn, maxIdleConn, connMaxLifetime)
|
||||
case utils.MONGO:
|
||||
d, err = NewMongoStorage(host, port, name, user, pass, utils.StorDB, cdrsIndexes, nil, 1)
|
||||
case utils.INTERNAL:
|
||||
case utils.MetaInternal:
|
||||
d, err = NewMapStorage()
|
||||
default:
|
||||
err = errors.New(fmt.Sprintf("Unknown db '%s' valid options are [%s, %s, %s, %s]",
|
||||
db_type, utils.MYSQL, utils.MONGO, utils.POSTGRES, utils.INTERNAL))
|
||||
db_type, utils.MYSQL, utils.MONGO, utils.POSTGRES, utils.MetaInternal))
|
||||
}
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
@@ -100,14 +100,12 @@ func SetDBVersions(storage Storage) error {
|
||||
func (vers Versions) Compare(curent Versions, storType string) string {
|
||||
var x map[string]string
|
||||
switch storType {
|
||||
case utils.MONGO:
|
||||
case utils.MONGO, utils.MAPSTOR:
|
||||
x = allVers
|
||||
case utils.POSTGRES, utils.MYSQL:
|
||||
x = storDBVers
|
||||
case utils.REDIS:
|
||||
x = dataDBVers
|
||||
case utils.MAPSTOR:
|
||||
x = allVers
|
||||
}
|
||||
for y, val := range x {
|
||||
if vers[y] != curent[y] {
|
||||
@@ -190,7 +188,7 @@ func CurrentDBVersions(storType string) Versions {
|
||||
}
|
||||
|
||||
switch storType {
|
||||
case utils.MONGO, utils.MAPSTOR, utils.INTERNAL:
|
||||
case utils.MONGO, utils.MAPSTOR:
|
||||
return allVersions
|
||||
case utils.POSTGRES, utils.MYSQL:
|
||||
return storDbVersions
|
||||
|
||||
@@ -107,7 +107,6 @@ const (
|
||||
DataManager = "DataManager"
|
||||
REDIS = "redis"
|
||||
MAPSTOR = "mapstor"
|
||||
INTERNAL = "internal"
|
||||
LOCALHOST = "127.0.0.1"
|
||||
FSCDR_FILE_CSV = "freeswitch_file_csv"
|
||||
FSCDR_HTTP_JSON = "freeswitch_http_json"
|
||||
|
||||
Reference in New Issue
Block a user