Skip to content

BigBlueButton telegraf external plugin. Gather meetings and recordings metrics about your BigBlueButton server

License

Notifications You must be signed in to change notification settings

bigblueswarm/bigbluebutton-telegraf-plugin

Repository files navigation

BigBlueButton Input Plugin

Codacy Badge Codacy Badge Code linting Unit tests GitHub go.mod Go version GitHub

The BigBlueButton Input Plugin gathers metrics from BigBlueButton server. It uses BigBlueButton API getMeetings and getRecordings endpoints to query the data.

Configuration

[[inputs.bigbluebutton]]
	## Required BigBlueButton server url
	url = "http://localhost:8090"

	## BigBlueButton path prefix. Default is "/bigbluebutton"
	# path_prefix = "/bigbluebutton"

	## Required BigBlueButton secret key
	secret_key = ""

	## Gather metrics by metadata
	# Using this option, gathering data will also insert metrics grouped by metadata configuration
	# gather_by_metadata = []

	## Optional HTTP Basic Auth Credentials
	# username = "username"
	# password = "pa$$word

	## Optional HTTP Proxy support
	# http_proxy_url = ""

	## Optional TLS Config
	# tls_ca = "/etc/telegraf/ca.pem"
	# tls_cert = "/etc/telegraf/cert.pem"
	# tls_key = "/etc/telegraf/key.pem"

	## Use TLS but skip chain & host verification
	# insecure_skip_verify = false

Metrics

  • bigbluebutton:
    • fields:
      • meetings
      • participants
      • listener_participants
      • voice_participants
      • video_participants
      • active_recordings
      • recordings
      • published_recordings
      • online

Using the gather_by_metadata, plugin will add meetings and recordings metrics grouped by meetings provided metadata like the following:

tenant active_recordings=0i,listener_participants=0i,participants=0i,video_participants=0i,voice_participants=0i,meetings=1i 0

For example, using the following configuration:

## Gather metrics by metadata
# Using this option, gathering data will also insert metrics grouped by metadata configuration
gather_by_metadata = ["tenant"]

With a meeting:

<meeting>
	<meetingName>Meeting 2</meetingName>
	<meetingID>b0a78452-2266-4a0a-abae-8a016db8fccd</meetingID>
	<internalMeetingID>6e2f5787a62c9c3e13ee557c847decded4a53d59-1613138647914</internalMeetingID>
	<createTime>1613138647914</createTime>
	<createDate>Fri Feb 12 15:04:07 CET 2021</createDate>
	<voiceBridge>75042</voiceBridge>
	<dialNumber>613-555-1234</dialNumber>
	<attendeePW>e313fc20-2247-48dd-884a-b1cb48c7919c</attendeePW>
	<moderatorPW>be89c431-00d9-4e38-a2f9-c9a54c9873a3</moderatorPW>
	<running>true</running>
	<duration>0</duration>
	<hasUserJoined>true</hasUserJoined>
	<recording>false</recording>
	<hasBeenForciblyEnded>false</hasBeenForciblyEnded>
	<startTime>1613138647937</startTime>
	<endTime>0</endTime>
	<participantCount>5</participantCount>
	<listenerCount>3</listenerCount>
	<voiceParticipantCount>3</voiceParticipantCount>
	<videoCount>1</videoCount>
	<maxUsers>0</maxUsers>
	<moderatorCount>1</moderatorCount>
	<attendees>
	</attendees>
	<metadata>
		<tenant>localhost</tenant>
	</metadata>
	<isBreakout>false</isBreakout>
</meeting>

will generate the following metric:

tenant active_recordings=0i,listener_participants=3i,participants=5i,video_participants=1i,voice_participants=3i,meetings=1i,tenant=localhost 1617611008787972024

Example output

bigbluebutton meetings=0i,voice_participants=0i,recordings=0i,active_recordings=0i,participants=0i,listener_participants=0i,published_recordings=0i,online=1i,video_participants=0i 1673991941312623800
tenant voice_participants=0i,video_participants=0i,online=1i,meetings=1i,participants=0i,active_recordings=0i,listener_participants=0i,published_recordings=0i,recordings=0i,tenant=locahost 1673992041293464800

Installation

  • Download the latest release from release page
  • Configure telegraf to call it using execd
[[inputs.execd]]
 command = ["/path/to/bbb-telegraf", "-config", "/path/to/bbb-telegraf/config", "-poll_interval", "10s"]
 signal = "none"

Alternatively, you can build your own binary using:

git clone git@github.com:SLedunois/bigbluebutton-telegraf-plugin.git
go build -o bbb-telegraf cmd/main.go