Updated stats configuration

This commit is contained in:
Tripon Alexandru-Ionut
2019-04-05 16:26:50 +03:00
committed by Dan Christian Bogos
parent df3040a71f
commit 797c280597
5 changed files with 6 additions and 6 deletions

View File

@@ -484,7 +484,7 @@ const CGRATES_CFG_JSON = `
"stats": { // StatS config
"enabled": false, // starts Stat service: <true|false>.
"store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
"max_queue_lenght": 0, // used to compress data
"max_queue_length": 0, // used to compress data
"thresholds_conns": [], // connections to ThresholdS for StatUpdates, empty to disable thresholds functionality: <""|*internal|x.y.z.y:1234>
"indexed_selects":true, // enable profile matching exclusively on indexes
//"string_indexed_fields": [], // query indexes based on these fields for faster processing

View File

@@ -800,7 +800,7 @@ func TestDfStatServiceJsonCfg(t *testing.T) {
Enabled: utils.BoolPointer(false),
Indexed_selects: utils.BoolPointer(true),
Store_interval: utils.StringPointer(""),
Max_queue_lenght: utils.IntPointer(0),
Max_queue_length: utils.IntPointer(0),
Thresholds_conns: &[]*HaPoolJsonCfg{},
String_indexed_fields: nil,
Prefix_indexed_fields: &[]string{},

View File

@@ -437,7 +437,7 @@ type StatServJsonCfg struct {
Enabled *bool
Indexed_selects *bool
Store_interval *string
Max_queue_lenght *int
Max_queue_length *int
Thresholds_conns *[]*HaPoolJsonCfg
String_indexed_fields *[]string
Prefix_indexed_fields *[]string

View File

@@ -49,8 +49,8 @@ func (st *StatSCfg) loadFromJsonCfg(jsnCfg *StatServJsonCfg) (err error) {
return err
}
}
if jsnCfg.Max_queue_lenght != nil {
st.MaxQueueLenght = *jsnCfg.Max_queue_lenght
if jsnCfg.Max_queue_length != nil {
st.MaxQueueLenght = *jsnCfg.Max_queue_length
}
if jsnCfg.Thresholds_conns != nil {
st.ThresholdSConns = make([]*RemoteHost, len(*jsnCfg.Thresholds_conns))

View File

@@ -458,7 +458,7 @@
// "stats": { // StatS config
// "enabled": false, // starts Stat service: <true|false>.
// "store_interval": "", // dump cache regularly to dataDB, 0 - dump at start/shutdown: <""|$dur>
// "max_queue_lenght": 0, // used to compress data
// "max_queue_length": 0, // used to compress data
// "thresholds_conns": [], // connections to ThresholdS for StatUpdates, empty to disable thresholds functionality: <""|*internal|x.y.z.y:1234>
// "indexed_selects":true, // enable profile matching exclusively on indexes
// //"string_indexed_fields": [], // query indexes based on these fields for faster processing