mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-11 18:16:24 +05:00
improve CoreSv1.Status API with more detailed metrics
- add new metrics (off by default) - add Debug boolean option for full metric details - add Timezone option for 'running_since' field - update default metrics shown and their constants - remove utils.GetStartTime(), now use process metrics
This commit is contained in:
committed by
Dan Christian Bogos
parent
98f770c61b
commit
62c30ab539
@@ -46,8 +46,7 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
startCGRateSTime time.Time
|
||||
boolGenerator *boolGen
|
||||
boolGenerator *boolGen
|
||||
|
||||
rfc3339Rule = regexp.MustCompile(`^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.+$`)
|
||||
sqlRule = regexp.MustCompile(`^\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2}$`)
|
||||
@@ -66,15 +65,9 @@ var (
|
||||
)
|
||||
|
||||
func init() {
|
||||
startCGRateSTime = time.Now()
|
||||
boolGenerator = newBoolGen()
|
||||
}
|
||||
|
||||
// GetStartTime return the Start time of engine (in UNIX format)
|
||||
func GetStartTime() string {
|
||||
return startCGRateSTime.Format(time.UnixDate)
|
||||
}
|
||||
|
||||
// BoolGenerator return the boolean generator
|
||||
func BoolGenerator() *boolGen {
|
||||
return boolGenerator
|
||||
|
||||
Reference in New Issue
Block a user