diff --git a/doc/newrelic.md b/doc/newrelic.md index bf69a19907..9c2409b30c 100644 --- a/doc/newrelic.md +++ b/doc/newrelic.md @@ -1,14 +1,34 @@ -# Enable newrelic +# Enable New Relic Metrics -Download newrelic.jar from your account there. The default not enabled config -expects that file is in /usr/share/newrelic/newrelic.jar. +Read the New Relic documentation and download newrelic.jar at: +[https://docs.newrelic.com/docs/agents/java-agent/installation/java-agent-manual-installation](). +The expected location of the jar file is /usr/share/newrelic/newrelic.jar -Put the config file in /etc/jitsi/videobridge/newrelic.yml (the same, this is -the default location and can be changed). -The newrelic.yml is a standard config file for newrelic you can find -more info at: +newrelic.yml is the standard config file for New Relic, you can find more info at: [https://docs.newrelic.com/docs/agents/java-agent/configuration/java-agent-config-file-template]() +Put newrelic.yml in the default location of /etc/jitsi/videobridge/newrelic.yml. +This can be changed in your video bridge config file by setting +```json +newrelic.config.file=/my/new/location/newrelic.jar +``` + Uncomment the property JVB_EXTRA_JVM_PARAMS in /etc/jitsi/videobridge/config. And put the following property in /etc/jitsi/videobridge/sip-communicator.properties: +```json org.jitsi.videobridge.metricservice.NewRelic=org.jitsi.videobridge.metrics.NewRelicMetricPublisher +``` + +## Metrics Produced + * Channels - total number of channels in a conference + * Conference length - total length of conference in seconds + * Video Streams - total number of video streams in a conference + * Nb download packet loss - The number of RTP packets sent by the remote side, but not received by the video bridge + * Nb upload packet loss - The number of RTP packets sent by the video bridge, but not received by the remote side. + * Min download jitter - The minimum RTP jitter value reported by the video bridge in an RTCP report, in millisecond. + * Max download jitter - The maximum RTP jitter value reported by the video bridge in an RTCP report, in milliseconds. + * Avg download jitter - The average of the RTP jitter values reported to the video bridge in RTCP reports, in milliseconds + * Min upload jitter - The minimum RTP jitter value reported to the video bridge in an RTCP report, in milliseconds. + * Max upload jitter - The maximum RTP jitter value reported to the video bridge in an RTCP report, in milliseconds. + * Avg upload jitter - The average of the RTP jitter values reported to the video bridge in RTCP reports, in milliseconds. + * Endpoints - Total number or endpoints/particpants connected to a conference
 \ No newline at end of file diff --git a/src/main/java/org/jitsi/videobridge/metrics/MetricLoggingHandler.java b/src/main/java/org/jitsi/videobridge/metrics/MetricLoggingHandler.java index b847aa23ef..cb5574658c 100644 --- a/src/main/java/org/jitsi/videobridge/metrics/MetricLoggingHandler.java +++ b/src/main/java/org/jitsi/videobridge/metrics/MetricLoggingHandler.java @@ -15,13 +15,16 @@ */ package org.jitsi.videobridge.metrics; -import java.util.*; - -import org.jitsi.service.configuration.*; -import org.jitsi.service.neomedia.*; -import org.jitsi.util.*; +import org.jitsi.eventadmin.Event; +import org.jitsi.eventadmin.EventHandler; +import org.jitsi.service.configuration.ConfigurationService; +import org.jitsi.service.neomedia.MediaStream; +import org.jitsi.service.neomedia.MediaStreamStats; +import org.jitsi.util.Logger; import org.jitsi.videobridge.*; -import org.jitsi.eventadmin.*; + +import java.util.LinkedList; +import java.util.List; /** * A generic service interface to push metrics to cloud based collector servers. @@ -119,6 +122,11 @@ public class MetricLoggingHandler public static final String METRIC_UPLOAD_AVG_JITTER = "Avg upload jitter"; + /**
 + * Total number or endpoints connected to a conference
 + */ + public static final String METRIC_ENDPOINTS = "Endpoints"; + public MetricLoggingHandler(ConfigurationService config) { this.publishers = new LinkedList<>(); @@ -444,6 +452,8 @@ public void handleEvent(Event event) publishNumericMetric( METRIC_VIDEO_STREAMS, videobridge.getConferenceMetrics()[1]); + + publishNumericMetric(METRIC_ENDPOINTS, conference.getEndpointCount()); } else if ( EventFactory.CONFERENCE_CREATED_TOPIC.equals(event.getTopic()))