Wowza Community

Get actual network status in API REST

Hi, I would like to know how request by api rest the bytesinrate and bytesoutrate of the whole server because I have only found the request for historic but not for actual/current,

Thanks

Hi,

You can use a GET request on the following endpoint to get the current statistics:

http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/monitoring/current

It should return data similar to:

{
"serverName": "_defaultServer_"
"uptime": 712
"bytesIn": 10481884
"bytesOut": 760
"bytesInRate": 16614
"bytesOutRate": 0
"totalConnections": 0
"connectionCount": {
"WEBM": 0
"DVRCHUNKS": 0
"RTMP": 0
"MPEGDASH": 0
"CUPERTINO": 0
"SANJOSE": 0
"SMOOTH": 0
"RTP": 0
}-
}

Michelle

Hi,

While this is not tracked on a server-level, you can track it on a VHost level. Unless you have multiple VHosts, then it should be able to provide you with the aggregate bytesIn and bytesOut for your server. Otherwise, if you have multiple VHosts, then you will need to iterate through each VHost.

The endpoint that you will need is as follows:

GET /v2/servers/{serverName}/vhosts/{vhostName}/monitoring/current

And the output would be similar to:

{
  "serverName": "_defaultServer_",
  "uptime": 22456,
  "bytesIn": 0,
  "bytesOut": 27174836,
  "totalConnections": 0,
  "connectionCount": {
    "WEBM": 0,
    "DVRCHUNKS": 0,
    "RTMP": 0,
    "MPEGDASH": 0,
    "CUPERTINO": 0,
    "SANJOSE": 0,
    "SMOOTH": 0,
    "RTP": 0
  }
}

Michelle

Hi,

You can use a GET request on the following endpoint to get the current statistics:

http://localhost:8087/v2/servers/_defaultServer_/vhosts/_defaultVHost_/applications/live/monitoring/current

It should return data similar to:

{
"serverName": "_defaultServer_"
"uptime": 712
"bytesIn": 10481884
"bytesOut": 760
"bytesInRate": 16614
"bytesOutRate": 0
"totalConnections": 0
"connectionCount": {
"WEBM": 0
"DVRCHUNKS": 0
"RTMP": 0
"MPEGDASH": 0
"CUPERTINO": 0
"SANJOSE": 0
"SMOOTH": 0
"RTP": 0
}-
}

Michelle

But is there any request toget the whole network? I mean vod, medicache live etc all in one like whole byteoutrate