Compare commits
191 commits
Author | SHA1 | Date | |
---|---|---|---|
62484b3681 | |||
|
771354726b | ||
c9f1f3450d | |||
|
8680f7e544 | ||
|
ecdadc8f0b | ||
|
7a943cd22e | ||
|
004b344a2b | ||
|
e40b9d53f0 | ||
|
52eb8cb6d5 | ||
|
b43e349762 | ||
|
7d0aeeeb31 | ||
|
65668bafe4 | ||
|
62a02a15e3 | ||
|
a497060165 | ||
|
f3c6e172db | ||
|
70d7e3c7bb | ||
|
3a7c6471d6 | ||
|
80e5f8105d | ||
|
a691c21aef | ||
|
5d0795a756 | ||
|
d04c58bbd9 | ||
|
eaaf297b5b | ||
|
2d36af767b | ||
|
7e020599ed | ||
|
655529c81e | ||
|
80dda190de | ||
|
1097e3475f | ||
|
ff981b1e15 | ||
|
723db8f3d2 | ||
|
12685d0ff6 | ||
|
26ade08c6b | ||
|
7087f54292 | ||
|
44806fb292 | ||
|
7c000e96dc | ||
|
a7760b7a80 | ||
|
a8c700031e | ||
|
d1ea6f21f4 | ||
|
3a6b600093 | ||
|
ac11731246 | ||
|
38bc554eb1 | ||
|
bd1431a803 | ||
|
fed924c0e0 | ||
|
ceaa305c21 | ||
|
cfd15d10c3 | ||
|
1c29be8190 | ||
|
13d2a695a8 | ||
|
857f59ee60 | ||
|
cd433aaf88 | ||
|
c8e341cfab | ||
|
07c2f1d5bb | ||
|
b9befd7943 | ||
|
86d8462564 | ||
|
68cf47789a | ||
|
29bac04d1f | ||
|
610dbc373d | ||
|
8d05cb72a4 | ||
|
7902f8de70 | ||
|
89b9e7f371 | ||
|
18644da8d2 | ||
|
edf751bc25 | ||
|
ec2d72e6fe | ||
|
125fdbbf60 | ||
|
674e002a14 | ||
|
043a0688e9 | ||
|
14cee02a3a | ||
|
bd6e9904c5 | ||
|
0bc9aa1844 | ||
|
04a6b7a87b | ||
|
20f1b4e6bc | ||
|
81b4916d40 | ||
|
84cef04d43 | ||
|
596d51ec45 | ||
|
bfb805ba59 | ||
|
b557200bfd | ||
|
0c93b1919b | ||
|
41db6076ec | ||
|
b06184c34e | ||
|
d26339b6a4 | ||
|
928b33a229 | ||
|
e79afdad42 | ||
|
0a606961c2 | ||
|
f890c14d9a | ||
|
10f9b6cbdc | ||
|
afa674dff7 | ||
|
7443be77e4 | ||
|
043cb07cb7 | ||
|
fbb35ef2b2 | ||
|
bc101bd81f | ||
|
dcc19c2796 | ||
|
b1809f0d1d | ||
|
529b2ee782 | ||
|
0d000af30c | ||
|
e6d8221686 | ||
|
ae316c9a0f | ||
|
a2998e697f | ||
|
a2736d7844 | ||
|
2a10cd0e94 | ||
|
42fa153288 | ||
|
a6a4b523cb | ||
|
e46322d63c | ||
|
cc62f5ce20 | ||
|
55098b2e0e | ||
|
52ba7ad17d | ||
|
3205dd05d6 | ||
|
f11bd5e76b | ||
|
fff55473fc | ||
|
c2167be572 | ||
|
f8d9d009c1 | ||
|
1f45347eaf | ||
|
a8ef6c96b3 | ||
|
487b8ca48e | ||
|
2f438c9bfe | ||
|
69eddf9758 | ||
|
72d0ab9f09 | ||
|
54253cf403 | ||
|
4619c71ad0 | ||
|
293ccb8f67 | ||
|
a82ec7ad6f | ||
|
0724558254 | ||
|
c99d8d762e | ||
|
75bfa75bf9 | ||
|
a57b9d4b4c | ||
|
89b0169299 | ||
|
6048b75b4c | ||
|
d87c5f6000 | ||
|
01313a38f7 | ||
|
f821108b12 | ||
|
07e2668854 | ||
|
cafc2eeba2 | ||
|
36de17a7c9 | ||
|
0e528b58d2 | ||
|
8134f4c5c3 | ||
|
c70e051170 | ||
|
a237534c08 | ||
|
218527d6cc | ||
|
9822717c69 | ||
|
e528c50d5b | ||
|
59c07b1cff | ||
|
46b777d339 | ||
|
dd9b527ee6 | ||
|
68aa924ed4 | ||
|
bf2edb833f | ||
|
54fbedad4e | ||
|
cc9dc1650f | ||
|
ebc94995f1 | ||
|
ce1143e8a4 | ||
|
612c324a13 | ||
|
97d310220e | ||
|
692e452645 | ||
|
15888b030b | ||
|
c486402c2a | ||
|
95a3a8c938 | ||
|
cc6e80f3f5 | ||
|
6e7827813c | ||
|
46816f3870 | ||
|
08ccc6d282 | ||
|
1a792d54e0 | ||
|
eda551c0ee | ||
|
a0e2cd4c3c | ||
|
62a54561ba | ||
|
7d95bfdccc | ||
|
7f0b7794cc | ||
|
81a0fa4d77 | ||
|
e7d9c3febb | ||
|
48532001b2 | ||
|
a7325fc42b | ||
|
236fa7bd64 | ||
|
78c56fa411 | ||
|
7772595e2b | ||
|
330d119d64 | ||
|
6dcec1b89c | ||
|
f7a800532c | ||
|
0c4ca90088 | ||
|
59d9044fee | ||
|
728afca31c | ||
|
dbea51ed2f | ||
|
e36b5a845a | ||
|
10bacf86e4 | ||
|
7abef987ac | ||
|
b461696983 | ||
|
e8c2331050 | ||
|
778deb508d | ||
|
51b25b9515 | ||
|
e042e96f61 | ||
|
2bd0250d1f | ||
|
022d6e12ab | ||
|
fed5045e92 | ||
|
faa7e62e4f | ||
|
8d47a7681d | ||
|
fdabba1a28 | ||
|
cd4ad1c094 |
21 changed files with 5762 additions and 163 deletions
1
.github/CODEOWNERS
vendored
Normal file
1
.github/CODEOWNERS
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
* @0x46616c6b
|
34
.github/dependabot.yml
vendored
Normal file
34
.github/dependabot.yml
vendored
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
---
|
||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "gomod"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "friday"
|
||||||
|
time: "09:00"
|
||||||
|
timezone: "Europe/Berlin"
|
||||||
|
groups:
|
||||||
|
gomod:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
|
|
||||||
|
- package-ecosystem: "docker"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "friday"
|
||||||
|
time: "09:00"
|
||||||
|
timezone: "Europe/Berlin"
|
||||||
|
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
day: "friday"
|
||||||
|
time: "09:00"
|
||||||
|
timezone: "Europe/Berlin"
|
||||||
|
groups:
|
||||||
|
github-actions:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
41
.github/release-drafter.yml
vendored
Normal file
41
.github/release-drafter.yml
vendored
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
name-template: '$RESOLVED_VERSION'
|
||||||
|
tag-template: '$RESOLVED_VERSION'
|
||||||
|
categories:
|
||||||
|
- title: '🚀 Features'
|
||||||
|
labels:
|
||||||
|
- 'feature'
|
||||||
|
- 'enhancement'
|
||||||
|
- title: '🐛 Bug Fixes'
|
||||||
|
labels:
|
||||||
|
- 'fix'
|
||||||
|
- 'bugfix'
|
||||||
|
- 'bug'
|
||||||
|
- title: '🧹 Maintenance'
|
||||||
|
labels:
|
||||||
|
- 'chore'
|
||||||
|
- 'dependencies'
|
||||||
|
version-resolver:
|
||||||
|
major:
|
||||||
|
labels:
|
||||||
|
- 'feature'
|
||||||
|
minor:
|
||||||
|
labels:
|
||||||
|
- 'enhancement'
|
||||||
|
patch:
|
||||||
|
labels:
|
||||||
|
- 'fix'
|
||||||
|
- 'bugfix'
|
||||||
|
- 'bug'
|
||||||
|
- 'chore'
|
||||||
|
- 'dependencies'
|
||||||
|
default: patch
|
||||||
|
template: |
|
||||||
|
## Changes
|
||||||
|
|
||||||
|
$CHANGES
|
||||||
|
|
||||||
|
**Full Changelog**: https://github.com/$OWNER/$REPOSITORY/compare/$PREVIOUS_TAG...$RESOLVED_VERSION
|
||||||
|
|
||||||
|
## Docker
|
||||||
|
|
||||||
|
- `docker pull systemli/prometheus-jitsi-meet-exporter:$RESOLVED_VERSION`
|
89
.github/workflows/integration.yaml
vendored
89
.github/workflows/integration.yaml
vendored
|
@ -1,38 +1,85 @@
|
||||||
name: Integration
|
name: Integration
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
name: Test
|
name: Test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.14.x'
|
go-version: "1.17.x"
|
||||||
|
|
||||||
|
- name: Cache Go Dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
- name: Vet
|
- name: Vet
|
||||||
run: make vet
|
run: go vet
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: make coverage
|
run: go test ./...
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
|
needs:
|
||||||
|
- test
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Setup go
|
|
||||||
uses: actions/setup-go@v1
|
- name: Setup go
|
||||||
with:
|
uses: actions/setup-go@v5
|
||||||
go-version: '1.14.x'
|
with:
|
||||||
- name: Build
|
go-version: "1.17.x"
|
||||||
run: make build
|
|
||||||
|
- name: Cache Go Dependencies
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.cache/go-build
|
||||||
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
run: go build ./...
|
||||||
|
|
||||||
docker:
|
|
||||||
name: Docker
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Docker
|
- name: Docker
|
||||||
run: make docker
|
run: docker build .
|
||||||
|
|
||||||
|
automerge:
|
||||||
|
name: Merge Automatically
|
||||||
|
needs: [test, build]
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
|
contents: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Obtain Access Token
|
||||||
|
id: acces_token
|
||||||
|
run: |
|
||||||
|
TOKEN="$(npx obtain-github-app-installation-access-token ci ${{ secrets.SYSTEMLI_APP_CREDENTIALS_TOKEN }})"
|
||||||
|
echo "token=$TOKEN" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Merge
|
||||||
|
uses: fastify/github-action-merge-dependabot@v3
|
||||||
|
with:
|
||||||
|
github-token: ${{ steps.acces_token.outputs.token }}
|
||||||
|
|
16
.github/workflows/quality.yaml
vendored
16
.github/workflows/quality.yaml
vendored
|
@ -1,16 +1,16 @@
|
||||||
name: Quality
|
name: Quality
|
||||||
|
|
||||||
on: [push]
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
golangci:
|
golangci:
|
||||||
name: GolangCI
|
name: GolangCI
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: GolangCI
|
- name: GolangCI
|
||||||
uses: Mushus/golangci-lint-action@master
|
uses: golangci/golangci-lint-action@v3
|
||||||
with:
|
|
||||||
config: .golangci.yml
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
18
.github/workflows/release-drafter.yaml
vendored
Normal file
18
.github/workflows/release-drafter.yaml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
name: Release Drafter
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Update Release
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
steps:
|
||||||
|
- name: Publish Release
|
||||||
|
uses: release-drafter/release-drafter@v5
|
||||||
|
with:
|
||||||
|
publish: false
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
89
.github/workflows/release.yaml
vendored
89
.github/workflows/release.yaml
vendored
|
@ -1,71 +1,42 @@
|
||||||
name: Release
|
name: Release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
release:
|
||||||
tags:
|
types: [published]
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
name: Release
|
name: Release
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup go
|
- name: Setup go
|
||||||
uses: actions/setup-go@v1
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: '1.14.x'
|
go-version: "1.17.x"
|
||||||
- name: Create release artifacts
|
|
||||||
run: make release
|
- name: Cache Go Dependencies
|
||||||
env:
|
uses: actions/cache@v4
|
||||||
GOPATH: ${{ github.workspace }}/go
|
with:
|
||||||
- name: Create Github Release
|
path: |
|
||||||
id: create_release
|
~/.cache/go-build
|
||||||
uses: actions/create-release@v1
|
~/go/pkg/mod
|
||||||
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-go-
|
||||||
|
|
||||||
|
- name: Login to Docker Hub
|
||||||
|
uses: docker/login-action@v3.0.0
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Build Releases
|
||||||
|
uses: goreleaser/goreleaser-action@v5.0.0
|
||||||
|
with:
|
||||||
|
version: latest
|
||||||
|
args: release --rm-dist
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
|
||||||
tag_name: ${{ github.ref }}
|
|
||||||
release_name: ${{ github.ref }}
|
|
||||||
draft: false
|
|
||||||
prerelease: false
|
|
||||||
- name: Upload release artifacts (Mac OS amd64)
|
|
||||||
id: upload-release-asset-mac
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: build/prometheus-jitsi-meet-exporter-darwin-amd64
|
|
||||||
asset_name: prometheus-jitsi-meet-exporter-darwin-amd64
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
- name: Upload release artifacts (FreeBSD amd64)
|
|
||||||
id: upload-release-asset-freebsd
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: build/prometheus-jitsi-meet-exporter-freebsd-amd64
|
|
||||||
asset_name: prometheus-jitsi-meet-exporter-freebsd-amd64
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
- name: Upload release artifacts (Linux amd64)
|
|
||||||
id: upload-release-asset-linux
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: build/prometheus-jitsi-meet-exporter-linux-amd64
|
|
||||||
asset_name: prometheus-jitsi-meet-exporter-linux-amd64
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
- name: Upload release artifacts (shasums)
|
|
||||||
id: upload-release-asset-sha512sums
|
|
||||||
uses: actions/upload-release-asset@v1
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
with:
|
|
||||||
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
||||||
asset_path: build/sha512sums.txt
|
|
||||||
asset_name: sha512sums.txt
|
|
||||||
asset_content_type: application/octet-stream
|
|
||||||
|
|
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1 +1 @@
|
||||||
build
|
dist
|
||||||
|
|
30
.goreleaser.yml
Normal file
30
.goreleaser.yml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
before:
|
||||||
|
hooks:
|
||||||
|
- go mod tidy
|
||||||
|
builds:
|
||||||
|
- env:
|
||||||
|
- CGO_ENABLED=0
|
||||||
|
goos:
|
||||||
|
- linux
|
||||||
|
- windows
|
||||||
|
- darwin
|
||||||
|
goarm:
|
||||||
|
- "6"
|
||||||
|
- "7"
|
||||||
|
ldflags:
|
||||||
|
- -s -w
|
||||||
|
dockers:
|
||||||
|
-
|
||||||
|
goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
image_templates:
|
||||||
|
- "systemli/prometheus-jitsi-meet-exporter:{{ .Tag }}"
|
||||||
|
- "systemli/prometheus-jitsi-meet-exporter:{{ .Major }}"
|
||||||
|
- "systemli/prometheus-jitsi-meet-exporter:{{ .Major }}.{{ .Minor }}"
|
||||||
|
- "systemli/prometheus-jitsi-meet-exporter:latest"
|
||||||
|
checksum:
|
||||||
|
name_template: 'checksums.txt'
|
||||||
|
snapshot:
|
||||||
|
name_template: "{{ .Tag }}-next"
|
||||||
|
changelog:
|
||||||
|
skip: true
|
32
Dockerfile
32
Dockerfile
|
@ -1,12 +1,30 @@
|
||||||
FROM golang:1.14-alpine
|
# syntax=docker/dockerfile:1
|
||||||
ENV GO111MODULE=on
|
|
||||||
WORKDIR /go/src/github.com/systemli/prometheus-jitsi-meet-exporter
|
# Build the application from source
|
||||||
ADD . /go/src/github.com/systemli/prometheus-jitsi-meet-exporter
|
FROM golang:1.21.4 AS build-stage
|
||||||
RUN go build -o /prometheus-jitsi-meet-exporter
|
|
||||||
|
|
||||||
FROM alpine
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY --from=0 /prometheus-jitsi-meet-exporter /prometheus-jitsi-meet-exporter
|
|
||||||
|
COPY go.mod go.sum ./
|
||||||
|
RUN go mod download
|
||||||
|
|
||||||
|
COPY *.go ./
|
||||||
|
|
||||||
|
RUN CGO_ENABLED=0 GOOS=linux go build -o /prometheus-jitsi-meet-exporter
|
||||||
|
|
||||||
|
# Run the tests in the container
|
||||||
|
FROM build-stage AS run-test-stage
|
||||||
|
RUN go test -v ./...
|
||||||
|
|
||||||
|
# Deploy the application binary into a lean image
|
||||||
|
FROM gcr.io/distroless/base-debian11 AS build-release-stage
|
||||||
|
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
COPY --from=build-stage /prometheus-jitsi-meet-exporter /prometheus-jitsi-meet-exporter
|
||||||
|
|
||||||
EXPOSE 9888
|
EXPOSE 9888
|
||||||
|
|
||||||
|
USER nonroot:nonroot
|
||||||
|
|
||||||
ENTRYPOINT ["/prometheus-jitsi-meet-exporter"]
|
ENTRYPOINT ["/prometheus-jitsi-meet-exporter"]
|
||||||
|
|
44
Makefile
44
Makefile
|
@ -1,44 +0,0 @@
|
||||||
GOCMD = go
|
|
||||||
GOBUILD = $(GOCMD) build
|
|
||||||
GOCLEAN = $(GOCMD) clean
|
|
||||||
GOTEST = $(GOCMD) test
|
|
||||||
GOVET = $(GOCMD) vet
|
|
||||||
GOGET = $(GOCMD) get
|
|
||||||
GOX = $(GOPATH)/bin/gox
|
|
||||||
GOGET = $(GOCMD) get
|
|
||||||
|
|
||||||
GOX_ARGS = -output="$(BUILD_DIR)/{{.Dir}}-{{.OS}}-{{.Arch}}" -osarch="linux/amd64 darwin/amd64 freebsd/amd64"
|
|
||||||
|
|
||||||
BUILD_DIR = build
|
|
||||||
BINARY_NAME = prometheus-jitsi-meet-exporter
|
|
||||||
|
|
||||||
all: clean vet test build
|
|
||||||
|
|
||||||
build:
|
|
||||||
$(GOBUILD) -o $(BUILD_DIR)/$(BINARY_NAME) -v
|
|
||||||
|
|
||||||
vet:
|
|
||||||
${GOVET} ./...
|
|
||||||
|
|
||||||
test:
|
|
||||||
${GOTEST} ./...
|
|
||||||
|
|
||||||
coverage:
|
|
||||||
${GOTEST} -coverprofile=coverage.txt -covermode=atomic ./...
|
|
||||||
|
|
||||||
clean:
|
|
||||||
$(GOCLEAN)
|
|
||||||
rm -f $(BUILD_DIR)/*
|
|
||||||
|
|
||||||
run: build
|
|
||||||
./$(BUILD_DIR)/$(BINARY_NAME)
|
|
||||||
|
|
||||||
release:
|
|
||||||
${GOGET} -u github.com/mitchellh/gox
|
|
||||||
${GOX} -ldflags "${LD_FLAGS}" ${GOX_ARGS}
|
|
||||||
shasum -a 512 build/* > build/sha512sums.txt
|
|
||||||
|
|
||||||
docker:
|
|
||||||
docker build --rm --force-rm --no-cache -t systemli/prometheus-jitsi-meet-exporter .
|
|
||||||
|
|
||||||
.PHONY: all vet test coverage clean build run release docker
|
|
166
README.md
166
README.md
|
@ -1,5 +1,167 @@
|
||||||
# Jitsi Meet Metrics Exporter
|
# Jitsi Meet Metrics Exporter
|
||||||
|
|
||||||
  [](https://hub.docker.com/r/systemli/prometheus-jitsi-meet-exporter/) [](https://hub.docker.com/r/systemli/prometheus-jitsi-meet-exporter/)
|
[](https://github.com/systemli/prometheus-jitsi-meet-exporter/workflows/Integration/badge.svg?branch=main) [](https://github.com/systemli/prometheus-jitsi-meet-exporter/workflows/Quality/badge.svg?branch=main) [](https://hub.docker.com/r/systemli/prometheus-jitsi-meet-exporter) [](https://hub.docker.com/r/systemli/prometheus-jitsi-meet-exporter)
|
||||||
|
|
||||||
Prometheus Exporter for Jitsi Meet written in Go.
|
Prometheus Exporter for Jitsi Meet written in Go. Based on [Jitsi Meet Exporter](https://git.autistici.org/ai3/tools/jitsi-prometheus-exporter) from [Autistici](https://www.autistici.org/)
|
||||||
|
|
||||||
|
There's multiple different [statistics endpoint that can be exposed by jitsi](https://github.com/jitsi/jitsi-videobridge/blob/master/doc/statistics.md) (like /stats and /colibri/stats); you can configure the used URL with the `videobridge-url`.
|
||||||
|
The exporter will handle both of them, but some metrics that aren't exposed may be reported as 0.
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
```
|
||||||
|
go install github.com/systemli/prometheus-jitsi-meet-exporter@latest
|
||||||
|
$GOPATH/bin/prometheus-jitsi-meet-exporter
|
||||||
|
```
|
||||||
|
|
||||||
|
### Ansible
|
||||||
|
|
||||||
|
We also provide an [Ansible Role to install and configure the Jitsi Meet Exporter](https://github.com/systemli/ansible-role-jitsi-meet-exporter).
|
||||||
|
|
||||||
|
Example Playbook:
|
||||||
|
|
||||||
|
```yaml
|
||||||
|
- hosts: jitsimeetservers
|
||||||
|
roles:
|
||||||
|
- { role: systemli.jitsi_meet_exporter }
|
||||||
|
```
|
||||||
|
|
||||||
|
### Docker
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run -p 9888:9888 systemli/prometheus-jitsi-meet-exporter:latest -videobridge-url http://jitsi:8080/colibri/stats
|
||||||
|
```
|
||||||
|
|
||||||
|
## Dashboard
|
||||||
|
|
||||||
|
See the [Grafana Dashboards](dashboards) in this repository.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Metrics
|
||||||
|
|
||||||
|
```
|
||||||
|
# HELP jitsi_threads The number of Java threads that the video bridge is using.
|
||||||
|
# TYPE jitsi_threads gauge
|
||||||
|
jitsi_threads 0
|
||||||
|
# HELP jitsi_bit_rate_download The total incoming bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_download gauge
|
||||||
|
jitsi_bit_rate_download 0
|
||||||
|
# HELP jitsi_bit_rate_upload The total outgoing bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_upload gauge
|
||||||
|
jitsi_bit_rate_upload 0
|
||||||
|
# HELP jitsi_packet_rate_download The total incoming packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_download gauge
|
||||||
|
jitsi_packet_rate_download 0
|
||||||
|
# HELP jitsi_packet_rate_upload The total outgoing packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_upload gauge
|
||||||
|
jitsi_packet_rate_upload 0
|
||||||
|
# HELP jitsi_loss_rate_download The fraction of lost incoming RTP packets. This is based on RTP sequence numbers and is relatively accurate.
|
||||||
|
# TYPE jitsi_loss_rate_download gauge
|
||||||
|
jitsi_loss_rate_download 0
|
||||||
|
# HELP jitsi_loss_rate_upload The fraction of lost outgoing RTP packets. This is based on incoming RTCP Receiver Reports, and an attempt to subtract the fraction of packets that were not sent (i.e. were lost before they reached the bridge). Further, this is averaged over all streams of all users as opposed to all packets, so it is not correctly weighted. This is not accurate, but may be a useful metric nonetheless.
|
||||||
|
# TYPE jitsi_loss_rate_upload gauge
|
||||||
|
jitsi_loss_rate_upload 0
|
||||||
|
# HELP jitsi_jitter_aggregate Experimental. An average value (in milliseconds) of the jitter calculated for incoming and outgoing streams. This hasn't been tested and it is currently not known whether the values are correct or not.
|
||||||
|
# TYPE jitsi_jitter_aggregate gauge
|
||||||
|
jitsi_jitter_aggregate 0
|
||||||
|
# HELP jitsi_rtt_aggregate An average value (in milliseconds) of the RTT across all streams.
|
||||||
|
# TYPE jitsi_rtt_aggregate gauge
|
||||||
|
jitsi_rtt_aggregate 0
|
||||||
|
# HELP jitsi_largest_conference The number of participants in the largest conference currently hosted on the bridge.
|
||||||
|
# TYPE jitsi_largest_conference gauge
|
||||||
|
jitsi_largest_conference 8
|
||||||
|
# HELP jitsi_audiochannels The current number of audio channels.
|
||||||
|
# TYPE jitsi_audiochannels gauge
|
||||||
|
jitsi_audiochannels 0
|
||||||
|
# HELP jitsi_videochannels The current number of video channels.
|
||||||
|
# TYPE jitsi_videochannels gauge
|
||||||
|
jitsi_videochannels 0
|
||||||
|
# HELP jitsi_conferences The current number of conferences.
|
||||||
|
# TYPE jitsi_conferences gauge
|
||||||
|
jitsi_conferences 0
|
||||||
|
# HELP jitsi_p2p_conferences The current number of p2p conferences.
|
||||||
|
# TYPE jitsi_p2p_conferences gauge
|
||||||
|
jitsi_p2p_conferences 1
|
||||||
|
# HELP jitsi_participants The current number of participants.
|
||||||
|
# TYPE jitsi_participants gauge
|
||||||
|
jitsi_participants 0
|
||||||
|
# HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge.
|
||||||
|
# TYPE jitsi_videostreams gauge
|
||||||
|
jitsi_videostreams 0
|
||||||
|
# HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled.
|
||||||
|
# TYPE jitsi_total_loss_controlled_participant_seconds counter
|
||||||
|
jitsi_total_loss_controlled_participant_seconds 0
|
||||||
|
# HELP jitsi_total_loss_limited_participant_seconds The total number of participant-seconds that are loss-limited.
|
||||||
|
# TYPE jitsi_total_loss_limited_participant_seconds counter
|
||||||
|
jitsi_total_loss_limited_participant_seconds 0
|
||||||
|
# HELP jitsi_total_loss_degraded_participant_seconds The total number of participant-seconds that are loss-degraded.
|
||||||
|
# TYPE jitsi_total_loss_degraded_participant_seconds counter
|
||||||
|
jitsi_total_loss_degraded_participant_seconds 0
|
||||||
|
# HELP jitsi_total_conference_seconds The sum of the lengths of all completed conferences, in seconds.
|
||||||
|
# TYPE jitsi_total_conference_seconds counter
|
||||||
|
jitsi_total_conference_seconds 0
|
||||||
|
# HELP jitsi_total_conferences_created The total number of conferences created on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_created counter
|
||||||
|
jitsi_total_conferences_created 0
|
||||||
|
# HELP jitsi_total_failed_conferences The total number of failed conferences on the bridge. A conference is marked as failed when all of its channels have failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_failed_conferences counter
|
||||||
|
jitsi_total_failed_conferences 0
|
||||||
|
# HELP jitsi_total_partially_failed_conferences The total number of partially failed conferences on the bridge. A conference is marked as partially failed when some of its channels has failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_partially_failed_conferences counter
|
||||||
|
jitsi_total_partially_failed_conferences 0
|
||||||
|
# HELP jitsi_total_data_channel_messages_received The total number messages received through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_received counter
|
||||||
|
jitsi_total_data_channel_messages_received 0
|
||||||
|
# HELP jitsi_total_data_channel_messages_sent The total number messages sent through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_sent counter
|
||||||
|
jitsi_total_data_channel_messages_sent 0
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_received The total number messages received through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_received counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_received 0
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_sent 0
|
||||||
|
# HELP jitsi_octo_version The current running OCTO version
|
||||||
|
# TYPE jitsi_octo_version gauge
|
||||||
|
jitsi_octo_version 0
|
||||||
|
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||||
|
# TYPE jitsi_octo_conferences gauge
|
||||||
|
jitsi_octo_conferences 0
|
||||||
|
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||||
|
# TYPE jitsi_octo_endpoints gauge
|
||||||
|
jitsi_octo_endpoints 0
|
||||||
|
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_receive_bitrate gauge
|
||||||
|
jitsi_octo_receive_bitrate 0
|
||||||
|
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_send_bitrate gauge
|
||||||
|
jitsi_octo_send_bitrate 0
|
||||||
|
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||||
|
jitsi_octo_receive_packet_rate 0
|
||||||
|
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_send_packet_rate gauge
|
||||||
|
jitsi_octo_send_packet_rate 0
|
||||||
|
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_received_octo gauge
|
||||||
|
jitsi_total_bytes_received_octo 0
|
||||||
|
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||||
|
jitsi_total_bytes_sent_octo 0
|
||||||
|
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||||
|
jitsi_total_packets_dropped_octo 0
|
||||||
|
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_received_octo gauge
|
||||||
|
jitsi_total_packets_received_octo 0
|
||||||
|
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_sent_octo gauge
|
||||||
|
jitsi_total_packets_sent_octo 0
|
||||||
|
```
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
GPLv3
|
||||||
|
|
17
dashboards/README.md
Normal file
17
dashboards/README.md
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Dashboards
|
||||||
|
|
||||||
|
We provide basic dashboards for Jitsi Meet. Feel free to use and extend them.
|
||||||
|
|
||||||
|
## Jitsi Meet Dashboard
|
||||||
|
|
||||||
|
* contains all exported metrics from the jitsi-meet-exporter
|
||||||
|
* available for [importing direct from Grafana](https://grafana.com/grafana/dashboards/12098)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## Jitsi Meet & System Dashboard
|
||||||
|
|
||||||
|
* contains all exported metrics from the jitsi-meet-exporter and basic system metrics
|
||||||
|
* available for [importing direct from Grafana](https://grafana.com/grafana/dashboards/12282)
|
||||||
|
|
||||||
|

|
2514
dashboards/jitsi-meet-system.json
Normal file
2514
dashboards/jitsi-meet-system.json
Normal file
File diff suppressed because it is too large
Load diff
BIN
dashboards/jitsi-meet-system.png
Normal file
BIN
dashboards/jitsi-meet-system.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 119 KiB |
2166
dashboards/jitsi-meet.json
Normal file
2166
dashboards/jitsi-meet.json
Normal file
File diff suppressed because it is too large
Load diff
BIN
dashboards/jitsi-meet.png
Normal file
BIN
dashboards/jitsi-meet.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 94 KiB |
4
go.mod
4
go.mod
|
@ -1,3 +1,5 @@
|
||||||
module github.com/systemli/prometheus-jitsi-meet-exporter
|
module github.com/systemli/prometheus-jitsi-meet-exporter
|
||||||
|
|
||||||
go 1.14
|
go 1.17
|
||||||
|
|
||||||
|
require github.com/google/go-cmp v0.6.0
|
||||||
|
|
2
go.sum
Normal file
2
go.sum
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
|
||||||
|
github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
|
207
main.go
207
main.go
|
@ -10,37 +10,211 @@ import (
|
||||||
|
|
||||||
var (
|
var (
|
||||||
addr = flag.String("web.listen-address", ":9888", "Address on which to expose metrics and web interface.")
|
addr = flag.String("web.listen-address", ":9888", "Address on which to expose metrics and web interface.")
|
||||||
videoBridgeURL = flag.String("videobridge-url", "http://localhost:8888/stats", "Jitsi Videobridge /stats URL to scrape")
|
videoBridgeURL = flag.String("videobridge-url", "http://localhost:8080/colibri/stats", "Jitsi Videobridge /stats URL to scrape")
|
||||||
)
|
)
|
||||||
|
|
||||||
type videoBridgeStats struct {
|
type videoBridgeStats struct {
|
||||||
|
Threads int `json:"threads"`
|
||||||
|
BitRateDownload float64 `json:"bit_rate_download"`
|
||||||
|
BitRateUpload float64 `json:"bit_rate_upload"`
|
||||||
|
PacketRateDownload float64 `json:"packet_rate_download"`
|
||||||
|
PacketRateUpload float64 `json:"packet_rate_upload"`
|
||||||
|
LossRateDownload float64 `json:"loss_rate_download"`
|
||||||
|
LossRateUpload float64 `json:"loss_rate_upload"`
|
||||||
|
JitterAggregate float64 `json:"jitter_aggregate"`
|
||||||
|
RTTAggregate float64 `json:"rtt_aggregate"`
|
||||||
LargestConference int `json:"largest_conference"`
|
LargestConference int `json:"largest_conference"`
|
||||||
TotalParticipants int `json:"total_participants"`
|
|
||||||
ConferenceSizes []int `json:"conference_sizes"`
|
ConferenceSizes []int `json:"conference_sizes"`
|
||||||
TotalConferencesCreated int `json:"total_conferences_created"`
|
AudioChannels int `json:"audiochannels"`
|
||||||
|
VideoChannels int `json:"videochannels"`
|
||||||
Conferences int `json:"conferences"`
|
Conferences int `json:"conferences"`
|
||||||
|
P2PConferences int `json:"p2p_conferences"`
|
||||||
Participants int `json:"participants"`
|
Participants int `json:"participants"`
|
||||||
|
Videostreams int `json:"videostreams"`
|
||||||
|
StressLevel float64 `json:"stress_level"`
|
||||||
|
TotalLossControlledParticipantSeconds int `json:"total_loss_controlled_participant_seconds"`
|
||||||
|
TotalLossLimitedParticipantSeconds int `json:"total_loss_limited_participant_seconds"`
|
||||||
|
TotalLossDegradedParticipantSeconds int `json:"total_loss_degraded_participant_seconds"`
|
||||||
|
TotalConferenceSeconds int `json:"total_conference_seconds"`
|
||||||
|
TotalConferencesCreated int `json:"total_conferences_created"`
|
||||||
|
TotalConferencesCompleted int `json:"total_conferences_completed"`
|
||||||
|
TotalFailedConferences int `json:"total_failed_conferences"`
|
||||||
|
TotalPartiallyFailedConferences int `json:"total_partially_failed_conferences"`
|
||||||
|
TotalDataChannelMessagesReceived int `json:"total_data_channel_messages_received"`
|
||||||
|
TotalDataChannelMessagesSent int `json:"total_data_channel_messages_sent"`
|
||||||
|
TotalColibriWebSocketMessagesReceived int `json:"total_colibri_web_socket_messages_received"`
|
||||||
|
TotalColibriWebSocketMessagesSent int `json:"total_colibri_web_socket_messages_sent"`
|
||||||
|
TotalParticipants int `json:"total_participants"`
|
||||||
|
OctoVersion int `json:"octo_version"`
|
||||||
|
OctoConferences int `json:"octo_conferences"`
|
||||||
|
OctoEndpoints int `json:"octo_endpoints"`
|
||||||
|
OctoReceiveBitrate float64 `json:"octo_receive_bitrate"`
|
||||||
|
OctoReceivePacketRate float64 `json:"octo_receive_packet_rate"`
|
||||||
|
OctoSendBitrate float64 `json:"octo_send_bitrate"`
|
||||||
|
OctoSendPacketRate float64 `json:"octo_send_packet_rate"`
|
||||||
|
TotalBytesReceivedOcto int `json:"total_bytes_received_octo"`
|
||||||
|
TotalBytesSentOcto int `json:"total_bytes_sent_octo"`
|
||||||
|
TotalPacketsDroppedOcto int `json:"total_packets_dropped_octo"`
|
||||||
|
TotalPacketsReceivedOcto int `json:"total_packets_received_octo"`
|
||||||
|
TotalPacketsSentOcto int `json:"total_packets_sent_octo"`
|
||||||
|
TotalICESucceededRelayed int `json:"total_ice_succeeded_relayed"`
|
||||||
|
TotalICESucceeded int `json:"total_ice_succeeded"`
|
||||||
|
TotalICESucceededTCP int `json:"total_ice_succeeded_tcp"`
|
||||||
|
TotalICEFailed int `json:"total_ice_failed"`
|
||||||
}
|
}
|
||||||
|
|
||||||
var tpl = template.Must(template.New("stats").Parse(`# HELP jitsi_total_participants Participants counter
|
var tpl = template.Must(template.New("stats").Parse(`# HELP jitsi_threads The number of Java threads that the video bridge is using.
|
||||||
# TYPE jitsi_total_participants counter
|
# TYPE jitsi_threads gauge
|
||||||
jitsi_total_participants {{.TotalParticipants}}
|
jitsi_threads {{.Threads}}
|
||||||
# HELP jitsi_total_conferences_created Number of conferences created
|
# HELP jitsi_bit_rate_download The total incoming bitrate for the video bridge in kilobits per second.
|
||||||
# TYPE jitsi_total_conferences_created counter
|
# TYPE jitsi_bit_rate_download gauge
|
||||||
jitsi_total_conferences_created {{.TotalConferencesCreated}}
|
jitsi_bit_rate_download {{.BitRateDownload}}
|
||||||
# HELP jitsi_largest_conference Participants in the largest conference
|
# HELP jitsi_bit_rate_upload The total outgoing bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_upload gauge
|
||||||
|
jitsi_bit_rate_upload {{.BitRateUpload}}
|
||||||
|
# HELP jitsi_packet_rate_download The total incoming packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_download gauge
|
||||||
|
jitsi_packet_rate_download {{.PacketRateDownload}}
|
||||||
|
# HELP jitsi_packet_rate_upload The total outgoing packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_upload gauge
|
||||||
|
jitsi_packet_rate_upload {{.PacketRateUpload}}
|
||||||
|
# HELP jitsi_loss_rate_download The fraction of lost incoming RTP packets. This is based on RTP sequence numbers and is relatively accurate.
|
||||||
|
# TYPE jitsi_loss_rate_download gauge
|
||||||
|
jitsi_loss_rate_download {{.LossRateDownload}}
|
||||||
|
# HELP jitsi_loss_rate_upload The fraction of lost outgoing RTP packets. This is based on incoming RTCP Receiver Reports, and an attempt to subtract the fraction of packets that were not sent (i.e. were lost before they reached the bridge). Further, this is averaged over all streams of all users as opposed to all packets, so it is not correctly weighted. This is not accurate, but may be a useful metric nonetheless.
|
||||||
|
# TYPE jitsi_loss_rate_upload gauge
|
||||||
|
jitsi_loss_rate_upload {{.LossRateUpload}}
|
||||||
|
# HELP jitsi_jitter_aggregate Experimental. An average value (in milliseconds) of the jitter calculated for incoming and outgoing streams. This hasn't been tested and it is currently not known whether the values are correct or not.
|
||||||
|
# TYPE jitsi_jitter_aggregate gauge
|
||||||
|
jitsi_jitter_aggregate {{.JitterAggregate}}
|
||||||
|
# HELP jitsi_rtt_aggregate An average value (in milliseconds) of the RTT across all streams.
|
||||||
|
# TYPE jitsi_rtt_aggregate gauge
|
||||||
|
jitsi_rtt_aggregate {{.RTTAggregate}}
|
||||||
|
# HELP jitsi_largest_conference The number of participants in the largest conference currently hosted on the bridge.
|
||||||
# TYPE jitsi_largest_conference gauge
|
# TYPE jitsi_largest_conference gauge
|
||||||
jitsi_largest_conference {{.LargestConference}}
|
jitsi_largest_conference {{.LargestConference}}
|
||||||
# HELP jitsi_conferences Current number of active conferences
|
# HELP jitsi_audiochannels The current number of audio channels.
|
||||||
|
# TYPE jitsi_audiochannels gauge
|
||||||
|
jitsi_audiochannels {{.AudioChannels}}
|
||||||
|
# HELP jitsi_videochannels The current number of video channels.
|
||||||
|
# TYPE jitsi_videochannels gauge
|
||||||
|
jitsi_videochannels {{.VideoChannels}}
|
||||||
|
# HELP jitsi_conferences The current number of conferences.
|
||||||
# TYPE jitsi_conferences gauge
|
# TYPE jitsi_conferences gauge
|
||||||
jitsi_conferences {{.Conferences}}
|
jitsi_conferences {{.Conferences}}
|
||||||
# HELP jitsi_participants Current number of active participants
|
# HELP jitsi_p2p_conferences The current number of p2p conferences.
|
||||||
|
# TYPE jitsi_p2p_conferences gauge
|
||||||
|
jitsi_p2p_conferences {{.P2PConferences}}
|
||||||
|
# HELP jitsi_participants The current number of participants.
|
||||||
# TYPE jitsi_participants gauge
|
# TYPE jitsi_participants gauge
|
||||||
jitsi_participants {{.Participants}}
|
jitsi_participants {{.Participants}}
|
||||||
|
# HELP jitsi_total_participants Total participants since running.
|
||||||
|
# TYPE jitsi_total_participants gauge
|
||||||
|
jitsi_total_participants {{.TotalParticipants}}
|
||||||
|
# HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge.
|
||||||
|
# TYPE jitsi_videostreams gauge
|
||||||
|
jitsi_videostreams {{.Videostreams}}
|
||||||
|
# HELP jitsi_stress_level Stress Level reported to Jicofo by the videobridge.
|
||||||
|
# TYPE jitsi_stress_level gauge
|
||||||
|
jitsi_stress_level {{.StressLevel}}
|
||||||
|
# HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled.
|
||||||
|
# TYPE jitsi_total_loss_controlled_participant_seconds counter
|
||||||
|
jitsi_total_loss_controlled_participant_seconds {{.TotalLossControlledParticipantSeconds}}
|
||||||
|
# HELP jitsi_total_loss_limited_participant_seconds The total number of participant-seconds that are loss-limited.
|
||||||
|
# TYPE jitsi_total_loss_limited_participant_seconds counter
|
||||||
|
jitsi_total_loss_limited_participant_seconds {{.TotalLossLimitedParticipantSeconds}}
|
||||||
|
# HELP jitsi_total_loss_degraded_participant_seconds The total number of participant-seconds that are loss-degraded.
|
||||||
|
# TYPE jitsi_total_loss_degraded_participant_seconds counter
|
||||||
|
jitsi_total_loss_degraded_participant_seconds {{.TotalLossDegradedParticipantSeconds}}
|
||||||
|
# HELP jitsi_total_conference_seconds The sum of the lengths of all completed conferences, in seconds.
|
||||||
|
# TYPE jitsi_total_conference_seconds counter
|
||||||
|
jitsi_total_conference_seconds {{.TotalConferenceSeconds}}
|
||||||
|
# HELP jitsi_total_conferences_created The total number of conferences created on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_created counter
|
||||||
|
jitsi_total_conferences_created {{.TotalConferencesCreated}}
|
||||||
|
# HELP jitsi_total_conferences_completed The total number of conferences completed on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_completed counter
|
||||||
|
jitsi_total_conferences_completed {{.TotalConferencesCompleted}}
|
||||||
|
# HELP jitsi_total_failed_conferences The total number of failed conferences on the bridge. A conference is marked as failed when all of its channels have failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_failed_conferences counter
|
||||||
|
jitsi_total_failed_conferences {{.TotalFailedConferences}}
|
||||||
|
# HELP jitsi_total_partially_failed_conferences The total number of partially failed conferences on the bridge. A conference is marked as partially failed when some of its channels has failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_partially_failed_conferences counter
|
||||||
|
jitsi_total_partially_failed_conferences {{.TotalPartiallyFailedConferences}}
|
||||||
|
# HELP jitsi_total_data_channel_messages_received The total number messages received through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_received counter
|
||||||
|
jitsi_total_data_channel_messages_received {{.TotalDataChannelMessagesReceived}}
|
||||||
|
# HELP jitsi_total_data_channel_messages_sent The total number messages sent through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_sent counter
|
||||||
|
jitsi_total_data_channel_messages_sent {{.TotalDataChannelMessagesSent}}
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_received The total number messages received through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_received counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_received {{.TotalColibriWebSocketMessagesReceived}}
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_sent {{.TotalColibriWebSocketMessagesSent}}
|
||||||
|
# HELP jitsi_octo_version The current running OCTO version
|
||||||
|
# TYPE jitsi_octo_version gauge
|
||||||
|
jitsi_octo_version {{.OctoVersion}}
|
||||||
|
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||||
|
# TYPE jitsi_octo_conferences gauge
|
||||||
|
jitsi_octo_conferences {{.OctoConferences}}
|
||||||
|
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||||
|
# TYPE jitsi_octo_endpoints gauge
|
||||||
|
jitsi_octo_endpoints {{.OctoEndpoints}}
|
||||||
|
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_receive_bitrate gauge
|
||||||
|
jitsi_octo_receive_bitrate {{.OctoReceiveBitrate}}
|
||||||
|
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_send_bitrate gauge
|
||||||
|
jitsi_octo_send_bitrate {{.OctoSendBitrate}}
|
||||||
|
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||||
|
jitsi_octo_receive_packet_rate {{.OctoReceivePacketRate}}
|
||||||
|
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_send_packet_rate gauge
|
||||||
|
jitsi_octo_send_packet_rate {{.OctoSendPacketRate}}
|
||||||
|
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_received_octo gauge
|
||||||
|
jitsi_total_bytes_received_octo {{.TotalBytesReceivedOcto}}
|
||||||
|
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||||
|
jitsi_total_bytes_sent_octo {{.TotalBytesSentOcto}}
|
||||||
|
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||||
|
jitsi_total_packets_dropped_octo {{.TotalPacketsDroppedOcto}}
|
||||||
|
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_received_octo gauge
|
||||||
|
jitsi_total_packets_received_octo {{.TotalPacketsReceivedOcto}}
|
||||||
|
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_sent_octo gauge
|
||||||
|
jitsi_total_packets_sent_octo {{.TotalPacketsSentOcto}}
|
||||||
|
# HELP total_ice_succeeded_relayed The total number of times an ICE Agent succeeded and the selected candidate pair included a relayed candidate.
|
||||||
|
# TYPE total_ice_succeeded_relayed gauge
|
||||||
|
total_ice_succeeded_relayed {{.TotalICESucceededRelayed}}
|
||||||
|
# HELP total_ice_succeeded The total number of times an ICE Agent succeeded.
|
||||||
|
# TYPE total_ice_succeeded gauge
|
||||||
|
total_ice_succeeded {{.TotalICESucceeded}}
|
||||||
|
# HELP total_ice_succeeded_tcp The total number of times an ICE Agent succeeded and the selected candidate was a TCP candidate.
|
||||||
|
# TYPE total_ice_succeeded_tcp gauge
|
||||||
|
total_ice_succeeded_tcp {{.TotalICESucceededTCP}}
|
||||||
|
# HELP total_ice_failed The total number of times an ICE Agent failed to establish connectivity.
|
||||||
|
# TYPE total_ice_failed gauge
|
||||||
|
total_ice_failed {{.TotalICEFailed}}
|
||||||
|
# HELP jitsi_conference_sizes Distribution of conference sizes
|
||||||
|
# TYPE jitsi_conference_sizes gauge
|
||||||
|
{{ range $key, $value := .ConferenceSizes -}}
|
||||||
|
jitsi_conference_sizes{conference_size="{{$key}}"} {{ $value }}
|
||||||
|
{{ end -}}
|
||||||
|
|
||||||
`))
|
`))
|
||||||
|
|
||||||
func serveMetrics(w http.ResponseWriter, req *http.Request) {
|
type handler struct {
|
||||||
resp, err := http.Get(*videoBridgeURL)
|
sourceURL string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h handler) ServeHTTP(w http.ResponseWriter, req *http.Request) {
|
||||||
|
resp, err := http.Get(h.sourceURL)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Printf("scrape error: %v", err)
|
log.Printf("scrape error: %v", err)
|
||||||
http.Error(w, err.Error(), http.StatusInternalServerError)
|
http.Error(w, err.Error(), http.StatusInternalServerError)
|
||||||
|
@ -63,7 +237,10 @@ func main() {
|
||||||
log.SetFlags(0)
|
log.SetFlags(0)
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
http.HandleFunc("/metrics", serveMetrics)
|
http.Handle("/metrics", handler{sourceURL: *videoBridgeURL})
|
||||||
|
http.HandleFunc("/health", func(w http.ResponseWriter, req *http.Request) {
|
||||||
|
_, _ = w.Write([]byte(`ok`))
|
||||||
|
})
|
||||||
if err := http.ListenAndServe(*addr, nil); err != nil {
|
if err := http.ListenAndServe(*addr, nil); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
443
main_test.go
Normal file
443
main_test.go
Normal file
|
@ -0,0 +1,443 @@
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"net/http"
|
||||||
|
"net/http/httptest"
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/google/go-cmp/cmp"
|
||||||
|
)
|
||||||
|
|
||||||
|
type constHandler struct {
|
||||||
|
s string
|
||||||
|
}
|
||||||
|
|
||||||
|
func (h constHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||||
|
w.Write([]byte(h.s))
|
||||||
|
}
|
||||||
|
|
||||||
|
func TestGetMetrics(t *testing.T) {
|
||||||
|
tcs := []struct {
|
||||||
|
statsJson string
|
||||||
|
expected string
|
||||||
|
}{
|
||||||
|
{
|
||||||
|
statsJson: `{"largest_conference":3,"total_sip_call_failures":0,"total_participants":18,"conference_sizes":[0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"bridge_selector":{"total_least_loaded_in_region":0,"total_split_due_to_load":0,"total_not_loaded_in_region_in_conference":0,"total_least_loaded_in_region_in_conference":0,"total_not_loaded_in_region":0,"total_split_due_to_region":0,"bridge_count":1,"operational_bridge_count":1,"total_least_loaded_in_conference":0,"total_least_loaded":3},"total_conferences_created":14,"total_conferences_completed":0,"total_recording_failures":0,"conferences":2,"p2p_conferences":1,"total_live_streaming_failures":0,"participants":4}`,
|
||||||
|
expected: `# HELP jitsi_threads The number of Java threads that the video bridge is using.
|
||||||
|
# TYPE jitsi_threads gauge
|
||||||
|
jitsi_threads 0
|
||||||
|
# HELP jitsi_bit_rate_download The total incoming bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_download gauge
|
||||||
|
jitsi_bit_rate_download 0
|
||||||
|
# HELP jitsi_bit_rate_upload The total outgoing bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_upload gauge
|
||||||
|
jitsi_bit_rate_upload 0
|
||||||
|
# HELP jitsi_packet_rate_download The total incoming packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_download gauge
|
||||||
|
jitsi_packet_rate_download 0
|
||||||
|
# HELP jitsi_packet_rate_upload The total outgoing packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_upload gauge
|
||||||
|
jitsi_packet_rate_upload 0
|
||||||
|
# HELP jitsi_loss_rate_download The fraction of lost incoming RTP packets. This is based on RTP sequence numbers and is relatively accurate.
|
||||||
|
# TYPE jitsi_loss_rate_download gauge
|
||||||
|
jitsi_loss_rate_download 0
|
||||||
|
# HELP jitsi_loss_rate_upload The fraction of lost outgoing RTP packets. This is based on incoming RTCP Receiver Reports, and an attempt to subtract the fraction of packets that were not sent (i.e. were lost before they reached the bridge). Further, this is averaged over all streams of all users as opposed to all packets, so it is not correctly weighted. This is not accurate, but may be a useful metric nonetheless.
|
||||||
|
# TYPE jitsi_loss_rate_upload gauge
|
||||||
|
jitsi_loss_rate_upload 0
|
||||||
|
# HELP jitsi_jitter_aggregate Experimental. An average value (in milliseconds) of the jitter calculated for incoming and outgoing streams. This hasn't been tested and it is currently not known whether the values are correct or not.
|
||||||
|
# TYPE jitsi_jitter_aggregate gauge
|
||||||
|
jitsi_jitter_aggregate 0
|
||||||
|
# HELP jitsi_rtt_aggregate An average value (in milliseconds) of the RTT across all streams.
|
||||||
|
# TYPE jitsi_rtt_aggregate gauge
|
||||||
|
jitsi_rtt_aggregate 0
|
||||||
|
# HELP jitsi_largest_conference The number of participants in the largest conference currently hosted on the bridge.
|
||||||
|
# TYPE jitsi_largest_conference gauge
|
||||||
|
jitsi_largest_conference 3
|
||||||
|
# HELP jitsi_audiochannels The current number of audio channels.
|
||||||
|
# TYPE jitsi_audiochannels gauge
|
||||||
|
jitsi_audiochannels 0
|
||||||
|
# HELP jitsi_videochannels The current number of video channels.
|
||||||
|
# TYPE jitsi_videochannels gauge
|
||||||
|
jitsi_videochannels 0
|
||||||
|
# HELP jitsi_conferences The current number of conferences.
|
||||||
|
# TYPE jitsi_conferences gauge
|
||||||
|
jitsi_conferences 2
|
||||||
|
# HELP jitsi_p2p_conferences The current number of p2p conferences.
|
||||||
|
# TYPE jitsi_p2p_conferences gauge
|
||||||
|
jitsi_p2p_conferences 1
|
||||||
|
# HELP jitsi_participants The current number of participants.
|
||||||
|
# TYPE jitsi_participants gauge
|
||||||
|
jitsi_participants 4
|
||||||
|
# HELP jitsi_total_participants Total participants since running.
|
||||||
|
# TYPE jitsi_total_participants gauge
|
||||||
|
jitsi_total_participants 18
|
||||||
|
# HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge.
|
||||||
|
# TYPE jitsi_videostreams gauge
|
||||||
|
jitsi_videostreams 0
|
||||||
|
# HELP jitsi_stress_level Stress Level reported to Jicofo by the videobridge.
|
||||||
|
# TYPE jitsi_stress_level gauge
|
||||||
|
jitsi_stress_level 0
|
||||||
|
# HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled.
|
||||||
|
# TYPE jitsi_total_loss_controlled_participant_seconds counter
|
||||||
|
jitsi_total_loss_controlled_participant_seconds 0
|
||||||
|
# HELP jitsi_total_loss_limited_participant_seconds The total number of participant-seconds that are loss-limited.
|
||||||
|
# TYPE jitsi_total_loss_limited_participant_seconds counter
|
||||||
|
jitsi_total_loss_limited_participant_seconds 0
|
||||||
|
# HELP jitsi_total_loss_degraded_participant_seconds The total number of participant-seconds that are loss-degraded.
|
||||||
|
# TYPE jitsi_total_loss_degraded_participant_seconds counter
|
||||||
|
jitsi_total_loss_degraded_participant_seconds 0
|
||||||
|
# HELP jitsi_total_conference_seconds The sum of the lengths of all completed conferences, in seconds.
|
||||||
|
# TYPE jitsi_total_conference_seconds counter
|
||||||
|
jitsi_total_conference_seconds 0
|
||||||
|
# HELP jitsi_total_conferences_created The total number of conferences created on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_created counter
|
||||||
|
jitsi_total_conferences_created 14
|
||||||
|
# HELP jitsi_total_conferences_completed The total number of conferences completed on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_completed counter
|
||||||
|
jitsi_total_conferences_completed 0
|
||||||
|
# HELP jitsi_total_failed_conferences The total number of failed conferences on the bridge. A conference is marked as failed when all of its channels have failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_failed_conferences counter
|
||||||
|
jitsi_total_failed_conferences 0
|
||||||
|
# HELP jitsi_total_partially_failed_conferences The total number of partially failed conferences on the bridge. A conference is marked as partially failed when some of its channels has failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_partially_failed_conferences counter
|
||||||
|
jitsi_total_partially_failed_conferences 0
|
||||||
|
# HELP jitsi_total_data_channel_messages_received The total number messages received through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_received counter
|
||||||
|
jitsi_total_data_channel_messages_received 0
|
||||||
|
# HELP jitsi_total_data_channel_messages_sent The total number messages sent through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_sent counter
|
||||||
|
jitsi_total_data_channel_messages_sent 0
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_received The total number messages received through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_received counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_received 0
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_sent 0
|
||||||
|
# HELP jitsi_octo_version The current running OCTO version
|
||||||
|
# TYPE jitsi_octo_version gauge
|
||||||
|
jitsi_octo_version 0
|
||||||
|
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||||
|
# TYPE jitsi_octo_conferences gauge
|
||||||
|
jitsi_octo_conferences 0
|
||||||
|
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||||
|
# TYPE jitsi_octo_endpoints gauge
|
||||||
|
jitsi_octo_endpoints 0
|
||||||
|
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_receive_bitrate gauge
|
||||||
|
jitsi_octo_receive_bitrate 0
|
||||||
|
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_send_bitrate gauge
|
||||||
|
jitsi_octo_send_bitrate 0
|
||||||
|
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||||
|
jitsi_octo_receive_packet_rate 0
|
||||||
|
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_send_packet_rate gauge
|
||||||
|
jitsi_octo_send_packet_rate 0
|
||||||
|
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_received_octo gauge
|
||||||
|
jitsi_total_bytes_received_octo 0
|
||||||
|
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||||
|
jitsi_total_bytes_sent_octo 0
|
||||||
|
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||||
|
jitsi_total_packets_dropped_octo 0
|
||||||
|
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_received_octo gauge
|
||||||
|
jitsi_total_packets_received_octo 0
|
||||||
|
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_sent_octo gauge
|
||||||
|
jitsi_total_packets_sent_octo 0
|
||||||
|
# HELP total_ice_succeeded_relayed The total number of times an ICE Agent succeeded and the selected candidate pair included a relayed candidate.
|
||||||
|
# TYPE total_ice_succeeded_relayed gauge
|
||||||
|
total_ice_succeeded_relayed 0
|
||||||
|
# HELP total_ice_succeeded The total number of times an ICE Agent succeeded.
|
||||||
|
# TYPE total_ice_succeeded gauge
|
||||||
|
total_ice_succeeded 0
|
||||||
|
# HELP total_ice_succeeded_tcp The total number of times an ICE Agent succeeded and the selected candidate was a TCP candidate.
|
||||||
|
# TYPE total_ice_succeeded_tcp gauge
|
||||||
|
total_ice_succeeded_tcp 0
|
||||||
|
# HELP total_ice_failed The total number of times an ICE Agent failed to establish connectivity.
|
||||||
|
# TYPE total_ice_failed gauge
|
||||||
|
total_ice_failed 0
|
||||||
|
# HELP jitsi_conference_sizes Distribution of conference sizes
|
||||||
|
# TYPE jitsi_conference_sizes gauge
|
||||||
|
jitsi_conference_sizes{conference_size="0"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="1"} 1
|
||||||
|
jitsi_conference_sizes{conference_size="2"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="3"} 1
|
||||||
|
jitsi_conference_sizes{conference_size="4"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="5"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="6"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="7"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="8"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="9"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="10"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="11"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="12"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="13"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="14"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="15"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="16"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="17"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="18"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="19"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="20"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="21"} 0
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
statsJson: `{
|
||||||
|
"audiochannels": 0,
|
||||||
|
"bit_rate_download": 0.5,
|
||||||
|
"bit_rate_upload": 0.5,
|
||||||
|
"conference_sizes": [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ],
|
||||||
|
"conferences": 0,
|
||||||
|
"current_timestamp": "2019-03-14 11:02:15.184",
|
||||||
|
"graceful_shutdown": false,
|
||||||
|
"jitter_aggregate": 0,
|
||||||
|
"largest_conference": 0,
|
||||||
|
"loss_rate_download": 0.5,
|
||||||
|
"loss_rate_upload": 0.5,
|
||||||
|
"octo_conferences": 0,
|
||||||
|
"octo_endpoints": 0,
|
||||||
|
"octo_receive_bitrate": 0.0,
|
||||||
|
"octo_receive_packet_rate": 0,
|
||||||
|
"octo_send_bitrate": 0.0,
|
||||||
|
"octo_send_packet_rate": 0,
|
||||||
|
"octo_version": 1,
|
||||||
|
"packet_rate_download": 0,
|
||||||
|
"packet_rate_upload": 0,
|
||||||
|
"participants": 0,
|
||||||
|
"region": "eu-west-1",
|
||||||
|
"relay_id": "10.0.0.5:4096",
|
||||||
|
"rtp_loss": 0,
|
||||||
|
"rtt_aggregate": 0,
|
||||||
|
"stress_level": 0.6,
|
||||||
|
"threads": 59,
|
||||||
|
"total_bytes_received": 257628359,
|
||||||
|
"total_bytes_received_octo": 0,
|
||||||
|
"total_bytes_received_octo": 0,
|
||||||
|
"total_bytes_sent": 257754048,
|
||||||
|
"total_bytes_sent_octo": 0,
|
||||||
|
"total_bytes_sent_octo": 0,
|
||||||
|
"total_colibri_web_socket_messages_received": 0,
|
||||||
|
"total_colibri_web_socket_messages_sent": 0,
|
||||||
|
"total_conference_seconds": 470,
|
||||||
|
"total_conferences_completed": 1,
|
||||||
|
"total_conferences_created": 1,
|
||||||
|
"total_data_channel_messages_received": 602,
|
||||||
|
"total_data_channel_messages_sent": 600,
|
||||||
|
"total_failed_conferences": 0,
|
||||||
|
"total_ice_failed": 0,
|
||||||
|
"total_ice_succeeded": 2,
|
||||||
|
"total_ice_succeeded_tcp": 1,
|
||||||
|
"total_loss_controlled_participant_seconds": 847,
|
||||||
|
"total_loss_degraded_participant_seconds": 1,
|
||||||
|
"total_loss_limited_participant_seconds": 0,
|
||||||
|
"total_packets_dropped_octo": 0,
|
||||||
|
"total_packets_dropped_octo": 0,
|
||||||
|
"total_packets_received": 266644,
|
||||||
|
"total_packets_received_octo": 0,
|
||||||
|
"total_packets_received_octo": 0,
|
||||||
|
"total_packets_sent": 266556,
|
||||||
|
"total_packets_sent_octo": 0,
|
||||||
|
"total_packets_sent_octo": 0,
|
||||||
|
"total_partially_failed_conferences": 0,
|
||||||
|
"total_participants": 2,
|
||||||
|
"total_ice_succeeded_relayed": 3,
|
||||||
|
"videochannels": 0,
|
||||||
|
"videostreams": 0
|
||||||
|
}`,
|
||||||
|
expected: `# HELP jitsi_threads The number of Java threads that the video bridge is using.
|
||||||
|
# TYPE jitsi_threads gauge
|
||||||
|
jitsi_threads 59
|
||||||
|
# HELP jitsi_bit_rate_download The total incoming bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_download gauge
|
||||||
|
jitsi_bit_rate_download 0.5
|
||||||
|
# HELP jitsi_bit_rate_upload The total outgoing bitrate for the video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_bit_rate_upload gauge
|
||||||
|
jitsi_bit_rate_upload 0.5
|
||||||
|
# HELP jitsi_packet_rate_download The total incoming packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_download gauge
|
||||||
|
jitsi_packet_rate_download 0
|
||||||
|
# HELP jitsi_packet_rate_upload The total outgoing packet rate for the video bridge in packets per second.
|
||||||
|
# TYPE jitsi_packet_rate_upload gauge
|
||||||
|
jitsi_packet_rate_upload 0
|
||||||
|
# HELP jitsi_loss_rate_download The fraction of lost incoming RTP packets. This is based on RTP sequence numbers and is relatively accurate.
|
||||||
|
# TYPE jitsi_loss_rate_download gauge
|
||||||
|
jitsi_loss_rate_download 0.5
|
||||||
|
# HELP jitsi_loss_rate_upload The fraction of lost outgoing RTP packets. This is based on incoming RTCP Receiver Reports, and an attempt to subtract the fraction of packets that were not sent (i.e. were lost before they reached the bridge). Further, this is averaged over all streams of all users as opposed to all packets, so it is not correctly weighted. This is not accurate, but may be a useful metric nonetheless.
|
||||||
|
# TYPE jitsi_loss_rate_upload gauge
|
||||||
|
jitsi_loss_rate_upload 0.5
|
||||||
|
# HELP jitsi_jitter_aggregate Experimental. An average value (in milliseconds) of the jitter calculated for incoming and outgoing streams. This hasn't been tested and it is currently not known whether the values are correct or not.
|
||||||
|
# TYPE jitsi_jitter_aggregate gauge
|
||||||
|
jitsi_jitter_aggregate 0
|
||||||
|
# HELP jitsi_rtt_aggregate An average value (in milliseconds) of the RTT across all streams.
|
||||||
|
# TYPE jitsi_rtt_aggregate gauge
|
||||||
|
jitsi_rtt_aggregate 0
|
||||||
|
# HELP jitsi_largest_conference The number of participants in the largest conference currently hosted on the bridge.
|
||||||
|
# TYPE jitsi_largest_conference gauge
|
||||||
|
jitsi_largest_conference 0
|
||||||
|
# HELP jitsi_audiochannels The current number of audio channels.
|
||||||
|
# TYPE jitsi_audiochannels gauge
|
||||||
|
jitsi_audiochannels 0
|
||||||
|
# HELP jitsi_videochannels The current number of video channels.
|
||||||
|
# TYPE jitsi_videochannels gauge
|
||||||
|
jitsi_videochannels 0
|
||||||
|
# HELP jitsi_conferences The current number of conferences.
|
||||||
|
# TYPE jitsi_conferences gauge
|
||||||
|
jitsi_conferences 0
|
||||||
|
# HELP jitsi_p2p_conferences The current number of p2p conferences.
|
||||||
|
# TYPE jitsi_p2p_conferences gauge
|
||||||
|
jitsi_p2p_conferences 0
|
||||||
|
# HELP jitsi_participants The current number of participants.
|
||||||
|
# TYPE jitsi_participants gauge
|
||||||
|
jitsi_participants 0
|
||||||
|
# HELP jitsi_total_participants Total participants since running.
|
||||||
|
# TYPE jitsi_total_participants gauge
|
||||||
|
jitsi_total_participants 2
|
||||||
|
# HELP jitsi_videostreams An estimation of the number of current video streams forwarded by the bridge.
|
||||||
|
# TYPE jitsi_videostreams gauge
|
||||||
|
jitsi_videostreams 0
|
||||||
|
# HELP jitsi_stress_level Stress Level reported to Jicofo by the videobridge.
|
||||||
|
# TYPE jitsi_stress_level gauge
|
||||||
|
jitsi_stress_level 0.6
|
||||||
|
# HELP jitsi_total_loss_controlled_participant_seconds The total number of participant-seconds that are loss-controlled.
|
||||||
|
# TYPE jitsi_total_loss_controlled_participant_seconds counter
|
||||||
|
jitsi_total_loss_controlled_participant_seconds 847
|
||||||
|
# HELP jitsi_total_loss_limited_participant_seconds The total number of participant-seconds that are loss-limited.
|
||||||
|
# TYPE jitsi_total_loss_limited_participant_seconds counter
|
||||||
|
jitsi_total_loss_limited_participant_seconds 0
|
||||||
|
# HELP jitsi_total_loss_degraded_participant_seconds The total number of participant-seconds that are loss-degraded.
|
||||||
|
# TYPE jitsi_total_loss_degraded_participant_seconds counter
|
||||||
|
jitsi_total_loss_degraded_participant_seconds 1
|
||||||
|
# HELP jitsi_total_conference_seconds The sum of the lengths of all completed conferences, in seconds.
|
||||||
|
# TYPE jitsi_total_conference_seconds counter
|
||||||
|
jitsi_total_conference_seconds 470
|
||||||
|
# HELP jitsi_total_conferences_created The total number of conferences created on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_created counter
|
||||||
|
jitsi_total_conferences_created 1
|
||||||
|
# HELP jitsi_total_conferences_completed The total number of conferences completed on the bridge.
|
||||||
|
# TYPE jitsi_total_conferences_completed counter
|
||||||
|
jitsi_total_conferences_completed 1
|
||||||
|
# HELP jitsi_total_failed_conferences The total number of failed conferences on the bridge. A conference is marked as failed when all of its channels have failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_failed_conferences counter
|
||||||
|
jitsi_total_failed_conferences 0
|
||||||
|
# HELP jitsi_total_partially_failed_conferences The total number of partially failed conferences on the bridge. A conference is marked as partially failed when some of its channels has failed. A channel is marked as failed if it had no payload activity.
|
||||||
|
# TYPE jitsi_total_partially_failed_conferences counter
|
||||||
|
jitsi_total_partially_failed_conferences 0
|
||||||
|
# HELP jitsi_total_data_channel_messages_received The total number messages received through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_received counter
|
||||||
|
jitsi_total_data_channel_messages_received 602
|
||||||
|
# HELP jitsi_total_data_channel_messages_sent The total number messages sent through data channels.
|
||||||
|
# TYPE jitsi_total_data_channel_messages_sent counter
|
||||||
|
jitsi_total_data_channel_messages_sent 600
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_received The total number messages received through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_received counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_received 0
|
||||||
|
# HELP jitsi_total_colibri_web_socket_messages_sent The total number messages sent through COLIBRI web sockets.
|
||||||
|
# TYPE jitsi_total_colibri_web_socket_messages_sent counter
|
||||||
|
jitsi_total_colibri_web_socket_messages_sent 0
|
||||||
|
# HELP jitsi_octo_version The current running OCTO version
|
||||||
|
# TYPE jitsi_octo_version gauge
|
||||||
|
jitsi_octo_version 1
|
||||||
|
# HELP jitsi_octo_conferences The current number of OCTO conferences.
|
||||||
|
# TYPE jitsi_octo_conferences gauge
|
||||||
|
jitsi_octo_conferences 0
|
||||||
|
# HELP jitsi_octo_endpoints The current number of OCTO endpoints.
|
||||||
|
# TYPE jitsi_octo_endpoints gauge
|
||||||
|
jitsi_octo_endpoints 0
|
||||||
|
# HELP jitsi_octo_receive_bitrate The total receiving bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_receive_bitrate gauge
|
||||||
|
jitsi_octo_receive_bitrate 0
|
||||||
|
# HELP jitsi_octo_send_bitrate The total outgoing bitrate for the OCTO video bridge in kilobits per second.
|
||||||
|
# TYPE jitsi_octo_send_bitrate gauge
|
||||||
|
jitsi_octo_send_bitrate 0
|
||||||
|
# HELP jitsi_octo_receive_packet_rate The total incoming packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_receive_packet_rate gauge
|
||||||
|
jitsi_octo_receive_packet_rate 0
|
||||||
|
# HELP jitsi_octo_send_packet_rate The total outgoing packet rate for the OCTO video bridge in packets per second.
|
||||||
|
# TYPE jitsi_octo_send_packet_rate gauge
|
||||||
|
jitsi_octo_send_packet_rate 0
|
||||||
|
# HELP jitsi_total_bytes_received_octo The total incoming bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_received_octo gauge
|
||||||
|
jitsi_total_bytes_received_octo 0
|
||||||
|
# HELP jitsi_total_bytes_sent_octo The total outgoing bit rate for the OCTO video bridge in bytes per second.
|
||||||
|
# TYPE jitsi_total_bytes_sent_octo gauge
|
||||||
|
jitsi_total_bytes_sent_octo 0
|
||||||
|
# HELP jitsi_total_packets_dropped_octo The total of dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_dropped_octo gauge
|
||||||
|
jitsi_total_packets_dropped_octo 0
|
||||||
|
# HELP jitsi_total_packets_received_octo The total of incoming dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_received_octo gauge
|
||||||
|
jitsi_total_packets_received_octo 0
|
||||||
|
# HELP jitsi_total_packets_sent_octo The total of sent dropped packets handled by the OCTO video bridge.
|
||||||
|
# TYPE jitsi_total_packets_sent_octo gauge
|
||||||
|
jitsi_total_packets_sent_octo 0
|
||||||
|
# HELP total_ice_succeeded_relayed The total number of times an ICE Agent succeeded and the selected candidate pair included a relayed candidate.
|
||||||
|
# TYPE total_ice_succeeded_relayed gauge
|
||||||
|
total_ice_succeeded_relayed 3
|
||||||
|
# HELP total_ice_succeeded The total number of times an ICE Agent succeeded.
|
||||||
|
# TYPE total_ice_succeeded gauge
|
||||||
|
total_ice_succeeded 2
|
||||||
|
# HELP total_ice_succeeded_tcp The total number of times an ICE Agent succeeded and the selected candidate was a TCP candidate.
|
||||||
|
# TYPE total_ice_succeeded_tcp gauge
|
||||||
|
total_ice_succeeded_tcp 1
|
||||||
|
# HELP total_ice_failed The total number of times an ICE Agent failed to establish connectivity.
|
||||||
|
# TYPE total_ice_failed gauge
|
||||||
|
total_ice_failed 0
|
||||||
|
# HELP jitsi_conference_sizes Distribution of conference sizes
|
||||||
|
# TYPE jitsi_conference_sizes gauge
|
||||||
|
jitsi_conference_sizes{conference_size="0"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="1"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="2"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="3"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="4"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="5"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="6"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="7"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="8"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="9"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="10"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="11"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="12"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="13"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="14"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="15"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="16"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="17"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="18"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="19"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="20"} 0
|
||||||
|
jitsi_conference_sizes{conference_size="21"} 0
|
||||||
|
`,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
for _, tc := range tcs {
|
||||||
|
srv := httptest.NewServer(constHandler{tc.statsJson})
|
||||||
|
|
||||||
|
h := handler{
|
||||||
|
sourceURL: srv.URL,
|
||||||
|
}
|
||||||
|
req, err := http.NewRequest("GET", "/metrics", nil)
|
||||||
|
if err != nil {
|
||||||
|
t.Fatal(err)
|
||||||
|
}
|
||||||
|
|
||||||
|
rr := httptest.NewRecorder()
|
||||||
|
h.ServeHTTP(rr, req)
|
||||||
|
|
||||||
|
if status := rr.Code; status != http.StatusOK {
|
||||||
|
t.Errorf("handler returned wrong status code: got %v want %v", status, http.StatusOK)
|
||||||
|
}
|
||||||
|
|
||||||
|
if rr.Body.String() != tc.expected {
|
||||||
|
t.Errorf("Response does not match the expected string:\n%s", cmp.Diff(rr.Body.String(), tc.expected))
|
||||||
|
}
|
||||||
|
|
||||||
|
srv.Close()
|
||||||
|
}
|
||||||
|
}
|
Loading…
Add table
Reference in a new issue