Monitor Wowza ClearCaster broadcasts with the GraphQL API

The Wowza™ ClearCaster GraphQL API provides a variety of near real-time stream health metrics to help you ensure that broadcasts from your Wowza ClearCaster™ appliance run smoothly. The metrics are also available after the broadcast ends. The following are some examples of the monitoring queries you may find useful.

Note: Wowza ClearCaster version 2.0.0.07 or later is required.

Query by broadcast


Analyze bandwidth, and any possible issues, at the encoder output as well as the stream target destination.

query nearRealTimeDataByBroadcast {
  nearRealTimeDataByBroadcast(
    broadcastId: "yourBroadCastID",
    startDateTime: 1562082452000,
    range: 300000
    ) {
      serial
      timestamp        
      streamTargets {
        id
        outputId
        url
        pushpubConnectAttemptCount
        pushpubTotalPacketsSent
        pushpubLastVideoTC
        forceReconnectCount
        ioSessionScheduledWriteBytesToZero
        pingTime
      }
      encoder {
        outputs {
          id
          videoBitrate
          videoBitrateCurrent
          videoBitrateMeasure
          audioBitrate
          audioBitrateMeasure
          }
	videoDecoderCaptureInfo{
          droppedFrames
          }
        }

     }
}

Query by encoder


  • Analyze bandwidth, and any possible issues, at the encoder output as well as the stream target destination.
    query statusByencoderDeviceIdAllDataOutputandTarget {
      encoderByDeviceId(
        deviceId: "encoderDeviceId") {
        name
        activeBroadcast{
          name
          status
          outputs {
            id
            streamName
          }
        }
        nearRealTimeData{
    streamTargets{
      	id
      	outputId
      	url
      	pushpubConnectAttemptCount
      	pushpubTotalPacketsSent
      	pushpubLastVideoTC
      	forceReconnectCount
      	ioSessionScheduledWriteBytesToZero
      	pingTime
        }
    encoder{
      	outputs{
          id
          videoBitrate
          videoBitrateCurrent
          videoBitrateMeasure
          audioBitrate
          audioBitrateMeasure}
      	videoDecoderCaptureInfo{
          droppedFrames}
     
        }
         
        }
      }
    }
  • Identify source information and encoding settings.
    query statusByencoderDeviceIdCapturesession {
      encoderByDeviceId(
        deviceId: "encoderDeviceId") {
        name
        updatedAt
        captureSessionInfo {
          updatedAt
          videoEnable
          videoInput
          videoFrameCountTotal
          videoFrameCountModeSwitch
          videoLastTimecode
          videoTimescale
          videoLastFrameIndex
          videoLastGOPDuration
          videoLastFrameWidth
          videoLastFrameHeight
          videoDroppedFrames
          videoColorSpace
          videoFrameWidth
          videoFrameHeight
          videoProgressive
          video3D
          videoFrameRateDivisor
          videoFrameRateEnum
          videoFrameRateDen
          videoKeyFrameIntervalAdjusted
          videoVANCPacketsTotal
          videoVANCPacketsModeSwitch
          videoVANCCEA708PacketsTotal
          videoVANCCEA708PacketsModeSwitch
          audioEnable
          audioInput
          audioFrameCountTotal
          audioFrameCountModeSwitch
          audioLastTimecode
          audioTimescale
          audioSampleRate
          audioChannels
          audioBytesPerSample
          videoFrameRate  
        }
      }
    }
  • Analyze a stream target's network issues.
    query statusByencoderDeviceId_targetnetwork {
      encoderByDeviceId(
        deviceId: "encoderDeviceId") {
        id
        name
        nearRealTimeData{
          streamTargets{
            id
              ssNetworkInfo{
                cong_alg
                rto
                rtt
                rttvar
                mss
                rcvmss
                advmss
                cwnd
                bytes_acked
                bytes_received
                send_bps
                pacing_rate
                pacing_rate_max
                delivery_rate
                retrans
                retrans_total
                lost
                not_sent
                min_rtt
                bbr_bw
                bbr_min_rtt
                bbr_pacing_gain
                bbr_cwnd_gain}
    				    }
         
        }
      }
    }
  • Monitor the encoder's health.
    query statusByencoderDevice_Appliance {
      encoderByDeviceId(
        deviceId: "encoderDeviceId") {
        id
        deviceId
        name 
        nearRealTimeData{
                hardwareDynamic{
            cpuLoadSystem
            cpuLoadProcess
            cpuTempurature
            cpuCoreInfo{
              coreThrottleCount
              packageThrottleCount
              scalingCurrentFrequency}
            memoryPhysicalFree
            memoryPhysicalAvailable
            memorySwapFree
            fileDescriptorCountUsed
        networkInfo{
        name
        statsRXBytes
        statsRXErrors
        statsRXDropped
        statsTXBytes
        statsTXErrors
        statsTXDropped}}
         
        }
      }
    }
  • Check the encoder's status.
    query statusByencoderDeviceId {
      encoderByDeviceId(
        deviceId: "encoderDeviceId") {
        name
        updatedAt
        encoderStatus {
          status
          broadcastId
        }
      }
    }
  • Query all stream health data for a broadcast.
    query statusByencoderDeviceIdAllData {
      encoderByDeviceId(
        deviceId: "encoderDeviceId") {
        id
        deviceId
        name
        createdAt
        updatedAt
        namespace {
          id
          name
        }
        extraProperties {
          name
          value
          type
        }
        encoderStatus {
          status
          broadcastId
          clearCasterSoftwareVersion
          updatedAt
        }
        captureSessionInfo {
          updatedAt
          videoEnable
          videoInput
          videoFrameCountTotal
          videoFrameCountModeSwitch
          videoLastTimecode
          videoTimescale
          videoLastFrameIndex
          videoLastGOPDuration
          videoLastFrameWidth
          videoLastFrameHeight
          videoDroppedFrames
          videoColorSpace
          videoFrameWidth
          videoFrameHeight
          videoProgressive
          video3D
          videoFrameRateDivisor
          videoFrameRateEnum
          videoFrameRateDen
          videoKeyFrameIntervalAdjusted
          videoVANCPacketsTotal
          videoVANCPacketsModeSwitch
          videoVANCCEA708PacketsTotal
          videoVANCCEA708PacketsModeSwitch
          audioEnable
          audioInput
          audioFrameCountTotal
          audioFrameCountModeSwitch
          audioLastTimecode
          audioTimescale
          audioSampleRate
          audioChannels
          audioBytesPerSample
          videoFrameRate
    
        }
        activeBroadcast{
          id
          name
          status
          input {
            id
          }
          outputs {
            id
            streamName
            streamTargets {
              id
            }
          }
        }
        nearRealTimeData{
    timestamp
    eventId
    eventType
    eventTime
    serial
    clearcasterVersion
    encoderState
    source
    hardwareDynamic{
      cpuLoadSystem
        cpuLoadProcess
        cpuTempurature
        cpuCoreInfo{
        coreThrottleCount
        packageThrottleCount
        scalingCurrentFrequency}
        memoryPhysicalFree
        memoryPhysicalAvailable
        memorySwapFree
        fileDescriptorCountUsed
        networkInfo{
        name
        statsRXBytes
        statsRXErrors
        statsRXDropped
        statsTXBytes
        statsTXErrors
        statsTXDropped}}
    streamTargets{
        id
        outputId
        url
        pushpubConnectLastAttempt
        pushpubConnectLastSuccess
        pushpubConnectAttemptCount
        pushpubTotalPacketsSent
        pushpubLastVideoTC
        pushpubLastVideoKeyFrameTC
        pushpubOriginalTimecodeOffset
        forceReconnectCount
        ioSessionWrittenBytes
        ioSessionScheduledWriteBytes
        ioSessionScheduledWriteBytesToZero
        pingTime
        ssNetworkInfo{
          cong_alg
          rto
          rtt
          rttvar
          mss
          rcvmss
          advmss
          cwnd
          bytes_acked
          bytes_received
          send_bps
          pacing_rate
          pacing_rate_max
          delivery_rate
          retrans
          retrans_total
          lost
          not_sent
          min_rtt
          bbr_bw
          bbr_min_rtt
          bbr_pacing_gain
          bbr_cwnd_gain}
        }
    encoder{
        outputs{
          id
          videoBitrate
          videoBitrateCurrent
          videoBitrateMeasure
          audioBitrate
          audioBitrateMeasure
          audioChannels
          audioSampleRate
          lastVideoFrameTimecode
          lastAudioFrameTimecode
          lastAudioFrameTimecodeMS}
        videoDecoderCaptureInfo{
          droppedFrames
          frameCountTotal
          lastTimecode
          frameSyncCount}
        graphAPIStatus{
          lastRequestTime
          lastNetworkFailTime
          networkStatus}
        graphQLSubscriptionClient{
          url
          isConnected
          connectionCount
          lastConnectionAttempt
          lastConnectionSuccess}
        captureSessionAudioLevelData{
          timecode
          averageLeft
          averageRight
          peakLeft
          peakRight}
        }
        }
      }
    }