Skip to content

Commit

Permalink
Merge pull request #124 from tibroc/export-bbb-version
Browse files Browse the repository at this point in the history
make BBB version available as metric
  • Loading branch information
greenstatic committed Nov 22, 2023
2 parents 50ffb96 + af9d025 commit 7371d8e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
7 changes: 7 additions & 0 deletions bbb-exporter/collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,13 @@ def collect(self):
bbb_exporter.add_metric([settings.VERSION], 1)
yield bbb_exporter

# read BBB version from disk
with open("/etc/bigbluebutton/bigbluebutton-release", "r") as f:
bbb_release = f.read()
bbb_version = GaugeMetricFamily("bbb_version", "BigBlueButton version", labels=["version"])
bbb_version.add_metric([bbb_release.strip().split("=")[1]], 1)
yield bbb_version

logging.info("Finished collecting metrics from BigBlueButton API")

def metric_meetings(self, meetings):
Expand Down
1 change: 1 addition & 0 deletions extras/docker-compose.exporter.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
ports:
- "127.0.0.1:9688:9688"
volumes:
- "/etc/bigbluebutton/bigbluebutton-release:/etc/bigbluebutton/bigbluebutton-release:ro"
# Can be removed if `RECORDINGS_METRICS_READ_FROM_DISK` is set to false (or omitted).
# See https://bigbluebutton-exporter.greenstatic.dev/exporter-user-guide/#optimizations for details.
- "/var/bigbluebutton:/var/bigbluebutton:ro"
Expand Down

0 comments on commit 7371d8e

Please sign in to comment.