Skip to content

Commit

Permalink
Merge pull request #53 from DmitriyMurzin/patch-1
Browse files Browse the repository at this point in the history
fix-for-vesion-jicofo-stable-7439
  • Loading branch information
prayagsingh authored Jul 9, 2022
2 parents a9908a9 + 3a73b8f commit ee1b3f1
Show file tree
Hide file tree
Showing 2 changed files with 112 additions and 163 deletions.
27 changes: 20 additions & 7 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@ jitsi_jibri_available {{.JibriDetector.Available}}
jitsi_jicofo_largest_conferences {{.LargestConferences}}
# HELP jitsi_conference_sizes Distribution of conference sizes on jicofo
# TYPE jitsi_conference_sizes gauge
{{ range $key, $value := .ConferenceSizes -}}
jitsi_conference_sizes{conference_size="{{$key}}"} {{ $value }}
{{ end -}}
jitsi_conference_sizes_total_values {{ or .ConferenceSizes.TotalValue 0 }}
jitsi_conference_sizes_total_count {{ or .ConferenceSizes.TotalCount 0 }}
jitsi_conference_sizes_average {{ or .ConferenceSizes.Average 0 }}
jitsi_conference_sizes_max {{ or .ConferenceSizes.Max 0 }}
jitsi_conference_sizes_min {{ or .ConferenceSizes.Min 0 }}
jitsi_conference_sizes_discarded {{ or .ConferenceSizes.Discarded 0 }}
# HELP jitsi_total_conferences_created The total number of conferences created on jicofo.
# TYPE jitsi_total_conferences_created counter
jitsi_total_conferences_created {{.TotalConferencesCreated}}
Expand Down Expand Up @@ -136,6 +139,16 @@ jitsi_conferences {{.Conferences}}
jitsi_participants {{.Participants}}`))
)

type conferenceSizes struct {
Average interface{} `json:"average"`
Max interface{} `json:"max"`
Min interface{} `json:"min"`
TotalValue interface{} `json:"total_value"`
TotalCount interface{} `json:"total_count"`
Discarded interface{} `json:"discarded"`
Buckets map[string]int `json:"buckets"`
}

// jicofoStats
type jicofoStats struct {
XmppService struct {
Expand All @@ -148,10 +161,10 @@ type jicofoStats struct {
Available int `json:"available"`
} `json:"jibri_detector"`

LargestConferences int `json:"largest_conference"`
ConferenceSizes []int `json:"conference_sizes"`
TotalConferencesCreated int `json:"total_conferences_created"`
Threads int `json:"threads"`
LargestConferences int `json:"largest_conference"`
ConferenceSizes conferenceSizes `json:"conference_sizes"`
TotalConferencesCreated int `json:"total_conferences_created"`
Threads int `json:"threads"`
Jingle struct {
Received struct{} `json:"received"`
Sent struct{} `json:"sent"`
Expand Down
Loading

0 comments on commit ee1b3f1

Please sign in to comment.