update data files and test fixes

This commit is contained in:
Radu Ioan Fericean
2015-06-22 23:21:36 +03:00
parent ef5413118f
commit 10c13d0694
9 changed files with 47 additions and 41 deletions

View File

@@ -591,8 +591,10 @@ func (self *CGRConfig) loadFromJsonCfg(jsnCfg *CgrJsonCfg) error {
if jsnCdrstatsCfg != nil {
if jsnCdrstatsCfg.Enabled != nil {
self.CDRStatsEnabled = *jsnCdrstatsCfg.Enabled
if self.CDRStatsSaveInterval, err = utils.ParseDurationWithSecs(*jsnCdrstatsCfg.Save_Interval); err != nil {
return err
if jsnCdrstatsCfg.Save_Interval != nil {
if self.CDRStatsSaveInterval, err = utils.ParseDurationWithSecs(*jsnCdrstatsCfg.Save_Interval); err != nil {
return err
}
}
}
}

View File

@@ -87,7 +87,8 @@
//"cdrstats": {
// "enabled": false, // starts the cdrstats service: <true|false>
// "enabled": false, // starts the cdrstats service: <true|false>
// "save_interval": "5s",
//},

View File

@@ -19,6 +19,7 @@
"enabled": true, // starts the cdrstats service: <true|false>
"queue_length": 5, // number of items in the stats buffer
"time_window": "0", // will only keep the CDRs who's call setup time is not older than time.Now()-TimeWindow
"save_interval": "5s",
},
}

View File

@@ -23,6 +23,7 @@
"cdrstats": {
"enabled": true, // starts the cdrstats service: <true|false>
"save_interval": "5s"
},
}

View File

@@ -27,6 +27,7 @@ enabled = true # Starts Mediator service: <true|false>.
enabled = true # Starts the cdrstats service: <true|false>
#queue_length = 50 # Number of items in the stats buffer
time_window = 1h # Will only keep the CDRs who's call setup time is not older than time.Now()-TimeWindow
save_interval = 5s
# metrics = ASR, ACD, ACC # Stat metric ids to build
# setup_interval = # Filter on CDR SetupTime
# tors = # Filter on CDR TOR fields
@@ -39,7 +40,7 @@ time_window = 1h # Will only keep the CDRs who's call setup time is not olde
# accounts = # Filter on CDR Account fields
# subjects = # Filter on CDR Subject fields
# destination_prefixes = # Filter on CDR Destination prefixes
# usage_interval = # Filter on CDR Usage
# usage_interval = # Filter on CDR Usage
# mediation_run_ids = # Filter on CDR MediationRunId fields
# rated_accounts = # Filter on CDR RatedAccount fields
# rated_subjects = # Filter on CDR RatedSubject fields
@@ -58,4 +59,3 @@ mi_addr = 172.16.254.77:8020 # Adress where to reach OpenSIPS mi_datagram modu
# auth_user = cgrates # Authenticate to email server using this user
# auth_passwd = CGRateS.org # Authenticate to email server with this password
# from_address = cgr-mailer@localhost.localdomain # From address used when sending emails out

View File

@@ -17,6 +17,7 @@
"scheduler": {
"enabled": true, // start Scheduler service: <true|false>
"save_interval": "5s",
},
"cdrs": {

View File

@@ -1,6 +1,6 @@
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]
CDRST3,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,,5m;10m,,,default,rif,rif,0;2,CDRST3_WARN_ASR
CDRST3,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACD
CDRST3,,,ACC,,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACC
CDRST4,10,0,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,CDRST4_WARN_ASR
CDRST4,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST4_WARN_ACD
#Id[0],QueueLength[1],TimeWindow[2],SaveInerval[3],Metric[4],SetupInterval[5],TOR[6],CdrHost[7],CdrSource[8],ReqType[9],Direction[10],Tenant[11],Category[12],Account[13],Subject[14],DestinationPrefix[15],PddInterval[16],UsageInterval[17],Supplier[18],DisconnectCause[19],MediationRunIds[20],RatedAccount[21],RatedSubject[22],CostInterval[23],Triggers[24]
CDRST3,5,60m,10s,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,,5m;10m,,,default,rif,rif,0;2,CDRST3_WARN_ASR
CDRST3,,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACD
CDRST3,,,,ACC,,,,,,,,,,,,,,,,,,,,CDRST3_WARN_ACC
CDRST4,10,0,10s,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,CDRST4_WARN_ASR
CDRST4,,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST4_WARN_ACD
1 #Id[0] QueueLength[1] TimeWindow[2] Metric[3] SaveInerval[3] SetupInterval[4] Metric[4] TOR[5] SetupInterval[5] CdrHost[6] TOR[6] CdrSource[7] CdrHost[7] ReqType[8] CdrSource[8] Direction[9] ReqType[9] Tenant[10] Direction[10] Category[11] Tenant[11] Account[12] Category[12] Subject[13] Account[13] DestinationPrefix[14] Subject[14] PddInterval[15] DestinationPrefix[15] UsageInterval[16] PddInterval[16] Supplier[17] UsageInterval[17] DisconnectCause[18] Supplier[18] MediationRunIds[19] DisconnectCause[19] RatedAccount[20] MediationRunIds[20] RatedSubject[21] RatedAccount[21] CostInterval[22] RatedSubject[22] Triggers[23] CostInterval[23] Triggers[24]
2 CDRST3 5 60m ASR 10s 2014-07-29T15:00:00Z;2014-07-29T16:00:00Z ASR *voice 2014-07-29T15:00:00Z;2014-07-29T16:00:00Z 87.139.12.167 *voice FS_JSON 87.139.12.167 rated FS_JSON *out rated cgrates.org *out call cgrates.org dan call dan dan +49 dan +49 5m;10m 5m;10m default rif default rif rif 0;2 rif CDRST3_WARN_ASR 0;2 CDRST3_WARN_ASR
3 CDRST3 ACD ACD CDRST3_WARN_ACD CDRST3_WARN_ACD
4 CDRST3 ACC ACC CDRST3_WARN_ACC CDRST3_WARN_ACC
5 CDRST4 10 0 ASR 10s ASR cgrates.org call cgrates.org call CDRST4_WARN_ASR CDRST4_WARN_ASR
6 CDRST4 ACD ACD CDRST4_WARN_ACD CDRST4_WARN_ACD

View File

@@ -1,6 +1,6 @@
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]
CDRST1,5,60m,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,,5m;10m,,,default,rif,rif,0;2,CDRST1_WARN_ASR
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACD
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACC
CDRST2,10,10m,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,CDRST2_WARN_ASR
CDRST2,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST2_WARN_ACD
#Id[0],QueueLength[1],TimeWindow[2],SaveInerval[3],Metric[4],SetupInterval[5],TOR[6],CdrHost[7],CdrSource[8],ReqType[9],Direction[10],Tenant[11],Category[12],Account[13],Subject[14],DestinationPrefix[15],PddInterval[16],UsageInterval[17],Supplier[18],DisconnectCause[19],MediationRunIds[20],RatedAccount[21],RatedSubject[22],CostInterval[23],Triggers[24]
CDRST1,5,60m,10s,ASR,2014-07-29T15:00:00Z;2014-07-29T16:00:00Z,*voice,87.139.12.167,FS_JSON,rated,*out,cgrates.org,call,dan,dan,+49,,5m;10m,,,default,rif,rif,0;2,CDRST1_WARN_ASR
CDRST1,,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACD
CDRST1,,,,ACC,,,,,,,,,,,,,,,,,,,,CDRST1_WARN_ACC
CDRST2,10,10m,10s,ASR,,,,,,,cgrates.org,call,,,,,,,,,,,,CDRST2_WARN_ASR
CDRST2,,,,ACD,,,,,,,,,,,,,,,,,,,,CDRST2_WARN_ACD
1 #Id[0] QueueLength[1] TimeWindow[2] Metric[3] SaveInerval[3] SetupInterval[4] Metric[4] TOR[5] SetupInterval[5] CdrHost[6] TOR[6] CdrSource[7] CdrHost[7] ReqType[8] CdrSource[8] Direction[9] ReqType[9] Tenant[10] Direction[10] Category[11] Tenant[11] Account[12] Category[12] Subject[13] Account[13] DestinationPrefix[14] Subject[14] PddInterval[15] DestinationPrefix[15] UsageInterval[16] PddInterval[16] Supplier[17] UsageInterval[17] DisconnectCause[18] Supplier[18] MediationRunIds[19] DisconnectCause[19] RatedAccount[20] MediationRunIds[20] RatedSubject[21] RatedAccount[21] CostInterval[22] RatedSubject[22] Triggers[23] CostInterval[23] Triggers[24]
2 CDRST1 5 60m ASR 10s 2014-07-29T15:00:00Z;2014-07-29T16:00:00Z ASR *voice 2014-07-29T15:00:00Z;2014-07-29T16:00:00Z 87.139.12.167 *voice FS_JSON 87.139.12.167 rated FS_JSON *out rated cgrates.org *out call cgrates.org dan call dan dan +49 dan +49 5m;10m 5m;10m default rif default rif rif 0;2 rif CDRST1_WARN_ASR 0;2 CDRST1_WARN_ASR
3 CDRST1 ACD ACD CDRST1_WARN_ACD CDRST1_WARN_ACD
4 CDRST1 ACC ACC CDRST1_WARN_ACC CDRST1_WARN_ACC
5 CDRST2 10 10m ASR 10s ASR cgrates.org call cgrates.org call CDRST2_WARN_ASR CDRST2_WARN_ASR
6 CDRST2 ACD ACD CDRST2_WARN_ACD CDRST2_WARN_ACD

View File

@@ -1,24 +1,24 @@
#Id[0],QueueLength[1],TimeWindow[2],Metric[3],SetupInterval[4],TOR[5],CdrHost[6],CdrSource[7],ReqType[8],Direction[9],Tenant[10],Category[11],Account[12],Subject[13],DestinationPrefix[14],PddInterval[15],UsageInterval[16],Supplier[17],DisconnectCause[18],MediationRunIds[19],RatedAccount[20],RatedSubject[21],CostInterval[22],Triggers[23]
CDRST1,10,0,ASR,,,,,,,cgrates.org,,,,,,,,,*default,,,,CDRST1_WARN
CDRST1,,,ACD,,,,,,,,,,,,,,,,,,,,
CDRST1,,,ACC,,,,,,,,,,,,,,,,,,,,
CDRST1,,,TCD,,,,,,,,,,,,,,,,,,,,
CDRST1,,,TCC,,,,,,,,,,,,,,,,,,,,
CDRST_1001,10,10m,ASR,,,,,,,cgrates.org,,,1001,,,,,,*default,,,,CDRST1001_WARN
CDRST_1001,,,ACD,,,,,,,,,,,,,,,,,,,,
CDRST_1001,,,ACC,,,,,,,,,,,,,,,,,,,,
CDRST_1002,10,10m,ASR,,,,,,,cgrates.org,,,1002,,,,,,*default,,,,CDRST1001_WARN
CDRST_1002,,,ACD,,,,,,,,,,,,,,,,,,,,
CDRST_1002,,,ACC,,,,,,,,,,,,,,,,,,,,
CDRST_1003,,,ASR,,,,,,,cgrates.org,,,,1003,,,,,*default,,,,CDRST3_WARN
CDRST_1003,,,ACD,,,,,,,,,,,,,,,,,,,,
STATS_SUPPL1,,,ACD,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,ASR,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,ACC,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,TCD,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,TCC,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL2,,,ACD,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,ASR,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,ACC,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,TCD,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,TCC,,,,,,,,,,,,,,suppl2,,,,,,
#Id[0],QueueLength[1],TimeWindow[2],SaveInerval[3],Metric[4],SetupInterval[5],TOR[6],CdrHost[7],CdrSource[8],ReqType[9],Direction[10],Tenant[11],Category[12],Account[13],Subject[14],DestinationPrefix[15],PddInterval[16],UsageInterval[17],Supplier[18],DisconnectCause[19],MediationRunIds[20],RatedAccount[21],RatedSubject[22],CostInterval[23],Triggers[24]
CDRST1,10,0,10s,ASR,,,,,,,cgrates.org,,,,,,,,,*default,,,,CDRST1_WARN
CDRST1,,,,ACD,,,,,,,,,,,,,,,,,,,,
CDRST1,,,,ACC,,,,,,,,,,,,,,,,,,,,
CDRST1,,,,TCD,,,,,,,,,,,,,,,,,,,,
CDRST1,,,,TCC,,,,,,,,,,,,,,,,,,,,
CDRST_1001,10,10m,10s,ASR,,,,,,,cgrates.org,,,1001,,,,,,*default,,,,CDRST1001_WARN
CDRST_1001,,,,ACD,,,,,,,,,,,,,,,,,,,,
CDRST_1001,,,,ACC,,,,,,,,,,,,,,,,,,,,
CDRST_1002,10,10m,10s,ASR,,,,,,,cgrates.org,,,1002,,,,,,*default,,,,CDRST1001_WARN
CDRST_1002,,,,ACD,,,,,,,,,,,,,,,,,,,,
CDRST_1002,,,,ACC,,,,,,,,,,,,,,,,,,,,
CDRST_1003,,,,ASR,,,,,,,cgrates.org,,,,1003,,,,,*default,,,,CDRST3_WARN
CDRST_1003,,,,ACD,,,,,,,,,,,,,,,,,,,,
STATS_SUPPL1,,,,ACD,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,,ASR,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,,ACC,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,,TCD,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL1,,,,TCC,,,,,,,,,,,,,,suppl1,,,,,,
STATS_SUPPL2,,,,ACD,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,,ASR,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,,ACC,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,,TCD,,,,,,,,,,,,,,suppl2,,,,,,
STATS_SUPPL2,,,,TCC,,,,,,,,,,,,,,suppl2,,,,,,
1 #Id[0] QueueLength[1] TimeWindow[2] SaveInerval[3] Metric[3] Metric[4] SetupInterval[4] SetupInterval[5] TOR[5] TOR[6] CdrHost[6] CdrHost[7] CdrSource[7] CdrSource[8] ReqType[8] ReqType[9] Direction[9] Direction[10] Tenant[10] Tenant[11] Category[11] Category[12] Account[12] Account[13] Subject[13] Subject[14] DestinationPrefix[14] DestinationPrefix[15] PddInterval[15] PddInterval[16] UsageInterval[16] UsageInterval[17] Supplier[17] Supplier[18] DisconnectCause[18] DisconnectCause[19] MediationRunIds[19] MediationRunIds[20] RatedAccount[20] RatedAccount[21] RatedSubject[21] RatedSubject[22] CostInterval[22] CostInterval[23] Triggers[23] Triggers[24]
2 CDRST1 10 0 10s ASR cgrates.org *default CDRST1_WARN
3 CDRST1 ACD
4 CDRST1 ACC
5 CDRST1 TCD
6 CDRST1 TCC
7 CDRST_1001 10 10m 10s ASR cgrates.org 1001 *default CDRST1001_WARN
8 CDRST_1001 ACD
9 CDRST_1001 ACC
10 CDRST_1002 10 10m 10s ASR cgrates.org 1002 *default CDRST1001_WARN
11 CDRST_1002 ACD
12 CDRST_1002 ACC
13 CDRST_1003 ASR cgrates.org 1003 *default CDRST3_WARN
14 CDRST_1003 ACD
15 STATS_SUPPL1 ACD suppl1
16 STATS_SUPPL1 ASR suppl1
17 STATS_SUPPL1 ACC suppl1
18 STATS_SUPPL1 TCD suppl1
19 STATS_SUPPL1 TCC suppl1
20 STATS_SUPPL2 ACD suppl2
21 STATS_SUPPL2 ASR suppl2
22 STATS_SUPPL2 ACC suppl2
23 STATS_SUPPL2 TCD suppl2
24 STATS_SUPPL2 TCC suppl2