forked from External/mediamtx
api, metrics: add number of bytes received and sent from/to all entities (#1235)
* API: number of bytes received/sent from/to RTSP connections * API: number of bytes received/sent from/to RTSP sessions * API: number of bytes received/sent from/to RTMP connections * API: number of bytes sent to HLS connections * API: number of bytes received from paths * metrics of all the above
This commit is contained in:
parent
71ef9b47ab
commit
8bee4af86a
25 changed files with 338 additions and 277 deletions
|
|
@ -14,9 +14,11 @@ import (
|
|||
)
|
||||
|
||||
type rtmpServerAPIConnsListItem struct {
|
||||
Created time.Time `json:"created"`
|
||||
RemoteAddr string `json:"remoteAddr"`
|
||||
State string `json:"state"`
|
||||
Created time.Time `json:"created"`
|
||||
RemoteAddr string `json:"remoteAddr"`
|
||||
State string `json:"state"`
|
||||
BytesReceived uint64 `json:"bytesReceived"`
|
||||
BytesSent uint64 `json:"bytesSent"`
|
||||
}
|
||||
|
||||
type rtmpServerAPIConnsListData struct {
|
||||
|
|
@ -236,6 +238,8 @@ outer:
|
|||
}
|
||||
return "idle"
|
||||
}(),
|
||||
BytesReceived: c.conn.BytesReceived(),
|
||||
BytesSent: c.conn.BytesSent(),
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue